Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SecurityContext.Capabilities not found in Terraform schema #52

Closed
ArturZurawski opened this issue Dec 5, 2019 · 1 comment
Closed

Comments

@ArturZurawski
Copy link

First of all thanks for such awesome tool!

I'm trying to convert https://github.com/kubernetes/ingress-nginx/blob/master/deploy/cloud-generic/deployment.yaml

with following output:

❯ k2tf -f deployment.yaml -o deployment.tf
9:55PM Warn | excluding attribute [kubernetes_deployment.spec.template.spec.container.security_context.capability] not found in Terraform schema  field=Deployment.Spec.Template.Spec.Containers.SecurityContext.Capabilities name=nginx_ingress_controller type=kubernetes_deployment

SecurityContext.Capabilities seems to be supported by terraform
hashicorp/terraform-provider-kubernetes#247

modifying output file manually seems to cause no problems while planning:

                      + security_context {
                          + allow_privilege_escalation = true
                          + privileged                 = false
                          + read_only_root_filesystem  = false
                          + run_as_user                = 33

                          + capabilities {
                              + add  = [
                                  + "NET_BIND_SERVICE",
                                ]
                              + drop = [
                                  + "ALL",
                                ]
                            }
                        }

I'm using k2tf_0.2.8_Darwin_x86_64.tar.gz

tomaspinho added a commit to tomaspinho/k2tf that referenced this issue Apr 20, 2020
sl1pm4t added a commit that referenced this issue Apr 23, 2020
Fix for issue #52 and potentially #62
@sl1pm4t
Copy link
Owner

sl1pm4t commented Jun 4, 2020

This should be fixed now by #65.

@sl1pm4t sl1pm4t closed this as completed Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants