sl1pm4t/k2tf

SecurityContext.Capabilities not found in Terraform schema

ArturZurawski opened this issue · 1 comments

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

This should be fixed now by #65.