Giter VIP home page Giter VIP logo

k2tf's Introduction

k2tf - Kubernetes YAML to Terraform HCL converter

Build Status Go Report Card Release

A tool for converting Kubernetes API Objects (in YAML format) into HashiCorp's Terraform configuration language.

The converted .tf files are suitable for use with the Terraform Kubernetes Provider

asciicast

Installation

Pre-built Binaries

Download Binary from GitHub releases page.

Build from source

See below

Homebrew

$ brew install k2tf

asdf

Use the asdf-k2tf plugin.

Example Usage

Convert a single YAML file and write generated Terraform config to Stdout

$ k2tf -f test-fixtures/service.yaml

Convert a single YAML file and write output to file

$ k2tf -f test-fixtures/service.yaml -o service.tf

Convert a directory of Kubernetes YAML files

$ k2tf -f test-fixtures/

Read & convert Kubernetes objects directly from a cluster

$ kubectl get deployments -o yaml | ./k2tf -o deployments.tf

Building

NOTE Requires a working Golang build environment.

This project uses Golang modules for dependency management, so it can be cloned outside of the $GOPATH.

Clone the repository

$ git clone https://github.com/sl1pm4t/k2tf.git

Build

$ cd k2tf
$ make build

Run Tests

$ make test

Downloads

k2tf's People

Contributors

carlduevel avatar chenrui333 avatar dependabot[bot] avatar myyra avatar pdecat avatar sbellone avatar sl1pm4t avatar testwill avatar tmatias avatar tomaspinho avatar yuokada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

k2tf's Issues

Ports not supported in Terraform schema for NetworkPolicy

Example policy:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default-allow-ingress-internal
spec:
  podSelector:
    matchLabels:
      IngressInternal: active
  ingress:
  - from:
    - ipBlock:
        cidr: 10.0.0.0/8
    - ipBlock:
        cidr: 172.16.0.0/12
    - ipBlock:
        cidr: 192.168.0.0/16
    ports:
    - port: 80
      protocol: TCP
    - port: 443
      protocol: TCP

Results in the following warning:

1:58PM Warn | excluding attribute [kubernetes_network_policy.spec.ingress.port] not found in Terraform schema  field=NetworkPolicy.Spec.Ingress.Ports name=default_allow_ingress_internal type=kubernetes_network_policy

And the following tf code:

resource "kubernetes_network_policy" "default_allow_ingress_internal" {
  metadata {
    name = "default-allow-ingress-internal"
  }

  spec {
    pod_selector {
      match_labels = {
        IngressInternal = "active"
      }
    }

    ingress {
      from {
        ip_block {
          cidr = "10.0.0.0/8"
        }
      }

      from {
        ip_block {
          cidr = "172.16.0.0/12"
        }
      }

      from {
        ip_block {
          cidr = "192.168.0.0/16"
        }
      }
    }
  }
}

Quick looks shows schema is pulled from somewhere else, but in my opinion it should be available.

spec.template.spec.containers.securityContext is not supported

Hi, I found an issue in k2tf, version 0.2.5.
The spec.template.spec.containers.securityContext is not appears in a result file.

Example:

apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: metricbeat
  namespace: default
  labels:
    k8s-app: metricbeat
spec:
  template:
    metadata:
      labels:
        k8s-app: metricbeat
    spec:
      serviceAccountName: metricbeat
      containers:
        - name: metricbeat
          image: docker.elastic.co/beats/metricbeat:7.0.0-alpha2
          args: [
            "-c", "/etc/metricbeat.yml",
            "-e",
          ]
          env:
            - name: ELASTICSEARCH_HOST
              value: elastic-service
          securityContext:
            runAsUser: 0

Converting:

k2tf -F -f file.yaml -o output.tf

Result:

resource "kubernetes_deployment" "metricbeat" {
  metadata {
    name      = "metricbeat"
    namespace = "default"
    labels    = { k8s-app = "metricbeat" }
  }
  spec {
    template {
      metadata {
        labels = { k8s-app = "metricbeat" }
      }
      spec {
        container {
          name  = "metricbeat"
          image = "docker.elastic.co/beats/metricbeat:7.0.0-alpha2"
          args  = ["-c", "/etc/metricbeat.yml", "-e"]
          env {
            name  = "ELASTICSEARCH_HOST"
            value = "elastic-service"
          }
        }
        service_account_name = "metricbeat"
      }
    }
  }
}

There no securityContext in converted terraform file.
How it should be:

resource "kubernetes_deployment" "metricbeat" {
  metadata {
    name      = "metricbeat"
    namespace = "default"
    labels    = { k8s-app = "metricbeat" }
  }
  spec {
    template {
      metadata {
        labels = { k8s-app = "metricbeat" }
      }
      spec {
        container {
          name  = "metricbeat"
          image = "docker.elastic.co/beats/metricbeat:7.0.0-alpha2"
          args  = ["-c", "/etc/metricbeat.yml", "-e"]
          env {
            name  = "ELASTICSEARCH_HOST"
            value = "elastic-service"
          }
          security_context {
            run_as_user = 0
          }
        }
        service_account_name = "metricbeat"
      }
    }
  }
}

storageClass.parameters & provisioner are not converted

I found an issue with version 0.2.8

An example storageClass:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: slow
provisioner: kubernetes.io/gce-pd
parameters:
  type: pd-standard
  replication-type: none

Command used to convert yaml2tf:
k2tf -x -f manifests/yamls/test.yaml -o manifests/k8s/test.tf

Converted tf object:

resource "kubernetes_storage_class" "slow" {
  metadata {
    name = "slow"
  }

  parameter {}
}

It seems parameter & provisioner is missing out the arguments.

convert requests in resources need to be corrected

Thanks for k2tf. Saved lots of time.

Issue Noticed:
I have k8s deployment file which contains resources block with requests block.
converted using k2tf
Once i converted I was getting issue

Error:
Blocks of type "requests" are not expected here. Did you mean to define
argument "requests"? If so, use the equals sign to assign it a value.

Need fix:
k2tf converts resources blocks like below:

          resources {
            requests {
              cpu    = "250m"
              memory = "128Mi"
            }
          }

But terraform expects like

          resources {
            requests = {
              cpu    = "250m"
              memory = "128Mi"
            }
          }

Need to assign = to assign values to requests.

Example in Terraform Document

Thanks,
Prakash

kubernetes_persistent_volume...node_affinity...match_expression + local not found in Terraform schema

Hi,

I have 2 issues when I try to convert this yaml

kind: PersistentVolume
apiVersion: v1
metadata:
  name: XX
spec:
  capacity:
    storage: 2Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  claimRef:
    namespace: XX
    name: XX
  storageClassName: local-fs
  local:
    path: /tmp
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: kubernetes.io/hostname
          operator: In
          values:
          - trololo

Error: excluding attribute [kubernetes_persistent_volume.spec.local] not found in Terraform schema
Error: kubernetes_persistent_volume.spec.node_affinity.required.node_selector_term.match_expression not found in Terraform schema

Indeed, according to terraform doc:

Empty data fields are stripped from result

When converting this

apiVersion: v1
kind: Secret
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard-csrf
  namespace: kubernetes-dashboard
type: Opaque
data:
  csrf: ""

The result does not contain the data.csrf field, while it should exist and be an empty value.

Unsupported property is renamed

The unsupported property "capabilities" in the following snippet will be converted to "capability" when using the -I flag. This concrete problem will be solved by #52, but I report this because this may cause problems for other unsupported properties too.

container:
  securityContext:
    capabilities:
      drop:
        - ALL
      add:
        - NET_BIND_SERVICE

Support binaries with Homebrew

I did a brew install k2tf, and I had to download go and compile the binary. This takes a VERY long time. I expected to just install the compiled binary. It's been 15 minutes, and it is still not completed.

$ brew install k2tf
==> Downloading https://ghcr.io/v2/homebrew/core/go/manifests/1.17
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/go/blobs/sha256:89479b19d41e72c3cd615f92a2c1f408662b7a07a30253feac846bed7e553d3c
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:89479b19d41e72c3cd615f92a2c1f408662b7a07a30253feac846bed7e553d3c?se=2021-09
######################################################################## 100.0%
==> Downloading https://github.com/sl1pm4t/k2tf/archive/v0.5.0.tar.gz
==> Downloading from https://codeload.github.com/sl1pm4t/k2tf/tar.gz/v0.5.0
##O#- #
==> Installing k2tf from sl1pm4t/k2tf
==> Installing dependencies for sl1pm4t/k2tf/k2tf: go
==> Installing sl1pm4t/k2tf/k2tf dependency: go
==> Pouring go--1.17.catalina.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/go/1.17: 10,809 files, 565.6MB
==> Installing sl1pm4t/k2tf/k2tf
==> go build

Support kubernetes_manifest for custom resources

kubernetes_manifest now exists, and can be used to create instances of custom resources.

It'd be nice if k2tf would support this. RIght now, it just fails (when trying to transform https://github.com/grafana/agent/blob/main/cmd/agent-operator/agent-example-config.yaml, for example):

12:53PM Fatal | Could not parse stdin                                         error="10 errors occurred:\n\t* could not decode yaml object with main scheme #1: no kind \"GrafanaAgent\" is registered for version \"monitoring.grafana.com/v1alpha1\" in scheme \"pkg/runtime/scheme.go:100\"\n\t* could not decode yaml object with aggregator scheme #1: no kind \"GrafanaAgent\" is registered for version \"monitoring.grafana.com/v1alpha1\" in scheme \"pkg/runtime/scheme.go:100\"\n\t* could not decode yaml object with main scheme #2: no kind \"MetricsInstance\" is registered for version \"monitoring.grafana.com/v1alpha1\" in scheme \"pkg/runtime/scheme.go:100\"\n\t* could not decode yaml object with aggregator scheme #2: no kind \"MetricsInstance\" is registered for version \"monitoring.grafana.com/v1alpha1\" in scheme \"pkg/runtime/scheme.go:100\"\n\t* could not decode yaml object with main scheme #3: no kind \"LogsInstance\" is registered for version \"monitoring.grafana.com/v1alpha1\" in scheme \"pkg/runtime/scheme.go:100\"\n\t* could not decode yaml object with aggregator scheme #3: no kind \"LogsInstance\" is registered for version \"monitoring.grafana.com/v1alpha1\" in scheme \"pkg/runtime/scheme.go:100\"\n\t* could not decode yaml object with main scheme #4: no kind \"PodMonitor\" is registered for version \"monitoring.coreos.com/v1\" in scheme \"pkg/runtime/scheme.go:100\"\n\t* could not decode yaml object with aggregator scheme #4: no kind \"PodMonitor\" is registered for version \"monitoring.coreos.com/v1\" in scheme \"pkg/runtime/scheme.go:100\"\n\t* could not decode yaml object with main scheme #5: no kind \"PodLogs\" is registered for version \"monitoring.grafana.com/v1alpha1\" in scheme \"pkg/runtime/scheme.go:100\"\n\t* could not decode yaml object with aggregator scheme #5: no kind \"PodLogs\" is registered for version \"monitoring.grafana.com/v1alpha1\" in scheme \"pkg/runtime/scheme.go:100\"\n\n"

`ValidatingWebhookConfiguration` - webhook rules incorrectly translated

I ran k2tf on this document https://raw.githubusercontent.com/kubernetes/ingress-nginx/ingress-nginx-2.11.3/deploy/static/provider/cloud/deploy.yaml, which contains this resource definition:

apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
  labels:
    helm.sh/chart: ingress-nginx-2.11.1
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/instance: ingress-nginx
    app.kubernetes.io/version: 0.34.1
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: admission-webhook
  name: ingress-nginx-admission
webhooks:
  - name: validate.nginx.ingress.kubernetes.io
    rules:
      - apiGroups:
          - extensions
          - networking.k8s.io
        apiVersions:
          - v1beta1
        operations:
          - CREATE
          - UPDATE
        resources:
          - ingresses
    failurePolicy: Fail
    sideEffects: None
    admissionReviewVersions:
      - v1
      - v1beta1
    clientConfig:
      service:
        namespace: ingress-nginx
        name: ingress-nginx-controller-admission
        path: /extensions/v1beta1/ingresses

but the corresponding Terraform output looks like this:

resource "kubernetes_validating_webhook_configuration" "ingress_nginx_admission" {
  metadata {
    name = "ingress-nginx-admission"

    labels = {
      "app.kubernetes.io/component" = "admission-webhook"

      "app.kubernetes.io/instance" = "ingress-nginx"

      "app.kubernetes.io/managed-by" = "Helm"

      "app.kubernetes.io/name" = "ingress-nginx"

      "app.kubernetes.io/version" = "0.34.1"

      "helm.sh/chart" = "ingress-nginx-2.11.1"
    }
  }

  webhook {
    name = "validate.nginx.ingress.kubernetes.io"

    client_config {
      service {
        namespace = "ingress-nginx"
        name      = "ingress-nginx-controller-admission"
        path      = "/extensions/v1beta1/ingresses"
      }
    }

    rule {
      operations = ["CREATE", "UPDATE"]
    }

    failure_policy            = "Fail"
    side_effects              = "None"
    admission_review_versions = ["v1", "v1beta1"]
  }
}

The apiGroups, apiVersions, and resources are not translated, but they are required fields which means this is an invalid Terraform configuration.

Invalid resource names

When converting a yaml where the name field contains a colon, this is replicated to the resource name, which results in an invalid name for a terraform resource and fails terraform validation.

For example:

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app: metallb
name: metallb-system:speaker
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: metallb-system:speaker
subjects:
- kind: ServiceAccount
name: speaker
namespace: metallb-system

becomes

resource "kubernetes_cluster_role_binding" "metallb_system:speaker" {
metadata {
name = "metallb-system:speaker"
labels = {
app = "metallb"
}
}
subject {
kind = "ServiceAccount"
name = "speaker"
namespace = "metallb-system"
}
role_ref {
api_group = "rbac.authorization.k8s.io"
kind = "ClusterRole"
name = "metallb-system:speaker"
}
}

Refactor k2tf to allow third parties to use k2tf.

Currently k2tf is entirely in the main package. The current setup does not allow a developer to reuse the k2tf code.

I request k2tf to be refactored such that a developer can reuse k2tf in their own code.

pod affinity/anti affinity is not supported?

I've spec in statefulset:
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "service"
operator: In
values:
- kafka
topologyKey: "kubernetes.io/hostname"
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- zk

And I get such error:
2:56PM Warn | excluding attribute [kubernetes_stateful_set.spec.template.spec.affinity.pod_affinity.preferred_during_scheduling_ignored_during_execution.pod_affinity_term.label_selector.match_expression] not found in Terraform schema field=StatefulSet.Spec.Template.Spec.Affinity.PodAffinity.PreferredDuringSchedulingIgnoredDuringExecution.PodAffinityTerm.LabelSelector.MatchExpressions name=kafka type=kubernetes_stateful_set
2:56PM Warn | excluding attribute [kubernetes_stateful_set.spec.template.spec.affinity.pod_anti_affinity.required_during_scheduling_ignored_during_execution.label_selector.match_expression] not found in Terraform schema field=StatefulSet.Spec.Template.Spec.Affinity.PodAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution.LabelSelector.MatchExpressions name=kafka type=kubernetes_stateful_set

Add reverse functionality

It would be cool to have a way to create k8 configs from Terraform resources.

This would allow k8 admins who do not have a lot of Terraform experience to review what the Terraform provider was going to do in the planning stage in k8 terms.

We could also use this to lint the k8 output and further verify our Terraform output.

Default values for terraform and kubectl can be different

When converting a daemonset.yaml without explicitly setting automount_service_account_token to true (which is the kubectl default), terraform puts false as a default.

E.g. turning daemonset.yaml

apiVersion: apps/v1
kind: DaemonSet
metadata:
[...]
spec:
  template:
    spec:
[...]

into terraform:

resource "kubernetes_daemonset" "name" {
  metadata {
   [...]
  }
  spec {
    selector {
      match_labels = {
        [...]
      }
    }
    template {
      spec {
       [...]

results in:

apiVersion: apps/v1beta1
  kind: DaemonSet
  metadata:
    [...]
  spec:
    template:
      spec:
        automountServiceAccountToken: false

A specific example can be found here, when trying to use k2tf on the quickstart.yaml, it needs the automountServiceAccountToken to be explicitly set to true, otherwise the services can't connect.

... not found in Terraform schema

1:21PM Warn | excluding attribute [kubernetes_limit_range.spec.limits] not found in Terraform schema

1:21PM Warn | excluding attribute [kubernetes_deployment.spec.template.spec.image_pull_secret] not found in Terraform schema

LimitRange config:

kind: LimitRange
metadata:
  name: ns-limit-range
  namespace: ${ENVIRONMENT}
spec:
  limits:
  - default:
      cpu: 200m
      memory: 256Mi
    defaultRequest:
      cpu: 100m
      memory: 100Mi
    max:
      cpu: 2
      memory: 12Gi
    min:
      cpu: 10m
      memory: 10Mi
    type: Container```



ImagePullSecret:

... 
     imagePullSecrets:
      - name: regcred
...

Order is not deterministic

The order of "cpu" and "memory" in the following snippet is non-deterministic when generated from the same yaml.

container {
  resources {
    limits {
      cpu    = "250m"
      memory = "50Mi"
    }
  }
}

volumes.emptyDir is dropped causes diff

command:

k2tf -f test-fixtures/replicationController.yml 

expected

resource "kubernetes_replication_controller" "es" {
  metadata {
    name = "es"

    labels = {
      component = "elasticsearch"
    }
  }

  spec {
    replicas = 1

    template {
      metadata {
        labels = {
          component = "elasticsearch"
        }
      }

      spec {
        volume {
          name = "storage"
          empty_dir {}
        }
...

got

resource "kubernetes_replication_controller" "es" {
  metadata {
    name = "es"

    labels = {
      component = "elasticsearch"
    }
  }

  spec {
    replicas = 1

    template {
      metadata {
        labels = {
          component = "elasticsearch"
        }
      }

      spec {
        volume {
          name = "storage"
        }
...

problem: this causes a diff in plan:

# kubernetes_replication_controller.es will be updated in-place
  ~ resource "kubernetes_replication_controller" "es" {
        id               = "default/es"
        # (1 unchanged attribute hidden)


      ~ spec {
            # (5 unchanged attributes hidden)



          ~ template {

              ~ spec {
                    # (12 unchanged attributes hidden)



                  ~ volume {
                        name = "storage"

                      - empty_dir {}
                    }
                    # (5 unchanged blocks hidden)
                }
                # (1 unchanged block hidden)
            }
            # (2 unchanged blocks hidden)
        }
        # (1 unchanged block hidden)
    }

Clobber mode doesn't cleanup existing file properly

When writing generated HCL to file, if the output file already exists and -x flag is used to overwrite it, the existing file is not removed and the new contents is written over top.
This can cause issues if the new contents is less bytes than the original, as the tail end of the original contents will still exist in the file.

does k2tf support conversion of multiple yaml docs to tf file

I want to covert yaml with multiple docs.Does k2tf support it

apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/component: dex-server
app.kubernetes.io/name: argocd-dex-server
app.kubernetes.io/part-of: argocd
name: argocd-dex-server


apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
app.kubernetes.io/component: dex-server
app.kubernetes.io/name: argocd-dex-server
app.kubernetes.io/part-of: argocd
name: argocd-dex-server
rules:

  • apiGroups:
    • ""
      resources:
    • secrets
    • configmaps
      verbs:
    • get
    • list
    • watch

Support ingress_v1

kubernetes_ingress belongs to v1beta1, while the official v1 release has the more complete kubernetes_ingress_v1. See for example hashicorp/terraform-provider-kubernetes#1023 (comment)

Example:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: foo-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/backend-protocol: https
spec:
  rules:
    - host: my.host.com
      http:
        paths:
          - path: /api/v1/actions/foo
            pathType: Prefix
            backend:
              service:
                name: foo
                port:
                  number: 443

This generates the following errors:

Warn | excluding attribute [kubernetes_ingress.spec.rule.http.path.backend.service.port] not found in Terraform schema  field=Ingress.Spec.Rules.HTTP.Paths.Backend.Service.Port name=foo_ingress type=kubernetes_ingress
Warn | excluding attribute [kubernetes_ingress.spec.rule.http.path.backend.service] not found in Terraform schema  field=Ingress.Spec.Rules.HTTP.Paths.Backend.Service name=foo_ingress type=kubernetes_ingress

And the tf file for spec has only this:

  spec {
    rule {
      host = "my.host.com"

      http {
        path {
          path = "/api/v1/actions/foo"
        }
      }
    }
  }

It misses pathType and the entire backend section.

The following works for me with v1:

resource "kubernetes_ingress_v1" "foo_ingress" {
  metadata {
    name = "foo-ingress"

    annotations = {
      "kubernetes.io/ingress.class"                  = "nginx"
      "nginx.ingress.kubernetes.io/backend-protocol" = "https"
      "nginx.ingress.kubernetes.io/enable-cors"      = "true"
    }
  }

  spec {
    rule {
      host = "my.host.com"

      http {
        path {
          path      = "/api/v1/actions/foo"
          path_type = "Prefix"
          backend {
            service {
              name = "foo"
              port {
                number = 443
              }
            }
          }
        }
      }
    }
  }
}

Not importing Ingress TLS

Importing a yaml for an Ingress with TLS gives the warning that is excluded for not being in the Terraform schema. Per the Terraform Kubernetes Ingress documentation, it is part of the schema (https://www.terraform.io/docs/providers/kubernetes/r/ingress.html#tls)

Steps to recreate -

Converting this yaml:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
labels:
app: mdid
name: mdidnp
namespace: mdid
spec:
rules:

  • host: mdid-np.example.com
    http:
    paths:
    • backend:
      serviceName: mdid-np
      servicePort: 8080
      path: /
      tls:
  • secretName: mdid-np

Gives this response:

11:12AM Warn | excluding attribute [kubernetes_ingress.spec.tl] not found in Terraform schema field=Ingress.Spec.TLS name=mdidnp type=kubernetes_ingress
resource "kubernetes_ingress" "mdidnp" {
metadata {
name = "mdidnp"
namespace = "mdid"

labels {
  app = "mdid"
}

}

spec {
rule {
host = "mdid-np.example.com"

  http {
    path {
      path = "/"

      backend {
        service_name = "mdid-np"
        service_port = "8080"
      }
    }
  }
}

}
}
It should be:
resource "kubernetes_ingress" "mdidnp" {
metadata {
name = "mdidnp"
namespace = "mdid"

labels {
  app = "mdid"
}

}

spec {
rule {
host = "mdid-np.example.com"

  http {
    path {
      path = "/"

      backend {
        service_name = "mdid-np"
        service_port = "8080"
      }
    }
  }
}
tls {
  secret_name = "mdid-np"
}

}
}

Can't convert

I was trying to convert the metrics-server YAML (https://github.com/kubernetes-sigs/metrics-server/tree/v0.4.2) to terraform code. While doing so k2tf produced a valid looking TF file but produced one resource with an invalid resource name (resource "kubernetes_api_service" "v_1_beta_1__metrics_k_8_s.io" { โ€ฆ }) due to it containing a .io at the end of the name. The dot is apparently not permitted in TF resource names.

The YAMl (sub) document leading to this is this:

  apiVersion: apiregistration.k8s.io/v1
  kind: APIService
  metadata:                      
    labels:                                                   
      k8s-app: metrics-server                                
    name: v1beta1.metrics.k8s.io                             
  spec:                                       
    group: metrics.k8s.io
    groupPriorityMinimum: 100
    insecureSkipTLSVerify: true
    service:      
      name: metrics-server
      namespace: kube-system
    version: v1beta1
    versionPriority: 100

Manually fixing the terraform resource name up did solve the issue but I think there is still a bug within k2tf somewhere.

Fail to convert CRD yamls

4:13PM Fatal | %!s() error="2 errors occurred:\n\t* could not decode yaml object with main scheme #1: no kind "CustomResourceDefinition" is registered for version "apiextensions.k8s.io/v1beta1" in scheme "pkg/runtime/scheme.go:101"\n\t* could not decode yaml object with aggregator scheme #1: no kind "CustomResourceDefinition" is registered for version "apiextensions.k8s.io/v1beta1" in scheme "pkg/runtime/scheme.go:101"\n\n"

i.e.

kind: CustomResourceDefinition
metadata:
  name: clusterissuers.certmanager.k8s.io
  labels:
    app: cert-manager
spec:
  group: certmanager.k8s.io
  version: v1alpha1
  names:
    kind: ClusterIssuer
    plural: clusterissuers
  scope: Cluster

error while using the .tf file

I had successfully converted YAML to.tf while I am trying to deploy it I am getting the following error could you please help me to resolve the eeror
image

skipping API object, kind not supported by Terraform provider. kind=ValidatingWebhookConfiguration

Thank you for this very useful tool.

I observed an issue where this tool will not convert ValidatingWebhookConfiguration objects.

Version:
k2tf --version
k2tf version: 0.4.1
Steps to reproduce:
  1. Run the following command to convert the manifests files for Kubernetes ingress-nginx.
wget -qO- https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.34.1/deploy/static/provider/cloud/deploy.yaml | k2tf
Expected result:

k2tf will convert yaml manifest for ValidatingWebhookConfiguration object to HCL.

Actual result:
3:21PM Warn | skipping API object, kind not supported by Terraform provider.  kind=ValidatingWebhookConfiguration
Other info:

According to the current TF docs, ValidatingWebhookConfiguration (kubernetes_validating_webhook_configuration) is supported. https://www.terraform.io/docs/providers/kubernetes/r/validating_webhook_configuration.html

Let me know if I can provide any additional info. Thanks!

Support for multi-line strings

When a multiline YAML string is defined in the K8s resource, it would be nice if this could be converted to a multiline string in the resultant terraform using the <<EOT syntax.

SecurityContext.Capabilities not found in Terraform schema

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

Warn excluding attribute - not found in Terraform schema

This example yaml file will generate a false positive warning:

---
apiVersion: v1
kind: Namespace
metadata:
  name: cert-manager
  labels:
    certmanager.k8s.io/disable-validation: "true"

How to reproduce:

cat 05-cert-manager.yaml | ./k2tf
10:12PM Warn | excluding attribute - not found in Terraform schema           attr=kubernetes_namespace.spec field=Namespace.Spec name=cert_manager type=kubernetes_namespace
resource "kubernetes_namespace" "cert_manager" {
  metadata {
    name = "cert-manager"

    labels {
      "certmanager.k8s.io/disable-validation" = "true"
    }
  }
}

The translation looks correct, I dont understand if the warning is a false positive.

Removing the line kind: Namespace fixes the warning.

Support HEREDOC for multi-line config values

I've been converting a bunch of complex multi-line config files over. For readability, it would be great to support optional HEREDOC style multi-line string values.

For example rather than:

  ...
  value = "line1\nline2\n...lineX\n"
  ...

The tool could generate:

  ...
  value = <<EOF
line1
line2
...
lineX
EOF
  ...

Thanks for pulling together such a great tool.

Panic when converting ReplicationController

Latest release (0.2.8) crashes when attempting to convert the following YAML:

apiVersion: v1
kind: Service
metadata:
  name: echoheaders
  namespace: platform
  labels:
    app: echoheaders
spec:
  type: NodePort
  ports:
    - port: 80
      targetPort: 8080
      protocol: TCP
      name: http
  selector:
    app: echoheaders
---
apiVersion: v1
kind: ReplicationController
metadata:
  name: echoheaders
  namespace: platform
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: echoheaders
    spec:
      containers:
        - name: echoheaders
          image: k8s.gcr.io/echoserver:1.10
          ports:
            - containerPort: 8080

Output

resource "kubernetes_service" "echoheaders" {
  metadata {
    name      = "echoheaders"
    namespace = "platform"
    labels    = { app = "echoheaders" }
  }
  spec {
    port {
      name        = "http"
      protocol    = "TCP"
      port        = 80
      target_port = "8080"
    }
    selector = { app = "echoheaders" }
    type     = "NodePort"
  }
}

panic: must not call MapVal with empty map

goroutine 1 [running]:
github.com/zclconf/go-cty/cty.MapVal(0xc0002ce030, 0x27d9201, 0x14, 0xc0007896c0, 0x1)
	/go/pkg/mod/github.com/zclconf/[email protected]/cty/value_init.go:198 +0x556
main.(*ObjectWalker).closeBlock(0xc0000fe0b0, 0x0)
	/drone/src/hcl_writer.go:219 +0x160
main.(*ObjectWalker).Exit(0xc0000fe0b0, 0x1, 0x195, 0x3b7e6b0)
	/drone/src/hcl_writer.go:253 +0x48
github.com/mitchellh/reflectwalk.walkMap(0x256c800, 0xc000132118, 0x195, 0x2788a20, 0xc0000fe0b0, 0x0, 0x2544ee5)
	/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:243 +0x361
github.com/mitchellh/reflectwalk.walk(0x256c800, 0xc000132118, 0x195, 0x2788a20, 0xc0000fe0b0, 0x2bdb401, 0x256c800)
	/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:182 +0x4cb
github.com/mitchellh/reflectwalk.walkStruct(0x26bd180, 0xc000132108, 0x199, 0x2788a20, 0xc0000fe0b0, 0x0, 0x24cb961)
	/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:385 +0x3d5
github.com/mitchellh/reflectwalk.walk(0x26bd180, 0xc000132108, 0x199, 0x2788a20, 0xc0000fe0b0, 0x2bdb401, 0x26bd180)
	/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:188 +0x571
github.com/mitchellh/reflectwalk.walkStruct(0x26bd0a0, 0xc000132000, 0x199, 0x2788a20, 0xc0000fe0b0, 0x100, 0xc000593200)
	/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:385 +0x3d5
github.com/mitchellh/reflectwalk.walk(0x27a9d40, 0xc000132000, 0x16, 0x2788a20, 0xc0000fe0b0, 0x23d3b01, 0x2757c40)
	/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:188 +0x571
github.com/mitchellh/reflectwalk.Walk(0x27a9d40, 0xc000132000, 0x2788a20, 0xc0000fe0b0, 0x0, 0x0)
	/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:92 +0x182
main.WriteObject(0x2b6afc0, 0xc000132000, 0xc000023860, 0x0, 0x0, 0x1)
	/drone/src/hcl_writer.go:30 +0x89
main.main()
	/drone/src/main.go:62 +0x2b6

Converting official kured 1.2 yaml spec results in daemonset that crash loops

When I convert the official kured 1.2 spec, I get a terraform config that crash loops when applied.

It seems the reason is the automount_service_account_token defaults to false in the terraform provider due to the following line.

https://github.com/terraform-providers/terraform-provider-kubernetes/blob/077ff93ef66cdb66148e12fc1d629d53b2203678/kubernetes/resource_kubernetes_pod.go#L21

Would it make sense to set this flag explicitly to true in k2tf, since this is the k8s default

Missing ClusterRole.AggregationRule

k2tf --version
k2tf version: 0.5.0

When running k2tf against some yaml I am getting the warning of:

4:32PM Warn | excluding attribute [kubernetes_cluster_role.aggregation_rule] not found in Terraform schema  field=ClusterRole.AggregationRule name=source_observer type=kubernetes_cluster_role

Is it possible to get a schema update for this extremely valuable tool?

Dependabot can't parse your go.mod

Dependabot couldn't parse the go.mod found at /go.mod.

The error Dependabot encountered was:

go: finding cloud.google.com/go v0.49.0
go: finding cloud.google.com/go/bigquery v1.3.0
go: finding cloud.google.com/go/bigtable v1.0.1-0.20190930151326-312d69ccea6e
go: finding cloud.google.com/go/datastore v1.0.0
go: finding cloud.google.com/go/pubsub v1.1.0
go: finding cloud.google.com/go/storage v1.4.0
go: finding dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9
go: finding github.com/Azure/azure-sdk-for-go v36.2.0+incompatible
go: finding github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78
go: finding github.com/Azure/go-autorest v12.2.0+incompatible
go: finding github.com/Azure/go-autorest/autorest v0.9.2
go: finding github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503
go: finding github.com/Azure/go-autorest/autorest/azure/cli v0.2.0
go: finding github.com/Azure/go-autorest/autorest/date v0.2.0
go: finding github.com/Azure/go-autorest/autorest/mocks v0.3.0
go: finding github.com/Azure/go-autorest/autorest/to v0.3.0
go: finding github.com/Azure/go-autorest/autorest/validation v0.2.0
go: finding github.com/Azure/go-autorest/logger v0.1.0
go: finding github.com/Azure/go-autorest/tracing v0.5.0
go: finding github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4
go: finding github.com/BurntSushi/toml v0.3.1
go: finding github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802
go: finding github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022
go: finding github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46
go: finding github.com/OneOfOne/xxhash v1.2.2
go: finding github.com/OpenPeeDeeP/depguard v1.0.1
go: finding github.com/PuerkitoBio/purell v1.1.1
go: finding github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578
go: finding github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6
go: finding github.com/unknwon/com v1.0.1
go: finding github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af
go: finding github.com/agext/levenshtein v1.2.2
go: finding github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412
go: finding github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc
go: finding github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf
go: finding github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190329064014-6e358769c32a
go: finding github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190103054945-8205d1f41e70
go: finding github.com/aliyun/aliyun-tablestore-go-sdk v4.1.2+incompatible
go: finding github.com/antchfx/xpath v0.0.0-20190129040759-c8489ed3251e
go: finding github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0
go: finding github.com/apparentlymart/go-cidr v1.0.1
go: finding github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0
go: finding github.com/apparentlymart/go-textseg v1.0.0
go: finding github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2
go: finding github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6
go: finding github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da
go: finding github.com/armon/go-radix v1.0.0
go: finding github.com/aws/aws-sdk-go v1.26.1
go: finding github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f
go: finding github.com/beevik/etree v1.1.0
go: finding github.com/beorn7/perks v1.0.0
go: finding github.com/bflad/tfproviderlint v0.5.0
go: finding github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
go: finding github.com/bgentry/speakeasy v0.1.0
go: finding github.com/blang/semver v3.5.1+incompatible
go: finding github.com/bmatcuk/doublestar v1.1.5
go: finding github.com/boltdb/bolt v1.3.1
go: finding github.com/bombsimon/wsl v1.2.1
go: finding github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc
go: finding github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e
go: finding github.com/census-instrumentation/opencensus-proto v0.2.1
go: finding github.com/cespare/xxhash v1.1.0
go: finding github.com/cheggaaa/pb v1.0.27
go: finding github.com/chzyer/logex v1.1.10
go: finding github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
go: finding github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1
go: finding github.com/client9/misspell v0.3.4
go: finding github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa
go: finding github.com/coreos/bbolt v1.3.2
go: finding github.com/coreos/etcd v3.3.10+incompatible
go: finding github.com/coreos/go-etcd v2.0.0+incompatible
go: finding github.com/coreos/go-oidc v2.1.0+incompatible
go: finding github.com/coreos/go-semver v0.3.0
go: finding github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e
go: finding github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f
go: finding github.com/cpuguy83/go-md2man v1.0.10
go: finding github.com/creack/pty v1.1.7
go: finding github.com/davecgh/go-spew v1.1.1
go: finding github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: finding github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954
go: finding github.com/dimchansky/utfbom v1.1.0
go: finding github.com/dnaeon/go-vcr v0.0.0-20180920040454-5637cf3d8a31
go: finding github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0
go: finding github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96
go: finding github.com/dustin/go-humanize v1.0.0
go: finding github.com/dustinkirkland/golang-petname v0.0.0-20170921220637-d3c2ba80e75e
go: finding github.com/dylanmei/iso8601 v0.1.0
go: finding github.com/dylanmei/winrmtest v0.0.0-20190225150635-99b7fe2fddf1
go: finding github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e
go: finding github.com/emicklei/go-restful v2.9.5+incompatible
go: finding github.com/envoyproxy/go-control-plane v0.9.0
go: finding github.com/envoyproxy/protoc-gen-validate v0.1.0
go: finding github.com/evanphx/json-patch v4.2.0+incompatible
go: finding github.com/fatih/color v1.7.0
go: finding github.com/frankban/quicktest v1.4.2
go: finding github.com/fsnotify/fsnotify v1.4.7
go: finding github.com/gammazero/deque v0.0.0-20180920172122-f6adf94963e4
go: finding github.com/gammazero/workerpool v0.0.0-20181230203049-86a96b5d5d92
go: finding github.com/ghodss/yaml v1.0.0
go: finding github.com/go-critic/go-critic v0.3.5-0.20190904082202-d79a9f0c64db
go: finding github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1
go: finding github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72
go: finding github.com/go-kit/kit v0.8.0
go: finding github.com/go-lintpack/lintpack v0.5.2
go: finding github.com/go-logfmt/logfmt v0.4.0
go: finding github.com/go-logr/logr v0.1.0
go: finding github.com/go-ole/go-ole v1.2.1
go: finding github.com/go-openapi/jsonpointer v0.19.2
go: finding github.com/go-openapi/jsonreference v0.19.2
go: finding github.com/go-openapi/spec v0.19.2
go: finding github.com/go-openapi/swag v0.19.2
go: finding github.com/go-stack/stack v1.8.0
go: finding github.com/go-test/deep v1.0.4
go: finding github.com/go-toolsmith/astcast v1.0.0
go: finding github.com/go-toolsmith/astcopy v1.0.0
go: finding github.com/go-toolsmith/astequal v1.0.0
go: finding github.com/go-toolsmith/astfmt v1.0.0
go: finding github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21
go: finding github.com/go-toolsmith/astp v1.0.0
go: finding github.com/go-toolsmith/pkgload v1.0.0
go: finding github.com/go-toolsmith/strparse v1.0.0
go: finding github.com/go-toolsmith/typep v1.0.0
go: finding github.com/gobwas/glob v0.2.3
go: finding github.com/gogo/protobuf v1.3.0
go: finding github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
go: finding github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9
go: finding github.com/golang/mock v1.3.1
go: finding github.com/golang/protobuf v1.3.2
go: finding github.com/golang/snappy v0.0.1
go: finding github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2
go: finding github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a
go: finding github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6
go: finding github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613
go: finding github.com/golangci/go-tools v0.0.0-20190318055746-e32c54105b7c
go: finding github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3
go: finding github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee
go: finding github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a
go: finding github.com/golangci/golangci-lint v1.20.0
go: finding github.com/golangci/gosec v0.0.0-20190211064107-66fb7fc33547
go: finding github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc
go: finding github.com/golangci/lint-1 v0.0.0-20190930103755-fad67e08aa89
go: finding github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca
go: finding github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770
go: finding github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21
go: finding github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0
go: finding github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4
go: finding github.com/google/btree v1.0.0
go: finding github.com/google/go-cmp v0.3.1
go: finding github.com/google/go-querystring v1.0.0
go: finding github.com/google/gofuzz v1.0.0
go: finding github.com/google/martian v2.1.0+incompatible
go: finding github.com/google/pprof v0.0.0-20190515194954-54271f7e092f
go: finding github.com/google/renameio v0.1.0
go: finding github.com/google/uuid v1.1.1
go: finding github.com/googleapis/gax-go/v2 v2.0.5
go: finding github.com/googleapis/gnostic v0.2.0
go: finding github.com/gophercloud/gophercloud v0.3.1-0.20190807175045-25a84d593c97
go: finding github.com/gophercloud/utils v0.0.0-20190128072930-fbb6ab446f01
go: finding github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e
go: finding github.com/gorilla/websocket v1.4.0
go: finding github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3
go: finding github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7
go: finding github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4
go: finding github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
go: finding github.com/grpc-ecosystem/grpc-gateway v1.9.5
go: finding github.com/hashicorp/aws-sdk-go-base v0.4.0
go: finding github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089
go: finding github.com/hashicorp/errwrap v1.0.0
go: finding github.com/hashicorp/go-azure-helpers v0.10.0
go: finding github.com/hashicorp/go-checkpoint v0.5.0
go: finding github.com/hashicorp/go-cleanhttp v0.5.1
go: finding github.com/hashicorp/go-getter v1.4.0
go: finding github.com/hashicorp/go-hclog v0.10.0
go: finding github.com/hashicorp/go-immutable-radix v0.0.0-20180129170900-7f3cd4390caa
go: finding github.com/hashicorp/go-msgpack v0.5.4
go: finding github.com/hashicorp/go-multierror v1.0.0
go: finding github.com/hashicorp/go-plugin v1.0.1
go: finding github.com/hashicorp/go-retryablehttp v0.5.2
go: finding github.com/hashicorp/go-rootcerts v1.0.0
go: finding github.com/hashicorp/go-safetemp v1.0.0
go: finding github.com/hashicorp/go-slug v0.4.1
go: finding github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86
go: finding github.com/hashicorp/go-tfe v0.3.27
go: finding github.com/hashicorp/go-uuid v1.0.1
go: finding github.com/hashicorp/go-version v1.2.0
go: finding github.com/hashicorp/golang-lru v0.5.1
go: finding github.com/hashicorp/hcl v1.0.0
go: finding github.com/hashicorp/hcl/v2 v2.2.0
go: finding github.com/hashicorp/hcl2 v0.0.0-20190821123243-0c888d1241f6
go: finding github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590
go: finding github.com/hashicorp/logutils v1.0.0
go: finding github.com/hashicorp/memberlist v0.1.0
go: finding github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb
go: finding github.com/hashicorp/terraform v0.12.18
go: finding github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7
go: finding github.com/hashicorp/terraform-plugin-sdk v1.4.1
go: finding github.com/hashicorp/terraform-svchost v0.0.0-20191119180714-d2e4933b9136
go: finding github.com/hashicorp/vault v1.1.2
go: finding github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d
go: finding github.com/hpcloud/tail v1.0.0
go: finding github.com/iancoleman/strcase v0.0.0-20180726023541-3605ed457bf7
go: finding github.com/imdario/mergo v0.3.7
go: finding github.com/inconshreveable/mousetrap v1.0.0
go: finding github.com/jen20/awspolicyequivalence v1.0.0
go: finding github.com/jessevdk/go-flags v1.4.0
go: finding github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a
go: finding github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
go: finding github.com/jonboulle/clockwork v0.1.0
go: finding github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926
go: finding github.com/json-iterator/go v1.1.7
go: finding github.com/jstemmer/go-junit-report v0.9.1
go: finding github.com/jtolds/gls v4.2.1+incompatible
go: finding github.com/julienschmidt/httprouter v1.2.0
go: finding github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
go: finding github.com/keybase/go-crypto v0.0.0-20190828182435-a05457805304
go: finding github.com/kisielk/errcheck v1.2.0
go: finding github.com/kisielk/gotool v1.0.0
go: finding github.com/klauspost/compress v1.4.1
go: finding github.com/klauspost/cpuid v1.2.0
go: finding github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: finding github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515
go: finding github.com/kr/pretty v0.1.0
go: finding github.com/kr/pty v1.1.8
go: finding github.com/kr/text v0.1.0
go: finding github.com/kubernetes-sigs/aws-iam-authenticator v0.3.1-0.20181019024009-82544ec86140
go: finding github.com/kylelemons/godebug v1.1.0
go: finding github.com/lib/pq v1.2.0
go: finding github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e
go: finding github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82
go: finding github.com/magiconair/properties v1.8.0
go: finding github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63
go: finding github.com/marstr/guid v1.1.0
go: finding github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9
go: finding github.com/masterzen/winrm v0.0.0-20190223112901-5e5c9a7fe54b
go: finding github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb
go: finding github.com/mattn/go-colorable v0.1.4
go: finding github.com/mattn/go-isatty v0.0.11
go: finding github.com/mattn/go-runewidth v0.0.4
go: finding github.com/mattn/go-shellwords v1.0.4
go: finding github.com/mattn/goveralls v0.0.2
go: finding github.com/matttproud/golang_protobuf_extensions v1.0.1
go: finding github.com/miekg/dns v1.0.8
go: finding github.com/mitchellh/cli v1.0.0
go: finding github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
go: finding github.com/mitchellh/copystructure v1.0.0
go: finding github.com/mitchellh/go-homedir v1.1.0
go: finding github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb
go: finding github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b
go: finding github.com/mitchellh/go-testing-interface v1.0.0
go: finding github.com/mitchellh/go-wordwrap v1.0.0
go: finding github.com/mitchellh/hashstructure v1.0.0
go: finding github.com/mitchellh/mapstructure v1.1.2
go: finding github.com/mitchellh/panicwrap v1.0.0
go: finding github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51
go: finding github.com/mitchellh/reflectwalk v1.0.1
go: finding github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: finding github.com/modern-go/reflect2 v1.0.1
go: finding github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd
go: finding github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
go: finding github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223
go: finding github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f
go: finding github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d
go: finding github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d
go: finding github.com/oklog/run v1.0.0
go: finding github.com/oklog/ulid v1.3.1
go: finding github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5
go: finding github.com/onsi/ginkgo v1.10.1
go: finding github.com/onsi/gomega v1.7.0
go: finding github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58
go: finding github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c
go: finding github.com/pborman/uuid v1.2.0
go: finding github.com/pelletier/go-toml v1.2.0
go: finding github.com/peterbourgon/diskv v2.0.1+incompatible
go: finding github.com/pierrec/lz4 v2.3.0+incompatible
go: finding github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4
go: finding github.com/pkg/errors v0.8.1
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding github.com/posener/complete v1.2.3
go: finding github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021
go: finding github.com/pquerna/otp v1.2.0
go: finding github.com/prometheus/client_golang v1.0.0
go: finding github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
go: finding github.com/prometheus/common v0.4.1
go: finding github.com/prometheus/procfs v0.0.2
go: finding github.com/prometheus/tsdb v0.7.1
go: finding github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c
go: finding github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446
go: finding github.com/robfig/cron v1.2.0
go: finding github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af
go: finding github.com/rogpeppe/go-internal v1.3.0
go: finding github.com/rs/zerolog v1.11.0
go: finding github.com/russross/blackfriday v1.5.2
go: finding github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735
go: finding github.com/satori/go.uuid v1.2.0
go: finding github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529
go: finding github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d
go: finding github.com/sergi/go-diff v1.0.0
go: finding github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada
go: finding github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4
go: finding github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e
go: finding github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041
go: finding github.com/sirupsen/logrus v1.4.2
go: finding github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304
go: finding github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c
go: finding github.com/soheilhy/cmux v0.1.4
go: finding github.com/sourcegraph/go-diff v0.5.1
go: finding github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72
go: finding github.com/spf13/afero v1.2.2
go: finding github.com/spf13/cast v1.3.0
go: finding github.com/spf13/cobra v0.0.5
go: finding github.com/spf13/jwalterweatherman v1.0.0
go: finding github.com/spf13/pflag v1.0.5
go: finding github.com/spf13/viper v1.4.0
go: finding github.com/stoewer/go-strcase v1.0.2
go: finding github.com/stretchr/objx v0.2.0
go: finding github.com/stretchr/testify v1.4.0
go: finding github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d
go: finding github.com/terraform-providers/terraform-provider-aws v2.32.0+incompatible
go: finding github.com/terraform-providers/terraform-provider-google v2.17.0+incompatible
go: finding github.com/terraform-providers/terraform-provider-kubernetes v1.11.0
go: finding github.com/terraform-providers/terraform-provider-openstack v1.15.0
go: finding github.com/terraform-providers/terraform-provider-random v2.2.1+incompatible
go: finding github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e
go: finding github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5
go: finding github.com/ugorji/go v1.1.4
go: finding github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8
go: finding github.com/ulikunitz/xz v0.5.6
go: finding github.com/ultraware/funlen v0.0.2
go: finding github.com/ultraware/whitespace v0.0.4
go: finding github.com/urfave/cli v1.20.0
go: finding github.com/uudashr/gocognit v0.0.0-20190926065955-1655d0de0517
go: finding github.com/valyala/bytebufferpool v1.0.0
go: finding github.com/valyala/fasthttp v1.2.0
go: finding github.com/valyala/quicktemplate v1.2.0
go: finding github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a
go: finding github.com/vmihailenco/msgpack v4.0.4+incompatible
go: finding github.com/xanzy/ssh-agent v0.2.1
go: finding github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2
go: finding github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557
go: finding github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77
go: finding github.com/zclconf/go-cty v1.1.1
go: finding github.com/zclconf/go-cty-yaml v1.0.1
go: finding go.etcd.io/bbolt v1.3.3
go: finding go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738
go: finding go.opencensus.io v0.22.2
go: finding go.uber.org/atomic v1.4.0
go: finding go.uber.org/multierr v1.1.0
go: finding go.uber.org/zap v1.10.0
go: finding golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413
go: finding golang.org/x/exp v0.0.0-20191129062945-2f5052295587
go: finding golang.org/x/image v0.0.0-20190802002840-cff245a6509b
go: finding golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f
go: finding golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028
go: finding golang.org/x/mod v0.1.0
go: finding golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553
go: finding golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6
go: finding golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
go: finding golang.org/x/sys v0.0.0-20191210023423-ac6580df4449
go: finding golang.org/x/text v0.3.2
go: finding golang.org/x/time v0.0.0-20191024005414-555d28b269f0
go: finding golang.org/x/tools v0.0.0-20191213183929-27b81bef4ab3
go: finding golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7
go: finding gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485
go: finding gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e
go: finding google.golang.org/api v0.14.0
go: finding google.golang.org/appengine v1.6.5
go: finding google.golang.org/genproto v0.0.0-20191206224255-0243a4be9c8f
go: finding google.golang.org/grpc v1.25.1
go: finding gopkg.in/airbrake/gobrake.v2 v2.0.9
go: finding gopkg.in/alecthomas/kingpin.v2 v2.2.6
go: finding gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15
go: finding gopkg.in/cheggaaa/pb.v1 v1.0.27
go: finding gopkg.in/errgo.v2 v2.1.0
go: finding gopkg.in/fsnotify.v1 v1.4.7
go: finding gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2
go: finding gopkg.in/inf.v0 v0.9.1
go: finding gopkg.in/ini.v1 v1.42.0
go: finding gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: finding gopkg.in/resty.v1 v1.12.0
go: finding gopkg.in/square/go-jose.v2 v2.2.2
go: finding gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
go: finding gopkg.in/yaml.v2 v2.2.7
go: finding gotest.tools v2.2.0+incompatible
go: finding honnef.co/go/tools v0.0.1-2019.2.3
go: finding howett.net/plist v0.0.0-20181124034731-591f970eefbb
go: finding k8s.io/api v0.0.0-20191025225708-5524a3672fbb
go: finding k8s.io/apimachinery v0.0.0-20191025225532-af6325b3a843
go: finding k8s.io/apiserver v0.0.0-20191025230727-b2ee5b48f68d
go: finding k8s.io/client-go v12.0.0+incompatible
go: finding k8s.io/code-generator v0.0.0-20191025225349-fb66f1f7eb3c
go: finding k8s.io/component-base v0.0.0-20191025230438-8282bd277fec
go: finding k8s.io/gengo v0.0.0-20190822140433-26a664648505
go: finding k8s.io/klog v1.0.0
go: finding k8s.io/kube-aggregator v0.0.0-20191025230902-aa872b06629d
go: finding k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf
go: finding k8s.io/utils v0.0.0-20191010214722-8d271d903fe4
go: finding modernc.org/cc v1.0.0
go: finding modernc.org/golex v1.0.0
go: finding modernc.org/mathutil v1.0.0
go: finding modernc.org/strutil v1.0.0
go: finding modernc.org/xc v1.0.0
go: finding mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed
go: finding mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b
go: finding mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f
go: finding rsc.io/binaryregexp v0.2.0
go: finding sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca
go: finding sigs.k8s.io/yaml v1.1.0
go: finding sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4
go list -m: github.com/terraform-providers/[email protected]+incompatible: invalid version: +incompatible suffix not allowed: module contains a go.mod file, so semantic import versioning is required
go list -m: github.com/terraform-providers/[email protected]+incompatible: invalid version: +incompatible suffix not allowed: module contains a go.mod file, so semantic import versioning is required
go list -m: github.com/terraform-providers/[email protected]+incompatible: invalid version: +incompatible suffix not allowed: module contains a go.mod file, so semantic import versioning is required
go list -m: k8s.io/[email protected]+incompatible: invalid version: +incompatible suffix not allowed: module contains a go.mod file, so semantic import versioning is required

View the update logs.

Panic when running brew version

The brew version doesn't work but the GitHub release does.

$ brew install k2tf

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/cask-versions, homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 42 formulae.
==> Updated Casks
Updated 26 casks.

==> Downloading https://ghcr.io/v2/homebrew/core/k2tf/manifests/0.6.2
Already downloaded: /Users/abc/Library/Caches/Homebrew/downloads/cde3ca288522e85335e150dd0ffb4faf397940002e97ae577c0ab15f3111fd13--k2tf-0.6.2.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/k2tf/blobs/sha256:6b965773a6297
Already downloaded: /Users/abc/Library/Caches/Homebrew/downloads/399090f82e9206bb0d3b5e2b708cd7e31f64810df859943f055343ca00473cd3--k2tf--0.6.2.big_sur.bottle.tar.gz
==> Pouring k2tf--0.6.2.big_sur.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/k2tf/0.6.2: 59 files, 59MB

$ k2tf
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff2036ac9e]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff2036ac9e
stack: frame={sp:0x7ffeefbff438, fp:0x7ffeefbff488} stack=[0x7ffeefb804d8,0x7ffeefbff540)
0x00007ffeefbff338:  0x01007ffeefbff358  0x0000000000000004
0x00007ffeefbff348:  0x000000000000001f  0x00007fff2036ac9e
0x00007ffeefbff358:  0x0b01dfacedebac1e  0x0000000000000001
0x00007ffeefbff368:  0x0000000004037451 <runtime.throw+0x0000000000000071>  0x00007ffeefbff408
0x00007ffeefbff378:  0x0000000005c95f95  0x00007ffeefbff3c0
0x00007ffeefbff388:  0x0000000004037708 <runtime.fatalthrow.func1+0x0000000000000048>  0x000000000715f4a0
0x00007ffeefbff398:  0x0000000000000001  0x0000000000000001
0x00007ffeefbff3a8:  0x00007ffeefbff408  0x0000000004037451 <runtime.throw+0x0000000000000071>
0x00007ffeefbff3b8:  0x000000000715f4a0  0x00007ffeefbff3f8
0x00007ffeefbff3c8:  0x0000000004037690 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff3d8
0x00007ffeefbff3d8:  0x00000000040376c0 <runtime.fatalthrow.func1+0x0000000000000000>  0x000000000715f4a0
0x00007ffeefbff3e8:  0x0000000004037451 <runtime.throw+0x0000000000000071>  0x00007ffeefbff408
0x00007ffeefbff3f8:  0x00007ffeefbff428  0x0000000004037451 <runtime.throw+0x0000000000000071>
0x00007ffeefbff408:  0x00007ffeefbff410  0x0000000004037480 <runtime.throw.func1+0x0000000000000000>
0x00007ffeefbff418:  0x0000000005cb5fab  0x000000000000002a
0x00007ffeefbff428:  0x00007ffeefbff478  0x000000000404ceb6 <runtime.sigpanic+0x0000000000000396>
0x00007ffeefbff438: <0x0000000005cb5fab  0x0000000006eac640
0x00007ffeefbff448:  0x00007ffeefbff4b8  0x000000000402a246 <runtime.(*mheap).allocSpan+0x0000000000000546>
0x00007ffeefbff458:  0x000000c00057a000  0x0000000000002000
0x00007ffeefbff468:  0x000000c000000008  0x0000000000000000
0x00007ffeefbff478:  0x00007ffeefbff4c0 !0x00007fff2036ac9e
0x00007ffeefbff488: >0x00007ffeefbff4c0  0x0000000007034000
0x00007ffeefbff498:  0x000000000000048e  0x0000000004e817e5 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005>
0x00007ffeefbff4a8:  0x000000000406a49f <runtime.syscall+0x000000000000001f>  0x000000c0001bf710
0x00007ffeefbff4b8:  0x0000000004069e0c <runtime.nanotime_trampoline+0x000000000000000c>  0x000000c0001bf6e0
0x00007ffeefbff4c8:  0x00000000040682f0 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000001
0x00007ffeefbff4d8:  0x0000000004015000 <runtime.mapaccess1_fast64+0x00000000000000e0>  0x5000000000001018
0x00007ffeefbff4e8:  0x0000000000000000  0x00000000071964d8
0x00007ffeefbff4f8:  0x0000000000000948  0x000000c0000001a0
0x00007ffeefbff508:  0x0000000004066409 <runtime.systemstack+0x0000000000000049>  0x0000000000000004
0x00007ffeefbff518:  0x0000000005fcde58  0x000000000715f4a0
0x00007ffeefbff528:  0x00007ffeefbff578  0x0000000004066305 <runtime.mstart+0x0000000000000005>
0x00007ffeefbff538:  0x00000000040662bd <runtime.rt0_go+0x000000000000013d>
runtime.throw({0x5cb5fab, 0x6eac640})
	runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff2036ac9e
stack: frame={sp:0x7ffeefbff438, fp:0x7ffeefbff488} stack=[0x7ffeefb804d8,0x7ffeefbff540)
0x00007ffeefbff338:  0x01007ffeefbff358  0x0000000000000004
0x00007ffeefbff348:  0x000000000000001f  0x00007fff2036ac9e
0x00007ffeefbff358:  0x0b01dfacedebac1e  0x0000000000000001
0x00007ffeefbff368:  0x0000000004037451 <runtime.throw+0x0000000000000071>  0x00007ffeefbff408
0x00007ffeefbff378:  0x0000000005c95f95  0x00007ffeefbff3c0
0x00007ffeefbff388:  0x0000000004037708 <runtime.fatalthrow.func1+0x0000000000000048>  0x000000000715f4a0
0x00007ffeefbff398:  0x0000000000000001  0x0000000000000001
0x00007ffeefbff3a8:  0x00007ffeefbff408  0x0000000004037451 <runtime.throw+0x0000000000000071>
0x00007ffeefbff3b8:  0x000000000715f4a0  0x00007ffeefbff3f8
0x00007ffeefbff3c8:  0x0000000004037690 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff3d8
0x00007ffeefbff3d8:  0x00000000040376c0 <runtime.fatalthrow.func1+0x0000000000000000>  0x000000000715f4a0
0x00007ffeefbff3e8:  0x0000000004037451 <runtime.throw+0x0000000000000071>  0x00007ffeefbff408
0x00007ffeefbff3f8:  0x00007ffeefbff428  0x0000000004037451 <runtime.throw+0x0000000000000071>
0x00007ffeefbff408:  0x00007ffeefbff410  0x0000000004037480 <runtime.throw.func1+0x0000000000000000>
0x00007ffeefbff418:  0x0000000005cb5fab  0x000000000000002a
0x00007ffeefbff428:  0x00007ffeefbff478  0x000000000404ceb6 <runtime.sigpanic+0x0000000000000396>
0x00007ffeefbff438: <0x0000000005cb5fab  0x0000000006eac640
0x00007ffeefbff448:  0x00007ffeefbff4b8  0x000000000402a246 <runtime.(*mheap).allocSpan+0x0000000000000546>
0x00007ffeefbff458:  0x000000c00057a000  0x0000000000002000
0x00007ffeefbff468:  0x000000c000000008  0x0000000000000000
0x00007ffeefbff478:  0x00007ffeefbff4c0 !0x00007fff2036ac9e
0x00007ffeefbff488: >0x00007ffeefbff4c0  0x0000000007034000
0x00007ffeefbff498:  0x000000000000048e  0x0000000004e817e5 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005>
0x00007ffeefbff4a8:  0x000000000406a49f <runtime.syscall+0x000000000000001f>  0x000000c0001bf710
0x00007ffeefbff4b8:  0x0000000004069e0c <runtime.nanotime_trampoline+0x000000000000000c>  0x000000c0001bf6e0
0x00007ffeefbff4c8:  0x00000000040682f0 <runtime.asmcgocall+0x0000000000000070>  0x0000000000000001
0x00007ffeefbff4d8:  0x0000000004015000 <runtime.mapaccess1_fast64+0x00000000000000e0>  0x5000000000001018
0x00007ffeefbff4e8:  0x0000000000000000  0x00000000071964d8
0x00007ffeefbff4f8:  0x0000000000000948  0x000000c0000001a0
0x00007ffeefbff508:  0x0000000004066409 <runtime.systemstack+0x0000000000000049>  0x0000000000000004
0x00007ffeefbff518:  0x0000000005fcde58  0x000000000715f4a0
0x00007ffeefbff528:  0x00007ffeefbff578  0x0000000004066305 <runtime.mstart+0x0000000000000005>
0x00007ffeefbff538:  0x00000000040662bd <runtime.rt0_go+0x000000000000013d>
runtime.sigpanic()
	runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall, locked to thread]:
syscall.syscall(0x4e817e0, 0x1, 0x40487413, 0xc0001bf7a0)
	runtime/sys_darwin.go:22 +0x3b fp=0xc0001bf710 sp=0xc0001bf6f0 pc=0x4064cfb
syscall.syscall(0x40b84a6, 0xc00054ca00, 0xc0001bf7c8, 0x40b83d8)
	<autogenerated>:1 +0x26 fp=0xc0001bf758 sp=0xc0001bf710 pc=0x406ac66
golang.org/x/sys/unix.ioctl(0x5c64973, 0x4, 0x100000449dbbc)
	golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:690 +0x39 fp=0xc0001bf788 sp=0xc0001bf758 pc=0x4e81339
golang.org/x/sys/unix.IoctlGetTermios(...)
	golang.org/x/[email protected]/unix/ioctl.go:73
github.com/mattn/go-isatty.IsTerminal(0x5c64973)
	github.com/mattn/[email protected]/isatty_bsd.go:10 +0x50 fp=0xc0001bf7f8 sp=0xc0001bf788 pc=0x50fd7b0
github.com/fatih/color.init()
	github.com/fatih/[email protected]/color.go:21 +0x7a fp=0xc0001bf830 sp=0xc0001bf7f8 pc=0x50ff7da
runtime.doInit(0x70423a0)
	runtime/proc.go:6498 +0x123 fp=0xc0001bf968 sp=0xc0001bf830 pc=0x4046dc3
runtime.doInit(0x704e360)
	runtime/proc.go:6475 +0x71 fp=0xc0001bfaa0 sp=0xc0001bf968 pc=0x4046d11
runtime.doInit(0x7052400)
	runtime/proc.go:6475 +0x71 fp=0xc0001bfbd8 sp=0xc0001bfaa0 pc=0x4046d11
runtime.doInit(0x7059080)
	runtime/proc.go:6475 +0x71 fp=0xc0001bfd10 sp=0xc0001bfbd8 pc=0x4046d11
runtime.doInit(0x7046ac0)
	runtime/proc.go:6475 +0x71 fp=0xc0001bfe48 sp=0xc0001bfd10 pc=0x4046d11
runtime.doInit(0x70512e0)
	runtime/proc.go:6475 +0x71 fp=0xc0001bff80 sp=0xc0001bfe48 pc=0x4046d11
runtime.main()
	runtime/proc.go:238 +0x1e6 fp=0xc0001bffe0 sp=0xc0001bff80 pc=0x4039d66
runtime.goexit()
	runtime/asm_amd64.s:1581 +0x1 fp=0xc0001bffe8 sp=0xc0001bffe0 pc=0x40685e1

goroutine 19 [chan receive]:
k8s.io/klog/v2.(*loggingT).flushDaemon(0x0)
	k8s.io/klog/[email protected]/klog.go:1164 +0x6a
created by k8s.io/klog/v2.init.0
	k8s.io/klog/[email protected]/klog.go:418 +0xfb

Does the license apply to the output of this tool?

Sorry as this isn't specific to this project, but I haven't found a good answer elsewhere.

Does using the output of this tool have any catches to it (i.e disclosing source, license notice, copyleft)? I didn't think so but wanted to be sure.

HCL doesn't render Deployment properly if multiple containers defined

Second container block incorrectly named 'tty'.

resource "kubernetes_deployment" "backend_api" {
  metadata {
    name = "backend-api"
  }
  spec {
    selector {
      match_labels {
        app = "backend-api"
      }
    }
    template {
      metadata {
        labels {
          app = "backend-api"
        }
      }
      spec {
        container {
          name  = "esp"
          image = "gcr.io/image:1"
          args  = ["--ssl_port", "443"]
          port {
            container_port = 443
            protocol       = "TCP"
          }
        }
        tty {
          name    = "api"
          image   = "gcr.io/project/backend-api:0.3.15"
          command = ["/root/backend-api"]
        }
      }
    }
  }
}

Fails to build on Mac (OSX High Sierra 10.13.6, Go 1.13.5)

I get the following error when trying to build from source:

$ make build
go build -v
get "k8s.io/client-go": found meta tag get.metaImport{Prefix:"k8s.io/client-go", VCS:"git", RepoRoot:"https://github.com/kubernetes/client-go"} at //k8s.io/client-go?go-get=1
go: github.com/terraform-providers/[email protected] requires
        github.com/keybase/[email protected]: invalid pseudo-version: does not match version-control timestamp (2019-04-16T18:20:11Z)
make: *** [build] Error 1

$ go version
go version go1.13.5 darwin/amd64

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.