ovh/terraform-provider-ovh

[BUG] Incorrect Kubeconfig exported with output command

Closed this issue · 4 comments

Describe the bug

When running terraform output kubeconfig > terraform-ovh.yml command, there are some incorrect characters (EOT) at the head & the end of the file.

<<EOT
apiVersion: v1
clusters:
- cluster:
[...]
EOT

Versions

  • Running on MacOS 13
  • Terraform & provider version
❯ terraform -v
Terraform v1.5.7
on darwin_amd64
+ provider registry.terraform.io/ovh/ovh v0.34.0

Your version of Terraform is out of date! The latest version
is 1.6.3. You can update by downloading from https://www.terraform.io/downloads.html

Affected Resource(s)

OVH Kubernetes Managed services

Terraform Configuration Files

I've just made a copy/paste from the official documentation here

Expected Behavior

The kubeconfig file generated is operationnal and we don't need to edit it before using it

Actual Behavior

Actual kubeconfig cannot be used to connect to the cluster

Steps to Reproduce

Follow the official documentation

Reproduce with latest version of Terraform

❯ terraform -v
Terraform v1.6.3
on darwin_amd64
+ provider registry.terraform.io/ovh/ovh v0.34.0

Reproduce with latest version on linux

# terraform -v
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/ovh/ovh v0.34.0

Hello @yodamad and thanks for your issue.

the behaviour of terraform output changed with this commit in 0.15
In order to remove the EOTyou have to use terraform output -raw

I know that we have a documentation page that mentions the old behavior. I will update it.

Great