gavinbunney / terraform-provider-kubectl

Terraform provider to handle raw kubernetes manifest yaml files
https://registry.terraform.io/providers/gavinbunney/kubectl
Mozilla Public License 2.0
609 stars 102 forks source link

Provider produced inconsistent final plan #279

Open jyothi-balla opened 10 months ago

jyothi-balla commented 10 months ago

kubectl_manifest gives error when we update the yaml file during terraform apply

When expanding the plan for module.aks_base_config.kubectl_manifest.store_azure_info[0] to include new values learned so far during apply, provider "registry.terraform.io/gavinbunney/kubectl" produced an invalid new value for .yaml_body_parsed: was cty.StringVal(.... This is a bug in the provider, which should be reported in the provider's own issue tracker.

Using data "kubectl_file_documents" .. and

resource "kubectl_manifest" "store_azure_info" {
  count      = length(split("\n---\n", file("${path.module}/manifests/ 

Kubectl provider version - 1.14.0 Terraform v1.3.5

alekc commented 7 months ago

A known bug due to the lack of development on this provider. Try to use this fork

terraform {
  required_providers {
    kubectl = {
      source = "alekc/kubectl"
      version = "2.0.4"
    }
  }
}
omerfsen commented 7 months ago

Thank you @alekc It seems it is not maintained since last 2 years. I will test yours to see it is %100 compatible.