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
614 stars 105 forks source link

Provider produced inconsistent final plan #162

Open pmayweg-mms opened 2 years ago

pmayweg-mms commented 2 years ago

When using the 1.14.0 provider we receive the following error while applying our change:

Error: Provider produced inconsistent final plan

When expanding the plan for module.gitops.kubectl_manifest.update_helm_operator_crd[0] to include new values learned so far during apply, provider "registry.terraform.io/gavinbunney/kubectl" produced an invalid new value for .apply_only: was cty.False, but now null.

This is a bug in the provider, which should be reported in the provider's own issue tracker.

After we have switched back to 1.13.1 we can apply without any error.

bdelage commented 2 years ago

We've been having a similar issue. I'm trying to narrow it down. Here is a piece of code that triggers the issue.

terraform {
  required_version = ">= 0.13"

  required_providers {
    kubectl = {
      source  = "gavinbunney/kubectl"
      version = ">= 1.14.0"
    }
  }
}

provider "kubectl" {
  load_config_file = true
}

locals {
  date    = tonumber(formatdate("YYYYM", timestamp()))
  is_even = local.date % 2 == 0
}

resource "kubectl_manifest" "test" {
  yaml_body = <<YAML
apiVersion: v1
kind: ConfigMap
metadata:
  name: test-cm
  namespace: test-provider
data:
  test: "static"
  month_parity: "${local.is_even ? "even" : "odd"}"
YAML
}

Here are the TRACE TF_LOG

tf apply
2022/03/29 10:30:39 [INFO] Terraform version: 0.14.11
2022/03/29 10:30:39 [INFO] Go runtime version: go1.15.6
2022/03/29 10:30:39 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/2.2.3/versions/0.14.11/terraform", "apply"}
2022/03/29 10:30:39 [DEBUG] Attempting to open CLI config file: /Users/xxx/.terraformrc
2022/03/29 10:30:39 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2022/03/29 10:30:39 Loading CLI configuration from /Users/xxx/.terraform.d/credentials.tfrc.json
2022/03/29 10:30:39 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2022/03/29 10:30:39 [DEBUG] ignoring non-existing provider search directory /Users/xxx/.terraform.d/plugins
2022/03/29 10:30:39 [DEBUG] ignoring non-existing provider search directory /Users/xxx/Library/Application Support/io.terraform/plugins
2022/03/29 10:30:39 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2022/03/29 10:30:39 [INFO] CLI command args: []string{"apply"}
2022/03/29 10:30:39 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2022/03/29 10:30:39 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2022/03/29 10:30:39 [DEBUG] New state was assigned lineage "cdfa108a-737e-9064-6213-64b81e15c6db"
2022/03/29 10:30:39 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2022/03/29 10:30:39 [TRACE] Meta.Backend: instantiated backend of type <nil>
2022/03/29 10:30:39 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers
2022/03/29 10:30:39 [TRACE] getproviders.SearchLocalDirectory: .terraform/providers is a symlink to .terraform/providers
2022/03/29 10:30:39 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/gavinbunney/kubectl v1.14.0 for darwin_amd64 at .terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64
2022/03/29 10:30:39 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/template v2.2.0 for darwin_amd64 at .terraform/providers/registry.terraform.io/hashicorp/template/2.2.0/darwin_amd64
2022/03/29 10:30:39 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/time v0.7.2 for darwin_amd64 at .terraform/providers/registry.terraform.io/hashicorp/time/0.7.2/darwin_amd64
2022/03/29 10:30:39 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/time/0.7.2/darwin_amd64 as a candidate package for registry.terraform.io/hashicorp/time 0.7.2
2022/03/29 10:30:39 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64 as a candidate package for registry.terraform.io/gavinbunney/kubectl 1.14.0
2022/03/29 10:30:39 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/template/2.2.0/darwin_amd64 as a candidate package for registry.terraform.io/hashicorp/template 2.2.0
2022/03/29 10:30:40 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers
2022/03/29 10:30:40 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers
2022/03/29 10:30:40 [DEBUG] checking for provisioner in "."
2022/03/29 10:30:40 [DEBUG] checking for provisioner in "/usr/local/Cellar/tfenv/2.2.3/versions/0.14.11"
2022/03/29 10:30:40 [INFO] Failed to read plugin lock file .terraform/plugins/darwin_amd64/lock.json: open .terraform/plugins/darwin_amd64/lock.json: no such file or directory
2022/03/29 10:30:40 [TRACE] Meta.Backend: backend <nil> does not support operations, so wrapping it in a local backend
2022/03/29 10:30:40 [INFO] backend/local: starting Apply operation
2022/03/29 10:30:40 [TRACE] backend/local: requesting state manager for workspace "default"
2022/03/29 10:30:40 [TRACE] backend/local: state manager for workspace "default" will:
 - read initial snapshot from terraform.tfstate
 - write new snapshots to terraform.tfstate
 - create any backup at terraform.tfstate.backup
2022/03/29 10:30:40 [TRACE] backend/local: requesting state lock for workspace "default"
2022/03/29 10:30:40 [TRACE] statemgr.Filesystem: preparing to manage state snapshots at terraform.tfstate
2022/03/29 10:30:40 [TRACE] statemgr.Filesystem: existing snapshot has lineage "9b372a60-6680-cf8e-ee31-ee06e97e91c0" serial 73
2022/03/29 10:30:40 [TRACE] statemgr.Filesystem: locking terraform.tfstate using fcntl flock
2022/03/29 10:30:40 [TRACE] statemgr.Filesystem: writing lock metadata to .terraform.tfstate.lock.info
2022/03/29 10:30:40 [TRACE] backend/local: reading remote state for workspace "default"
2022/03/29 10:30:40 [TRACE] statemgr.Filesystem: reading latest snapshot from terraform.tfstate
2022/03/29 10:30:40 [TRACE] statemgr.Filesystem: read snapshot with lineage "9b372a60-6680-cf8e-ee31-ee06e97e91c0" serial 73
2022/03/29 10:30:40 [TRACE] backend/local: retrieving local state snapshot for workspace "default"
2022/03/29 10:30:40 [TRACE] backend/local: building context for current working directory
2022/03/29 10:30:40 [TRACE] terraform.NewContext: starting
2022/03/29 10:30:40 [TRACE] terraform.NewContext: loading provider schemas
2022/03/29 10:30:40 [TRACE] LoadSchemas: retrieving schema for provider type "registry.terraform.io/gavinbunney/kubectl"
2022-03-29T10:30:40.192-0400 [INFO]  plugin: configuring client automatic mTLS
2022-03-29T10:30:40.217-0400 [DEBUG] plugin: starting plugin: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0 args=[.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0]
2022-03-29T10:30:40.220-0400 [DEBUG] plugin: plugin started: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0 pid=44786
2022-03-29T10:30:40.221-0400 [DEBUG] plugin: waiting for RPC address: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0
2022-03-29T10:30:40.256-0400 [INFO]  plugin.terraform-provider-kubectl_v1.14.0: configuring server automatic mTLS: timestamp=2022-03-29T10:30:40.256-0400
2022-03-29T10:30:40.290-0400 [DEBUG] plugin: using plugin: version=5
2022-03-29T10:30:40.291-0400 [DEBUG] plugin.terraform-provider-kubectl_v1.14.0: plugin address: address=/var/folders/rg/dx0h8hb90zqgzs17frdpw_m00000gn/T/plugin035369137 network=unix timestamp=2022-03-29T10:30:40.290-0400
2022/03/29 10:30:40 [TRACE] GRPCProvider: GetSchema
2022-03-29T10:30:40.339-0400 [TRACE] plugin.stdio: waiting for stdio data
2022/03/29 10:30:40 [TRACE] GRPCProvider: Close
2022-03-29T10:30:40.342-0400 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-29T10:30:40.344-0400 [DEBUG] plugin: plugin process exited: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0 pid=44786
2022-03-29T10:30:40.344-0400 [DEBUG] plugin: plugin exited
2022/03/29 10:30:40 [TRACE] terraform.NewContext: complete
2022/03/29 10:30:40 [TRACE] backend/local: finished building terraform.Context
2022/03/29 10:30:40 [TRACE] backend/local: requesting interactive input, if necessary
2022/03/29 10:30:40 [TRACE] Context.Input: Prompting for provider arguments
2022/03/29 10:30:40 [TRACE] Context.Input: Provider provider.kubectl declared at main.tf:153,1-19
2022/03/29 10:30:40 [TRACE] Context.Input: Input for provider.kubectl: map[string]cty.Value{}
2022/03/29 10:30:40 [TRACE] backend/local: running validation operation
2022/03/29 10:30:40 [INFO] terraform: building graph: GraphTypeValidate
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ConfigTransformer
2022/03/29 10:30:40 [TRACE] ConfigTransformer: Starting for path:
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ConfigTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeValidatableResource
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.RootVariableTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.RootVariableTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ModuleVariableTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ModuleVariableTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.LocalTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.LocalTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeValidatableResource
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.OutputTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.OutputTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.OrphanResourceInstanceTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.OrphanResourceInstanceTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.StateTransformer
2022/03/29 10:30:40 [TRACE] StateTransformer: state is empty, so nothing to do
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.StateTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.AttachStateTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.AttachStateTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.OrphanOutputTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.OrphanOutputTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.AttachResourceConfigTransformer
2022/03/29 10:30:40 [TRACE] AttachResourceConfigTransformer: attaching to "kubectl_manifest.test" (*terraform.NodeValidatableResource) config from main.tf:162,1-35
2022/03/29 10:30:40 [TRACE] AttachResourceConfigTransformer: attaching provider meta configs to kubectl_manifest.test
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.AttachResourceConfigTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.MissingProvisionerTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.MissingProvisionerTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ProvisionerTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ProvisionerTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.graphTransformerMulti
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderConfigTransformer
2022/03/29 10:30:40 [TRACE] ProviderConfigTransformer: attaching to "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" provider configuration from main.tf:153,1-19
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderConfigTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeValidatableResource
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.MissingProviderTransformer
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.MissingProviderTransformer (no changes)
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderTransformer
2022/03/29 10:30:40 [TRACE] ProviderTransformer: exact match for provider["registry.terraform.io/gavinbunney/kubectl"] serving kubectl_manifest.test
2022/03/29 10:30:40 [DEBUG] ProviderTransformer: "kubectl_manifest.test" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/gavinbunney/kubectl"]
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeValidatableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.PruneProviderTransformer
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.PruneProviderTransformer (no changes)
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ParentProviderTransformer
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ParentProviderTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.graphTransformerMulti with new graph:
  kubectl_manifest.test - *terraform.NodeValidatableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.RemovedModuleTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.RemovedModuleTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.AttachSchemaTransformer
2022/03/29 10:30:40 [TRACE] AttachSchemaTransformer: attaching provider config schema to provider["registry.terraform.io/gavinbunney/kubectl"]
2022/03/29 10:30:40 [TRACE] AttachSchemaTransformer: attaching resource schema to kubectl_manifest.test
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.AttachSchemaTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ModuleExpansionTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ModuleExpansionTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ReferenceTransformer
2022/03/29 10:30:40 [DEBUG] ReferenceTransformer: "local.is_even (expand)" references: [local.date (expand)]
2022/03/29 10:30:40 [DEBUG] ReferenceTransformer: "local.date (expand)" references: []
2022/03/29 10:30:40 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" references: []
2022/03/29 10:30:40 [DEBUG] ReferenceTransformer: "kubectl_manifest.test" references: [local.is_even (expand)]
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ReferenceTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeValidatableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.AttachDependenciesTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.AttachDependenciesTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.attachDataResourceDependenciesTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.attachDataResourceDependenciesTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.TargetsTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.TargetsTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ForcedCBDTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ForcedCBDTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.CountBoundaryTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.CountBoundaryTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeValidatableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    kubectl_manifest.test - *terraform.NodeValidatableResource
    local.date (expand) - *terraform.nodeExpandLocal
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.CloseProviderTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.CloseProviderTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeValidatableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    kubectl_manifest.test - *terraform.NodeValidatableResource
    local.date (expand) - *terraform.nodeExpandLocal
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
    kubectl_manifest.test - *terraform.NodeValidatableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.CloseRootModuleTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.CloseRootModuleTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeValidatableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    kubectl_manifest.test - *terraform.NodeValidatableResource
    local.date (expand) - *terraform.nodeExpandLocal
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
    kubectl_manifest.test - *terraform.NodeValidatableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  root - *terraform.nodeCloseModule
    meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.TransitiveReductionTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.TransitiveReductionTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeValidatableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    kubectl_manifest.test - *terraform.NodeValidatableResource
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
    kubectl_manifest.test - *terraform.NodeValidatableResource
  root - *terraform.nodeCloseModule
    meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
  ------
2022/03/29 10:30:40 [DEBUG] Starting graph walk: walkValidate
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "local.date (expand)"
2022/03/29 10:30:40 [TRACE] vertex "local.date (expand)": starting visit (*terraform.nodeExpandLocal)
2022/03/29 10:30:40 [TRACE] vertex "local.date (expand)": expanding dynamic subgraph
2022/03/29 10:30:40 [TRACE] Expanding local: adding local.date as *terraform.NodeLocal
2022/03/29 10:30:40 [TRACE] vertex "local.date (expand)": entering dynamic subgraph
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "provider[\"registry.terraform.io/gavinbunney/kubectl\"]"
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "local.date"
2022/03/29 10:30:40 [TRACE] vertex "local.date": starting visit (*terraform.NodeLocal)
2022/03/29 10:30:40 [TRACE] vertex "provider[\"registry.terraform.io/gavinbunney/kubectl\"]": starting visit (*terraform.NodeApplyableProvider)
2022/03/29 10:30:40 [TRACE] vertex "local.date": visit complete
2022/03/29 10:30:40 [TRACE] vertex "local.date (expand)": dynamic subgraph completed successfully
2022/03/29 10:30:40 [TRACE] vertex "local.date (expand)": visit complete
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "local.is_even (expand)"
2022/03/29 10:30:40 [TRACE] vertex "local.is_even (expand)": starting visit (*terraform.nodeExpandLocal)
2022/03/29 10:30:40 [TRACE] vertex "local.is_even (expand)": expanding dynamic subgraph
2022/03/29 10:30:40 [TRACE] Expanding local: adding local.is_even as *terraform.NodeLocal
2022/03/29 10:30:40 [TRACE] vertex "local.is_even (expand)": entering dynamic subgraph
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "local.is_even"
2022/03/29 10:30:40 [TRACE] vertex "local.is_even": starting visit (*terraform.NodeLocal)
2022-03-29T10:30:40.346-0400 [INFO]  plugin: configuring client automatic mTLS
2022/03/29 10:30:40 [TRACE] vertex "local.is_even": visit complete
2022/03/29 10:30:40 [TRACE] vertex "local.is_even (expand)": dynamic subgraph completed successfully
2022/03/29 10:30:40 [TRACE] vertex "local.is_even (expand)": visit complete
2022-03-29T10:30:40.370-0400 [DEBUG] plugin: starting plugin: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0 args=[.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0]
2022-03-29T10:30:40.373-0400 [DEBUG] plugin: plugin started: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0 pid=44787
2022-03-29T10:30:40.373-0400 [DEBUG] plugin: waiting for RPC address: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0
2022-03-29T10:30:40.410-0400 [INFO]  plugin.terraform-provider-kubectl_v1.14.0: configuring server automatic mTLS: timestamp=2022-03-29T10:30:40.409-0400
2022-03-29T10:30:40.444-0400 [DEBUG] plugin: using plugin: version=5
2022-03-29T10:30:40.444-0400 [DEBUG] plugin.terraform-provider-kubectl_v1.14.0: plugin address: address=/var/folders/rg/dx0h8hb90zqgzs17frdpw_m00000gn/T/plugin003072918 network=unix timestamp=2022-03-29T10:30:40.444-0400
2022/03/29 10:30:40 [TRACE] BuiltinEvalContext: Initialized "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" provider for provider["registry.terraform.io/gavinbunney/kubectl"]
2022-03-29T10:30:40.490-0400 [TRACE] plugin.stdio: waiting for stdio data
2022/03/29 10:30:40 [TRACE] buildProviderConfig for provider["registry.terraform.io/gavinbunney/kubectl"]: using explicit config only
2022/03/29 10:30:40 [TRACE] GRPCProvider: GetSchema
2022/03/29 10:30:40 [TRACE] GRPCProvider: PrepareProviderConfig
2022/03/29 10:30:40 [TRACE] vertex "provider[\"registry.terraform.io/gavinbunney/kubectl\"]": visit complete
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "kubectl_manifest.test"
2022/03/29 10:30:40 [TRACE] vertex "kubectl_manifest.test": starting visit (*terraform.NodeValidatableResource)
2022/03/29 10:30:40 [TRACE] GRPCProvider: ValidateResourceTypeConfig
2022/03/29 10:30:40 [TRACE] vertex "kubectl_manifest.test": visit complete
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "provider[\"registry.terraform.io/gavinbunney/kubectl\"] (close)"
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "meta.count-boundary (EachMode fixup)"
2022/03/29 10:30:40 [TRACE] vertex "meta.count-boundary (EachMode fixup)": starting visit (*terraform.NodeCountBoundary)
2022/03/29 10:30:40 [TRACE] vertex "provider[\"registry.terraform.io/gavinbunney/kubectl\"] (close)": starting visit (*terraform.graphNodeCloseProvider)
2022/03/29 10:30:40 [TRACE] GRPCProvider: Close
2022/03/29 10:30:40 [TRACE] vertex "meta.count-boundary (EachMode fixup)": visit complete
2022-03-29T10:30:40.495-0400 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-29T10:30:40.496-0400 [DEBUG] plugin: plugin process exited: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0 pid=44787
2022-03-29T10:30:40.496-0400 [DEBUG] plugin: plugin exited
2022/03/29 10:30:40 [TRACE] vertex "provider[\"registry.terraform.io/gavinbunney/kubectl\"] (close)": visit complete
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "root"
2022/03/29 10:30:40 [TRACE] vertex "root": starting visit (*terraform.nodeCloseModule)
2022/03/29 10:30:40 [TRACE] vertex "root": visit complete
2022/03/29 10:30:40 [INFO] backend/local: apply calling Plan
2022/03/29 10:30:40 [INFO] terraform: building graph: GraphTypePlan
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ConfigTransformer
2022/03/29 10:30:40 [TRACE] ConfigTransformer: Starting for path:
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ConfigTransformer with new graph:
  kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.RootVariableTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.RootVariableTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ModuleVariableTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ModuleVariableTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.LocalTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.LocalTransformer with new graph:
  kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.OutputTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.OutputTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.OrphanResourceInstanceTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.OrphanResourceInstanceTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.StateTransformer
2022/03/29 10:30:40 [TRACE] StateTransformer: creating nodes for deposed instance objects only
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.StateTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.AttachStateTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.AttachStateTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.OrphanOutputTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.OrphanOutputTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.AttachResourceConfigTransformer
2022/03/29 10:30:40 [TRACE] AttachResourceConfigTransformer: attaching to "kubectl_manifest.test (expand)" (*terraform.nodeExpandPlannableResource) config from main.tf:162,1-35
2022/03/29 10:30:40 [TRACE] AttachResourceConfigTransformer: attaching provider meta configs to kubectl_manifest.test (expand)
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.AttachResourceConfigTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.MissingProvisionerTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.MissingProvisionerTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ProvisionerTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ProvisionerTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.graphTransformerMulti
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderConfigTransformer
2022/03/29 10:30:40 [TRACE] ProviderConfigTransformer: attaching to "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" provider configuration from main.tf:153,1-19
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderConfigTransformer with new graph:
  kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.MissingProviderTransformer
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.MissingProviderTransformer (no changes)
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderTransformer
2022/03/29 10:30:40 [TRACE] ProviderTransformer: exact match for provider["registry.terraform.io/gavinbunney/kubectl"] serving kubectl_manifest.test (expand)
2022/03/29 10:30:40 [DEBUG] ProviderTransformer: "kubectl_manifest.test (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/gavinbunney/kubectl"]
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderTransformer with new graph:
  kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.PruneProviderTransformer
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.PruneProviderTransformer (no changes)
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ParentProviderTransformer
2022/03/29 10:30:40 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ParentProviderTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.graphTransformerMulti with new graph:
  kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.RemovedModuleTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.RemovedModuleTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.AttachSchemaTransformer
2022/03/29 10:30:40 [TRACE] AttachSchemaTransformer: attaching provider config schema to provider["registry.terraform.io/gavinbunney/kubectl"]
2022/03/29 10:30:40 [TRACE] AttachSchemaTransformer: attaching resource schema to kubectl_manifest.test (expand)
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.AttachSchemaTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ModuleExpansionTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ModuleExpansionTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ReferenceTransformer
2022/03/29 10:30:40 [DEBUG] ReferenceTransformer: "kubectl_manifest.test (expand)" references: [local.is_even (expand)]
2022/03/29 10:30:40 [DEBUG] ReferenceTransformer: "local.date (expand)" references: []
2022/03/29 10:30:40 [DEBUG] ReferenceTransformer: "local.is_even (expand)" references: [local.date (expand)]
2022/03/29 10:30:40 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" references: []
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ReferenceTransformer with new graph:
  kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.AttachDependenciesTransformer
2022/03/29 10:30:40 [TRACE] AttachDependenciesTransformer: kubectl_manifest.test depends on []
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.AttachDependenciesTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.attachDataResourceDependenciesTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.attachDataResourceDependenciesTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.TargetsTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.TargetsTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ForcedCBDTransformer
2022/03/29 10:30:40 [TRACE] ForcedCBDTransformer: "kubectl_manifest.test (expand)" (*terraform.nodeExpandPlannableResource) has no CBD descendent, so skipping
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ForcedCBDTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.CountBoundaryTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.CountBoundaryTransformer with new graph:
  kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
    local.date (expand) - *terraform.nodeExpandLocal
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.CloseProviderTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.CloseProviderTransformer with new graph:
  kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
    local.date (expand) - *terraform.nodeExpandLocal
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
    kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.CloseRootModuleTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.CloseRootModuleTransformer with new graph:
  kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
    local.date (expand) - *terraform.nodeExpandLocal
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
    kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  root - *terraform.nodeCloseModule
    meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.TransitiveReductionTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.TransitiveReductionTransformer with new graph:
  kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
    kubectl_manifest.test (expand) - *terraform.nodeExpandPlannableResource
  root - *terraform.nodeCloseModule
    meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
  ------
2022/03/29 10:30:40 [DEBUG] Starting graph walk: walkPlan
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "provider[\"registry.terraform.io/gavinbunney/kubectl\"]"
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "local.date (expand)"
2022/03/29 10:30:40 [TRACE] vertex "provider[\"registry.terraform.io/gavinbunney/kubectl\"]": starting visit (*terraform.NodeApplyableProvider)
2022/03/29 10:30:40 [TRACE] vertex "local.date (expand)": starting visit (*terraform.nodeExpandLocal)
2022/03/29 10:30:40 [TRACE] vertex "local.date (expand)": expanding dynamic subgraph
2022/03/29 10:30:40 [TRACE] Expanding local: adding local.date as *terraform.NodeLocal
2022/03/29 10:30:40 [TRACE] vertex "local.date (expand)": entering dynamic subgraph
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "local.date"
2022/03/29 10:30:40 [TRACE] vertex "local.date": starting visit (*terraform.NodeLocal)
2022/03/29 10:30:40 [TRACE] vertex "local.date": visit complete
2022/03/29 10:30:40 [TRACE] vertex "local.date (expand)": dynamic subgraph completed successfully
2022/03/29 10:30:40 [TRACE] vertex "local.date (expand)": visit complete
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "local.is_even (expand)"
2022/03/29 10:30:40 [TRACE] vertex "local.is_even (expand)": starting visit (*terraform.nodeExpandLocal)
2022/03/29 10:30:40 [TRACE] vertex "local.is_even (expand)": expanding dynamic subgraph
2022/03/29 10:30:40 [TRACE] Expanding local: adding local.is_even as *terraform.NodeLocal
2022/03/29 10:30:40 [TRACE] vertex "local.is_even (expand)": entering dynamic subgraph
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "local.is_even"
2022/03/29 10:30:40 [TRACE] vertex "local.is_even": starting visit (*terraform.NodeLocal)
2022/03/29 10:30:40 [TRACE] vertex "local.is_even": visit complete
2022/03/29 10:30:40 [TRACE] vertex "local.is_even (expand)": dynamic subgraph completed successfully
2022-03-29T10:30:40.498-0400 [INFO]  plugin: configuring client automatic mTLS
2022/03/29 10:30:40 [TRACE] vertex "local.is_even (expand)": visit complete
2022-03-29T10:30:40.522-0400 [DEBUG] plugin: starting plugin: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0 args=[.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0]
2022-03-29T10:30:40.527-0400 [DEBUG] plugin: plugin started: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0 pid=44788
2022-03-29T10:30:40.527-0400 [DEBUG] plugin: waiting for RPC address: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0
2022-03-29T10:30:40.562-0400 [INFO]  plugin.terraform-provider-kubectl_v1.14.0: configuring server automatic mTLS: timestamp=2022-03-29T10:30:40.561-0400
2022-03-29T10:30:40.595-0400 [DEBUG] plugin: using plugin: version=5
2022-03-29T10:30:40.595-0400 [DEBUG] plugin.terraform-provider-kubectl_v1.14.0: plugin address: address=/var/folders/rg/dx0h8hb90zqgzs17frdpw_m00000gn/T/plugin083741651 network=unix timestamp=2022-03-29T10:30:40.595-0400
2022/03/29 10:30:40 [TRACE] BuiltinEvalContext: Initialized "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" provider for provider["registry.terraform.io/gavinbunney/kubectl"]
2022/03/29 10:30:40 [TRACE] buildProviderConfig for provider["registry.terraform.io/gavinbunney/kubectl"]: using explicit config only
2022/03/29 10:30:40 [TRACE] GRPCProvider: GetSchema
2022-03-29T10:30:40.639-0400 [TRACE] plugin.stdio: waiting for stdio data
2022/03/29 10:30:40 [TRACE] GRPCProvider: Configure
2022-03-29T10:30:40.643-0400 [DEBUG] plugin.terraform-provider-kubectl_v1.14.0: 2022/03/29 10:30:40 [DEBUG] Using kubeconfig: /Users/xxx/.kube/kubeconfig
2022/03/29 10:30:40 [TRACE] vertex "provider[\"registry.terraform.io/gavinbunney/kubectl\"]": visit complete
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "kubectl_manifest.test (expand)"
2022/03/29 10:30:40 [TRACE] vertex "kubectl_manifest.test (expand)": starting visit (*terraform.nodeExpandPlannableResource)
2022/03/29 10:30:40 [TRACE] vertex "kubectl_manifest.test (expand)": expanding dynamic subgraph
2022/03/29 10:30:40 [TRACE] vertex "kubectl_manifest.test (expand)": entering dynamic subgraph
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "kubectl_manifest.test"
2022/03/29 10:30:40 [TRACE] vertex "kubectl_manifest.test": starting visit (*terraform.NodePlannableResource)
2022/03/29 10:30:40 [TRACE] vertex "kubectl_manifest.test": expanding dynamic subgraph
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ResourceCountTransformer
2022/03/29 10:30:40 [TRACE] ResourceCountTransformer: adding kubectl_manifest.test as *terraform.NodePlannableResourceInstance
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ResourceCountTransformer with new graph:
  kubectl_manifest.test - *terraform.NodePlannableResourceInstance
  ------
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.OrphanResourceInstanceCountTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.OrphanResourceInstanceCountTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.AttachStateTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.AttachStateTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.TargetsTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.TargetsTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.ReferenceTransformer
2022/03/29 10:30:40 [INFO] ReferenceTransformer: reference not found: "local.is_even"
2022/03/29 10:30:40 [DEBUG] ReferenceTransformer: "kubectl_manifest.test" references: []
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.ReferenceTransformer (no changes)
2022/03/29 10:30:40 [TRACE] Executing graph transform *terraform.RootTransformer
2022/03/29 10:30:40 [TRACE] Completed graph transform *terraform.RootTransformer (no changes)
2022/03/29 10:30:40 [TRACE] vertex "kubectl_manifest.test": entering dynamic subgraph
2022/03/29 10:30:40 [TRACE] dag/walk: visiting "kubectl_manifest.test"
2022/03/29 10:30:40 [TRACE] vertex "kubectl_manifest.test": starting visit (*terraform.NodePlannableResourceInstance)
2022/03/29 10:30:40 [TRACE] ReadResourceInstanceState: reading state for kubectl_manifest.test
2022/03/29 10:30:40 [TRACE] UpgradeResourceState: schema version of kubectl_manifest.test is still 1; calling provider "kubectl" for any other minor fixups
2022/03/29 10:30:40 [TRACE] GRPCProvider: UpgradeResourceState
2022/03/29 10:30:40 [TRACE] GRPCProvider: ReadResource
kubectl_manifest.test: Refreshing state... [id=/api/v1/namespaces/test-provider/configmaps/test-cm]
2022-03-29T10:30:40.649-0400 [DEBUG] plugin.terraform-provider-kubectl_v1.14.0: 2022/03/29 10:30:40 [DEBUG] test-provider/test-cm Unstructed YAML: map[apiVersion:v1 data:map[test:static] kind:ConfigMap metadata:map[name:test-cm namespace:test-provider]]
2022-03-29T10:30:44.977-0400 [DEBUG] plugin.terraform-provider-kubectl_v1.14.0: 2022/03/29 10:30:44 [DEBUG] test-provider/test-cm fetch from kubernetes
2022/03/29 10:30:45 [TRACE] EvalWriteState: using RefreshState for kubectl_manifest.test
2022/03/29 10:30:45 [TRACE] EvalWriteState: recording 0 dependencies for kubectl_manifest.test
2022/03/29 10:30:45 [TRACE] EvalWriteState: writing current state object for kubectl_manifest.test
2022/03/29 10:30:45 [TRACE] Re-validating config for "kubectl_manifest.test"
2022/03/29 10:30:45 [TRACE] GRPCProvider: ValidateResourceTypeConfig
2022/03/29 10:30:45 [TRACE] GRPCProvider: PlanResourceChange
2022-03-29T10:30:45.026-0400 [DEBUG] plugin.terraform-provider-kubectl_v1.14.0: 2022/03/29 10:30:45 [TRACE] yaml_body value interpolated, skipping customized diff
2022/03/29 10:30:45 [TRACE] EvalWriteState: writing current state object for kubectl_manifest.test
2022/03/29 10:30:45 [TRACE] EvalWriteDiff: recorded Update change for kubectl_manifest.test
2022/03/29 10:30:45 [TRACE] vertex "kubectl_manifest.test": visit complete
2022/03/29 10:30:45 [TRACE] vertex "kubectl_manifest.test": dynamic subgraph completed successfully
2022/03/29 10:30:45 [TRACE] vertex "kubectl_manifest.test": visit complete
2022/03/29 10:30:45 [TRACE] vertex "kubectl_manifest.test (expand)": dynamic subgraph completed successfully
2022/03/29 10:30:45 [TRACE] vertex "kubectl_manifest.test (expand)": visit complete
2022/03/29 10:30:45 [TRACE] dag/walk: visiting "provider[\"registry.terraform.io/gavinbunney/kubectl\"] (close)"
2022/03/29 10:30:45 [TRACE] dag/walk: visiting "meta.count-boundary (EachMode fixup)"
2022/03/29 10:30:45 [TRACE] vertex "meta.count-boundary (EachMode fixup)": starting visit (*terraform.NodeCountBoundary)
2022/03/29 10:30:45 [TRACE] vertex "provider[\"registry.terraform.io/gavinbunney/kubectl\"] (close)": starting visit (*terraform.graphNodeCloseProvider)
2022/03/29 10:30:45 [TRACE] vertex "meta.count-boundary (EachMode fixup)": visit complete
2022/03/29 10:30:45 [TRACE] GRPCProvider: Close
2022-03-29T10:30:45.027-0400 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-29T10:30:45.032-0400 [DEBUG] plugin: plugin process exited: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0 pid=44788
2022-03-29T10:30:45.032-0400 [DEBUG] plugin: plugin exited
2022/03/29 10:30:45 [TRACE] vertex "provider[\"registry.terraform.io/gavinbunney/kubectl\"] (close)": visit complete
2022/03/29 10:30:45 [TRACE] dag/walk: visiting "root"
2022/03/29 10:30:45 [TRACE] vertex "root": starting visit (*terraform.nodeCloseModule)
2022/03/29 10:30:45 [TRACE] vertex "root": visit complete

An execution plan has been generated and is shown below.
2022/03/29 10:30:45 [DEBUG] command: asking for input: "Do you want to perform these actions?"
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # kubectl_manifest.test will be updated in-place
  ~ resource "kubectl_manifest" "test" {
        id                      = "/api/v1/namespaces/test-provider/configmaps/test-cm"
        name                    = "test-cm"
      - override_namespace      = "test-provider" -> null
      ~ yaml_body               = (sensitive value)
        # (14 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

2022/03/29 10:30:46 [INFO] backend/local: apply calling Apply
2022/03/29 10:30:46 [INFO] terraform: building graph: GraphTypeApply
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.ConfigTransformer
2022/03/29 10:30:46 [TRACE] ConfigTransformer: Starting for path:
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.ConfigTransformer with new graph:
  kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
  ------
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.RootVariableTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.RootVariableTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.ModuleVariableTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.ModuleVariableTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.LocalTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.LocalTransformer with new graph:
  kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
  ------
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.OutputTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.OutputTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.DiffTransformer
2022/03/29 10:30:46 [TRACE] DiffTransformer starting
2022/03/29 10:30:46 [TRACE] DiffTransformer: found Update change for kubectl_manifest.test
2022/03/29 10:30:46 [TRACE] DiffTransformer: kubectl_manifest.test will be represented by kubectl_manifest.test
2022/03/29 10:30:46 [TRACE] DiffTransformer complete
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.DiffTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
  kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
  ------
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.AttachStateTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.AttachStateTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.OrphanOutputTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.OrphanOutputTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.AttachResourceConfigTransformer
2022/03/29 10:30:46 [TRACE] AttachResourceConfigTransformer: attaching to "kubectl_manifest.test (expand)" (*terraform.nodeExpandApplyableResource) config from main.tf:162,1-35
2022/03/29 10:30:46 [TRACE] AttachResourceConfigTransformer: attaching provider meta configs to kubectl_manifest.test (expand)
2022/03/29 10:30:46 [TRACE] AttachResourceConfigTransformer: attaching to "kubectl_manifest.test" (*terraform.NodeApplyableResourceInstance) config from main.tf:162,1-35
2022/03/29 10:30:46 [TRACE] AttachResourceConfigTransformer: attaching provider meta configs to kubectl_manifest.test
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.AttachResourceConfigTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.MissingProvisionerTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.MissingProvisionerTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.ProvisionerTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.ProvisionerTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.graphTransformerMulti
2022/03/29 10:30:46 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderConfigTransformer
2022/03/29 10:30:46 [TRACE] ProviderConfigTransformer: attaching to "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" provider configuration from main.tf:153,1-19
2022/03/29 10:30:46 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderConfigTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
  kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:46 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.MissingProviderTransformer
2022/03/29 10:30:46 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.MissingProviderTransformer (no changes)
2022/03/29 10:30:46 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderTransformer
2022/03/29 10:30:46 [TRACE] ProviderTransformer: exact match for provider["registry.terraform.io/gavinbunney/kubectl"] serving kubectl_manifest.test
2022/03/29 10:30:46 [DEBUG] ProviderTransformer: "kubectl_manifest.test" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/gavinbunney/kubectl"]
2022/03/29 10:30:46 [TRACE] ProviderTransformer: exact match for provider["registry.terraform.io/gavinbunney/kubectl"] serving kubectl_manifest.test (expand)
2022/03/29 10:30:46 [DEBUG] ProviderTransformer: "kubectl_manifest.test (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/gavinbunney/kubectl"]
2022/03/29 10:30:46 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:46 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.PruneProviderTransformer
2022/03/29 10:30:46 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.PruneProviderTransformer (no changes)
2022/03/29 10:30:46 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ParentProviderTransformer
2022/03/29 10:30:46 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ParentProviderTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.graphTransformerMulti with new graph:
  kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.RemovedModuleTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.RemovedModuleTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.AttachSchemaTransformer
2022/03/29 10:30:46 [TRACE] AttachSchemaTransformer: attaching resource schema to kubectl_manifest.test (expand)
2022/03/29 10:30:46 [TRACE] AttachSchemaTransformer: attaching resource schema to kubectl_manifest.test
2022/03/29 10:30:46 [TRACE] AttachSchemaTransformer: attaching provider config schema to provider["registry.terraform.io/gavinbunney/kubectl"]
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.AttachSchemaTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.ModuleExpansionTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.ModuleExpansionTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.ReferenceTransformer
2022/03/29 10:30:46 [DEBUG] ReferenceTransformer: "kubectl_manifest.test (expand)" references: []
2022/03/29 10:30:46 [DEBUG] ReferenceTransformer: "local.date (expand)" references: []
2022/03/29 10:30:46 [DEBUG] ReferenceTransformer: "local.is_even (expand)" references: [local.date (expand)]
2022/03/29 10:30:46 [DEBUG] ReferenceTransformer: "kubectl_manifest.test" references: [local.is_even (expand)]
2022/03/29 10:30:46 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" references: []
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.ReferenceTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.AttachDependenciesTransformer
2022/03/29 10:30:46 [TRACE] AttachDependenciesTransformer: kubectl_manifest.test depends on []
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.AttachDependenciesTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.ForcedCBDTransformer
2022/03/29 10:30:46 [TRACE] ForcedCBDTransformer: "kubectl_manifest.test" (*terraform.NodeApplyableResourceInstance) has no CBD descendent, so skipping
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.ForcedCBDTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.DestroyEdgeTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.DestroyEdgeTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.CBDEdgeTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.CBDEdgeTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.pruneUnusedNodesTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.pruneUnusedNodesTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.TargetsTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.TargetsTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.CountBoundaryTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.CountBoundaryTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    local.date (expand) - *terraform.nodeExpandLocal
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.CloseProviderTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.CloseProviderTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    local.date (expand) - *terraform.nodeExpandLocal
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
    kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  ------
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.CloseProvisionerTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.CloseProvisionerTransformer (no changes)
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.CloseRootModuleTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.CloseRootModuleTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    local.date (expand) - *terraform.nodeExpandLocal
    local.is_even (expand) - *terraform.nodeExpandLocal
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
    kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  root - *terraform.nodeCloseModule
    meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
  ------
2022/03/29 10:30:46 [TRACE] Executing graph transform *terraform.TransitiveReductionTransformer
2022/03/29 10:30:46 [TRACE] Completed graph transform *terraform.TransitiveReductionTransformer with new graph:
  kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
    kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    local.is_even (expand) - *terraform.nodeExpandLocal
  kubectl_manifest.test (expand) - *terraform.nodeExpandApplyableResource
    provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  local.date (expand) - *terraform.nodeExpandLocal
  local.is_even (expand) - *terraform.nodeExpandLocal
    local.date (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
  provider["registry.terraform.io/gavinbunney/kubectl"] - *terraform.NodeApplyableProvider
  provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
    kubectl_manifest.test - *terraform.NodeApplyableResourceInstance
  root - *terraform.nodeCloseModule
    meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    provider["registry.terraform.io/gavinbunney/kubectl"] (close) - *terraform.graphNodeCloseProvider
  ------
2022/03/29 10:30:46 [DEBUG] Starting graph walk: walkApply
2022/03/29 10:30:46 [TRACE] dag/walk: visiting "local.date (expand)"
2022/03/29 10:30:46 [TRACE] vertex "local.date (expand)": starting visit (*terraform.nodeExpandLocal)
2022/03/29 10:30:46 [TRACE] vertex "local.date (expand)": expanding dynamic subgraph
2022/03/29 10:30:46 [TRACE] Expanding local: adding local.date as *terraform.NodeLocal
2022/03/29 10:30:46 [TRACE] vertex "local.date (expand)": entering dynamic subgraph
2022/03/29 10:30:46 [TRACE] dag/walk: visiting "provider[\"registry.terraform.io/gavinbunney/kubectl\"]"
2022/03/29 10:30:46 [TRACE] dag/walk: visiting "local.date"
2022/03/29 10:30:46 [TRACE] vertex "local.date": starting visit (*terraform.NodeLocal)
2022/03/29 10:30:46 [TRACE] vertex "provider[\"registry.terraform.io/gavinbunney/kubectl\"]": starting visit (*terraform.NodeApplyableProvider)
2022/03/29 10:30:46 [TRACE] vertex "local.date": visit complete
2022/03/29 10:30:46 [TRACE] vertex "local.date (expand)": dynamic subgraph completed successfully
2022/03/29 10:30:46 [TRACE] vertex "local.date (expand)": visit complete
2022/03/29 10:30:46 [TRACE] dag/walk: visiting "local.is_even (expand)"
2022/03/29 10:30:46 [TRACE] vertex "local.is_even (expand)": starting visit (*terraform.nodeExpandLocal)
2022/03/29 10:30:46 [TRACE] vertex "local.is_even (expand)": expanding dynamic subgraph
2022/03/29 10:30:46 [TRACE] Expanding local: adding local.is_even as *terraform.NodeLocal
2022/03/29 10:30:46 [TRACE] vertex "local.is_even (expand)": entering dynamic subgraph
2022/03/29 10:30:46 [TRACE] dag/walk: visiting "local.is_even"
2022/03/29 10:30:46 [TRACE] vertex "local.is_even": starting visit (*terraform.NodeLocal)
2022/03/29 10:30:46 [TRACE] vertex "local.is_even": visit complete
2022/03/29 10:30:46 [TRACE] vertex "local.is_even (expand)": dynamic subgraph completed successfully
2022/03/29 10:30:46 [TRACE] vertex "local.is_even (expand)": visit complete
2022-03-29T10:30:46.997-0400 [INFO]  plugin: configuring client automatic mTLS
2022-03-29T10:30:47.028-0400 [DEBUG] plugin: starting plugin: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0 args=[.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0]
2022-03-29T10:30:47.033-0400 [DEBUG] plugin: plugin started: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0 pid=44790
2022-03-29T10:30:47.033-0400 [DEBUG] plugin: waiting for RPC address: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0
2022-03-29T10:30:47.071-0400 [INFO]  plugin.terraform-provider-kubectl_v1.14.0: configuring server automatic mTLS: timestamp=2022-03-29T10:30:47.071-0400
2022-03-29T10:30:47.105-0400 [DEBUG] plugin: using plugin: version=5
2022-03-29T10:30:47.105-0400 [DEBUG] plugin.terraform-provider-kubectl_v1.14.0: plugin address: address=/var/folders/rg/dx0h8hb90zqgzs17frdpw_m00000gn/T/plugin138217061 network=unix timestamp=2022-03-29T10:30:47.105-0400
2022/03/29 10:30:47 [TRACE] BuiltinEvalContext: Initialized "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" provider for provider["registry.terraform.io/gavinbunney/kubectl"]
2022-03-29T10:30:47.150-0400 [TRACE] plugin.stdio: waiting for stdio data
2022/03/29 10:30:47 [TRACE] buildProviderConfig for provider["registry.terraform.io/gavinbunney/kubectl"]: using explicit config only
2022/03/29 10:30:47 [TRACE] GRPCProvider: GetSchema
2022/03/29 10:30:47 [TRACE] GRPCProvider: Configure
2022-03-29T10:30:47.152-0400 [DEBUG] plugin.terraform-provider-kubectl_v1.14.0: 2022/03/29 10:30:47 [DEBUG] Using kubeconfig: /Users/xxx/.kube/kubeconfig
2022/03/29 10:30:47 [TRACE] vertex "provider[\"registry.terraform.io/gavinbunney/kubectl\"]": visit complete
2022/03/29 10:30:47 [TRACE] dag/walk: visiting "kubectl_manifest.test (expand)"
2022/03/29 10:30:47 [TRACE] vertex "kubectl_manifest.test (expand)": starting visit (*terraform.nodeExpandApplyableResource)
2022/03/29 10:30:47 [TRACE] vertex "kubectl_manifest.test (expand)": expanding dynamic subgraph
2022/03/29 10:30:47 [TRACE] vertex "kubectl_manifest.test (expand)": entering dynamic subgraph
2022/03/29 10:30:47 [TRACE] dag/walk: visiting "kubectl_manifest.test"
2022/03/29 10:30:47 [TRACE] vertex "kubectl_manifest.test": starting visit (*terraform.NodeApplyableResource)
2022/03/29 10:30:47 [TRACE] vertex "kubectl_manifest.test": visit complete
2022/03/29 10:30:47 [TRACE] vertex "kubectl_manifest.test (expand)": dynamic subgraph completed successfully
2022/03/29 10:30:47 [TRACE] vertex "kubectl_manifest.test (expand)": visit complete
2022/03/29 10:30:47 [TRACE] dag/walk: visiting "kubectl_manifest.test"
2022/03/29 10:30:47 [TRACE] vertex "kubectl_manifest.test": starting visit (*terraform.NodeApplyableResourceInstance)
2022/03/29 10:30:47 [TRACE] EvalReadDiff: Read Update change from plan for kubectl_manifest.test
2022/03/29 10:30:47 [TRACE] EvalReadState: reading state for kubectl_manifest.test
2022/03/29 10:30:47 [TRACE] UpgradeResourceState: schema version of kubectl_manifest.test is still 1; calling provider "kubectl" for any other minor fixups
2022/03/29 10:30:47 [TRACE] GRPCProvider: UpgradeResourceState
2022/03/29 10:30:47 [TRACE] EvalReadDiff: Read Update change from plan for kubectl_manifest.test
2022/03/29 10:30:47 [TRACE] Re-validating config for "kubectl_manifest.test"
2022/03/29 10:30:47 [TRACE] GRPCProvider: ValidateResourceTypeConfig
2022/03/29 10:30:47 [TRACE] GRPCProvider: PlanResourceChange
2022-03-29T10:30:47.158-0400 [DEBUG] plugin.terraform-provider-kubectl_v1.14.0: 2022/03/29 10:30:47 [DEBUG] test-provider/test-cm Unstructed YAML: map[apiVersion:v1 data:map[month_parity:odd test:static] kind:ConfigMap metadata:map[name:test-cm namespace:test-provider]]
2022-03-29T10:30:47.158-0400 [DEBUG] plugin.terraform-provider-kubectl_v1.14.0: 2022/03/29 10:30:47 [DEBUG] test-provider/test-cm Unstructed YAML: map[apiVersion:v1 data:map[month_parity:odd test:static] kind:ConfigMap metadata:map[name:test-cm namespace:test-provider]]
2022/03/29 10:30:47 [TRACE] EvalCheckPlannedChange: Verifying that actual change (action Update) matches planned change (action Update)
2022/03/29 10:30:47 [TRACE] vertex "kubectl_manifest.test": visit complete
2022/03/29 10:30:47 [TRACE] dag/walk: upstream of "provider[\"registry.terraform.io/gavinbunney/kubectl\"] (close)" errored, so skipping
2022/03/29 10:30:47 [TRACE] dag/walk: upstream of "meta.count-boundary (EachMode fixup)" errored, so skipping
2022/03/29 10:30:47 [TRACE] dag/walk: upstream of "root" errored, so skipping
2022/03/29 10:30:47 [TRACE] statemgr.Filesystem: not making a backup, because the new snapshot is identical to the old
2022/03/29 10:30:47 [TRACE] statemgr.Filesystem: no state changes since last snapshot
2022/03/29 10:30:47 [TRACE] statemgr.Filesystem: writing snapshot at terraform.tfstate

2022/03/29 10:30:47 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
Error: Provider produced inconsistent final plan

When expanding the plan for kubectl_manifest.test to include new values
learned so far during apply, provider
2022/03/29 10:30:47 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock
"registry.terraform.io/gavinbunney/kubectl" produced an invalid new value for
.yaml_body_parsed: was cty.StringVal("apiVersion: v1\ndata:\n  test:
static\nkind: ConfigMap\nmetadata:\n  name: test-cm\n  namespace:
test-provider\n"), but now cty.StringVal("apiVersion: v1\ndata:\n
month_parity: odd\n  test: static\nkind: ConfigMap\nmetadata:\n  name:
test-cm\n  namespace: test-provider\n").

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

2022-03-29T10:30:47.180-0400 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-29T10:30:47.182-0400 [DEBUG] plugin: plugin process exited: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_amd64/terraform-provider-kubectl_v1.14.0 pid=44790
2022-03-29T10:30:47.182-0400 [DEBUG] plugin: plugin exited
bdelage commented 2 years ago

It seems like the provider does not like to have conditional values in the yaml_body, the issue appears even if the assessment of the condition happens in the TF code or in a module.

karlschriek commented 2 years ago

We are running into this on 1.14.0 as well. We use templatefile to render manifests before we pass them to

resource "kubectl_manifest" "this" {
  yaml_body = templatefile(
    "${local.templates_path}/my-app.tftpl",
    {
      foo            = "bar"
      tenant_id  = some_resource.this.id
    }
  )
}

We run into this every time some_resource has to be recreated, thereby outputting a new ID.

karlschriek commented 2 years ago

There is only one commit between 1.13.1 and 1.14.0 though.

The two features that were added (apply_only and force_conflicts) I think are unlikely to have caused this. As a side-effect though, this block of text got moved from around the end of the initializeConfiguration function to around the beginning. I

if v, ok := d.GetOk("exec"); ok {
...
}

No idea what it does but I'm guessing that is the culprit.

zenobios commented 2 years ago

I just tried version 1.13.1 with the example provided by @bdelage: Same result:

2022-07-28T16:03:09.480+0200 [DEBUG] using github.com/hashicorp/go-tfe v1.0.0
2022-07-28T16:03:09.480+0200 [DEBUG] using github.com/hashicorp/hcl/v2 v2.12.0
2022-07-28T16:03:09.480+0200 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2022-07-28T16:03:09.480+0200 [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
2022-07-28T16:03:09.480+0200 [DEBUG] using github.com/zclconf/go-cty v1.10.0
2022-07-28T16:03:09.480+0200 [INFO]  Go runtime version: go1.18.4
2022-07-28T16:03:09.480+0200 [INFO]  CLI args: []string{"terraform", "apply"}
2022-07-28T16:03:09.480+0200 [DEBUG] Attempting to open CLI config file: /Users/xxx/.terraformrc
2022-07-28T16:03:09.481+0200 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2022-07-28T16:03:09.481+0200 [INFO]  Loading CLI configuration from /Users/xxx/.terraform.d/credentials.tfrc.json
2022-07-28T16:03:09.482+0200 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2022-07-28T16:03:09.482+0200 [DEBUG] ignoring non-existing provider search directory /Users/xxx/.terraform.d/plugins
2022-07-28T16:03:09.482+0200 [DEBUG] ignoring non-existing provider search directory /Users/xxx/Library/Application Support/io.terraform/plugins
2022-07-28T16:03:09.482+0200 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2022-07-28T16:03:09.482+0200 [INFO]  CLI command args: []string{"apply"}
2022-07-28T16:03:09.483+0200 [DEBUG] New state was assigned lineage "ef5f875b-103b-e63c-e4b9-b9e315b61dc1"
2022-07-28T16:03:09.618+0200 [DEBUG] checking for provisioner in "."
2022-07-28T16:03:09.618+0200 [DEBUG] checking for provisioner in "/usr/local/bin"
2022-07-28T16:03:09.619+0200 [INFO]  backend/local: starting Apply operation
2022-07-28T16:03:09.623+0200 [DEBUG] created provider logger: level=debug
2022-07-28T16:03:09.623+0200 [INFO]  provider: configuring client automatic mTLS
2022-07-28T16:03:09.638+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1 args=[.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1]
2022-07-28T16:03:09.641+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1 pid=71592
2022-07-28T16:03:09.642+0200 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1
2022-07-28T16:03:09.676+0200 [INFO]  provider.terraform-provider-kubectl_v1.13.1: configuring server automatic mTLS: timestamp=2022-07-28T16:03:09.676+0200
2022-07-28T16:03:09.708+0200 [DEBUG] provider: using plugin: version=5
2022-07-28T16:03:09.708+0200 [DEBUG] provider.terraform-provider-kubectl_v1.13.1: plugin address: address=/var/folders/vn/n4h2y_rx2x7cb0sz6wxg_t8c0000gn/T/plugin121458479 network=unix timestamp=2022-07-28T16:03:09.708+0200
2022-07-28T16:03:09.740+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-07-28T16:03:09.742+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1 pid=71592
2022-07-28T16:03:09.742+0200 [DEBUG] provider: plugin exited
2022-07-28T16:03:09.742+0200 [DEBUG] Building and walking validate graph
2022-07-28T16:03:09.742+0200 [DEBUG] ProviderTransformer: "kubectl_manifest.test" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/gavinbunney/kubectl"]
2022-07-28T16:03:09.742+0200 [DEBUG] ReferenceTransformer: "kubectl_manifest.test" references: [local.is_even (expand)]
2022-07-28T16:03:09.742+0200 [DEBUG] ReferenceTransformer: "local.is_even (expand)" references: [local.date (expand)]
2022-07-28T16:03:09.742+0200 [DEBUG] ReferenceTransformer: "local.date (expand)" references: []
2022-07-28T16:03:09.742+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" references: []
2022-07-28T16:03:09.742+0200 [DEBUG] Starting graph walk: walkValidate
2022-07-28T16:03:09.743+0200 [DEBUG] created provider logger: level=debug
2022-07-28T16:03:09.743+0200 [INFO]  provider: configuring client automatic mTLS
2022-07-28T16:03:09.758+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1 args=[.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1]
2022-07-28T16:03:09.761+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1 pid=71593
2022-07-28T16:03:09.761+0200 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1
2022-07-28T16:03:09.796+0200 [INFO]  provider.terraform-provider-kubectl_v1.13.1: configuring server automatic mTLS: timestamp=2022-07-28T16:03:09.796+0200
2022-07-28T16:03:09.827+0200 [DEBUG] provider.terraform-provider-kubectl_v1.13.1: plugin address: network=unix address=/var/folders/vn/n4h2y_rx2x7cb0sz6wxg_t8c0000gn/T/plugin900103492 timestamp=2022-07-28T16:03:09.827+0200
2022-07-28T16:03:09.827+0200 [DEBUG] provider: using plugin: version=5
2022-07-28T16:03:09.861+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-07-28T16:03:09.863+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1 pid=71593
2022-07-28T16:03:09.863+0200 [DEBUG] provider: plugin exited
2022-07-28T16:03:09.863+0200 [INFO]  backend/local: apply calling Plan
2022-07-28T16:03:09.863+0200 [DEBUG] Building and walking plan graph for NormalMode
2022-07-28T16:03:09.863+0200 [DEBUG] ProviderTransformer: "kubectl_manifest.test (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/gavinbunney/kubectl"]
2022-07-28T16:03:09.863+0200 [DEBUG] ReferenceTransformer: "kubectl_manifest.test (expand)" references: [local.is_even (expand)]
2022-07-28T16:03:09.863+0200 [DEBUG] ReferenceTransformer: "local.date (expand)" references: []
2022-07-28T16:03:09.864+0200 [DEBUG] ReferenceTransformer: "local.is_even (expand)" references: [local.date (expand)]
2022-07-28T16:03:09.864+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" references: []
2022-07-28T16:03:09.864+0200 [DEBUG] Starting graph walk: walkPlan
2022-07-28T16:03:09.864+0200 [DEBUG] created provider logger: level=debug
2022-07-28T16:03:09.864+0200 [INFO]  provider: configuring client automatic mTLS
2022-07-28T16:03:09.879+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1 args=[.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1]
2022-07-28T16:03:09.882+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1 pid=71594
2022-07-28T16:03:09.882+0200 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1
2022-07-28T16:03:09.916+0200 [INFO]  provider.terraform-provider-kubectl_v1.13.1: configuring server automatic mTLS: timestamp=2022-07-28T16:03:09.916+0200
2022-07-28T16:03:09.950+0200 [DEBUG] provider.terraform-provider-kubectl_v1.13.1: plugin address: address=/var/folders/vn/n4h2y_rx2x7cb0sz6wxg_t8c0000gn/T/plugin627523961 network=unix timestamp=2022-07-28T16:03:09.950+0200
2022-07-28T16:03:09.950+0200 [DEBUG] provider: using plugin: version=5
2022-07-28T16:03:09.988+0200 [WARN]  ValidateProviderConfig from "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" changed the config value, but that value is unused
2022-07-28T16:03:09.989+0200 [DEBUG] provider.terraform-provider-kubectl_v1.13.1: 2022/07/28 16:03:09 [DEBUG] Using kubeconfig: /Users/xxx/git/xxx/config
2022-07-28T16:03:09.995+0200 [INFO]  ReferenceTransformer: reference not found: "local.is_even"
2022-07-28T16:03:09.995+0200 [DEBUG] ReferenceTransformer: "kubectl_manifest.test" references: []
kubectl_manifest.test: Refreshing state... [id=/api/v1/namespaces/test-provider/configmaps/test-cm]
2022-07-28T16:03:09.997+0200 [DEBUG] provider.terraform-provider-kubectl_v1.13.1: 2022/07/28 16:03:09 [DEBUG] test-provider/test-cm Unstructed YAML: map[apiVersion:v1 data:map[test:static] kind:ConfigMap metadata:map[name:test-cm namespace:test-provider]]
2022-07-28T16:03:10.007+0200 [DEBUG] provider.terraform-provider-kubectl_v1.13.1: 2022/07/28 16:03:10 [DEBUG] test-provider/test-cm fetch from kubernetes
2022-07-28T16:03:10.812+0200 [DEBUG] provider.terraform-provider-kubectl_v1.13.1: 2022/07/28 16:03:10 [TRACE] yaml_body value interpolated, skipping customized diff
2022-07-28T16:03:10.812+0200 [WARN]  Provider "registry.terraform.io/gavinbunney/kubectl" produced an invalid plan for kubectl_manifest.test, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .validate_schema: planned value cty.True for a non-computed attribute
      - .force_new: planned value cty.False for a non-computed attribute
      - .server_side_apply: planned value cty.False for a non-computed attribute
      - .wait_for_rollout: planned value cty.True for a non-computed attribute
2022-07-28T16:03:10.813+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-07-28T16:03:10.816+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1 pid=71594
2022-07-28T16:03:10.816+0200 [DEBUG] provider: plugin exited
2022-07-28T16:03:10.816+0200 [DEBUG] building apply graph to check for errors
2022-07-28T16:03:10.817+0200 [DEBUG] ProviderTransformer: "kubectl_manifest.test (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/gavinbunney/kubectl"]
2022-07-28T16:03:10.817+0200 [DEBUG] ProviderTransformer: "kubectl_manifest.test" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/gavinbunney/kubectl"]
2022-07-28T16:03:10.817+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" references: []
2022-07-28T16:03:10.817+0200 [DEBUG] ReferenceTransformer: "kubectl_manifest.test (expand)" references: []
2022-07-28T16:03:10.817+0200 [DEBUG] ReferenceTransformer: "local.date (expand)" references: []
2022-07-28T16:03:10.817+0200 [DEBUG] ReferenceTransformer: "local.is_even (expand)" references: [local.date (expand)]
2022-07-28T16:03:10.817+0200 [DEBUG] ReferenceTransformer: "kubectl_manifest.test" references: [local.is_even (expand)]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # kubectl_manifest.test will be updated in-place
  ~ resource "kubectl_manifest" "test" {
        id                      = "/api/v1/namespaces/test-provider/configmaps/test-cm"
        name                    = "test-cm"
      ~ yaml_body               = (sensitive value)
        # (12 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
2022-07-28T16:03:10.818+0200 [DEBUG] command: asking for input: "\nDo you want to perform these actions?"

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

2022-07-28T16:03:12.680+0200 [INFO]  backend/local: apply calling Apply
2022-07-28T16:03:12.680+0200 [DEBUG] Building and walking apply graph for NormalMode plan
2022-07-28T16:03:12.681+0200 [DEBUG] ProviderTransformer: "kubectl_manifest.test (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/gavinbunney/kubectl"]
2022-07-28T16:03:12.681+0200 [DEBUG] ProviderTransformer: "kubectl_manifest.test" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/gavinbunney/kubectl"]
2022-07-28T16:03:12.682+0200 [DEBUG] ReferenceTransformer: "kubectl_manifest.test (expand)" references: []
2022-07-28T16:03:12.682+0200 [DEBUG] ReferenceTransformer: "local.date (expand)" references: []
2022-07-28T16:03:12.682+0200 [DEBUG] ReferenceTransformer: "local.is_even (expand)" references: [local.date (expand)]
2022-07-28T16:03:12.682+0200 [DEBUG] ReferenceTransformer: "kubectl_manifest.test" references: [local.is_even (expand)]
2022-07-28T16:03:12.682+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" references: []
2022-07-28T16:03:12.682+0200 [DEBUG] Starting graph walk: walkApply
2022-07-28T16:03:12.683+0200 [DEBUG] created provider logger: level=debug
2022-07-28T16:03:12.683+0200 [INFO]  provider: configuring client automatic mTLS
2022-07-28T16:03:12.704+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1 args=[.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1]
2022-07-28T16:03:12.709+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1 pid=71601
2022-07-28T16:03:12.709+0200 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1
2022-07-28T16:03:12.757+0200 [INFO]  provider.terraform-provider-kubectl_v1.13.1: configuring server automatic mTLS: timestamp=2022-07-28T16:03:12.757+0200
2022-07-28T16:03:12.793+0200 [DEBUG] provider: using plugin: version=5
2022-07-28T16:03:12.793+0200 [DEBUG] provider.terraform-provider-kubectl_v1.13.1: plugin address: address=/var/folders/vn/n4h2y_rx2x7cb0sz6wxg_t8c0000gn/T/plugin839279596 network=unix timestamp=2022-07-28T16:03:12.793+0200
2022-07-28T16:03:12.826+0200 [WARN]  ValidateProviderConfig from "provider[\"registry.terraform.io/gavinbunney/kubectl\"]" changed the config value, but that value is unused
2022-07-28T16:03:12.826+0200 [DEBUG] provider.terraform-provider-kubectl_v1.13.1: 2022/07/28 16:03:12 [DEBUG] Using kubeconfig: /Users/xxx/git/.../config
2022-07-28T16:03:12.834+0200 [DEBUG] provider.terraform-provider-kubectl_v1.13.1: 2022/07/28 16:03:12 [DEBUG] test-provider/test-cm Unstructed YAML: map[apiVersion:v1 data:map[month_parity:odd test:static] kind:ConfigMap metadata:map[name:test-cm namespace:test-provider]]
2022-07-28T16:03:12.834+0200 [DEBUG] provider.terraform-provider-kubectl_v1.13.1: 2022/07/28 16:03:12 [DEBUG] test-provider/test-cm Unstructed YAML: map[apiVersion:v1 data:map[month_parity:odd test:static] kind:ConfigMap metadata:map[name:test-cm namespace:test-provider]]
2022-07-28T16:03:12.834+0200 [WARN]  Provider "registry.terraform.io/gavinbunney/kubectl" produced an invalid plan for kubectl_manifest.test, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .force_new: planned value cty.False for a non-computed attribute
      - .server_side_apply: planned value cty.False for a non-computed attribute
      - .wait_for_rollout: planned value cty.True for a non-computed attribute
      - .validate_schema: planned value cty.True for a non-computed attribute
2022-07-28T16:03:12.834+0200 [ERROR] vertex "kubectl_manifest.test" error: Provider produced inconsistent final plan
╷
│ Error: Provider produced inconsistent final plan
│ 
│ When expanding the plan for kubectl_manifest.test 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("apiVersion: v1\ndata:\n  test: static\nkind: ConfigMap\nmetadata:\n  name: test-cm\n  namespace: test-provider\n"), but now cty.StringVal("apiVersion: v1\ndata:\n  month_parity: odd\n  test: static\nkind:
│ ConfigMap\nmetadata:\n  name: test-cm\n  namespace: test-provider\n").
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
2022-07-28T16:03:12.856+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-07-28T16:03:12.858+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.13.1/darwin_amd64/terraform-provider-kubectl_v1.13.1 pid=71601
2022-07-28T16:03:12.858+0200 [DEBUG] provider: plugin exited
AmitKatyal-Sophos commented 1 year ago

creating the resource using the templatefile seems to be working fine.

resource "kubectl_manifest" "argocd_apps" { for_each = XXXXX yaml_body = templatefile("${path.module}/manifests/apps.yaml", { }) wait = "true" }