hashicorp / terraform-provider-helm

Terraform Helm provider
https://www.terraform.io/docs/providers/helm/
Mozilla Public License 2.0
1.01k stars 371 forks source link

`helm-framework`: refactor `metadata` from `ListNestedAttribute` -> `SingleNestedAttribute` #1516

Closed BBBmau closed 3 weeks ago

BBBmau commented 3 weeks ago

Description

The tfstate is now in the SingleNestedAttirbute format:

(base) ┌─(~/Dev/Scratch/helm-framework-scratch)────────────────────────────────────────────────────────(mau@mau-JKDT676NCP:s029)─┐
└─(11:44:11)──> cat terraform.tfstate                                                                   1 ↵ ──(Fri,Oct25)─┘
{
  "version": 4,
  "terraform_version": "1.8.0",
  "serial": 3,
  "lineage": "4224ea60-8c75-7e04-304a-2247f1516dd0",
  "outputs": {},
  "resources": [
    {
      "mode": "managed",
      "type": "helm_release",
      "name": "helm_migration_test_1",
      "provider": "provider[\"registry.terraform.io/hashicorp/helm\"]",
      "instances": [
        {
          "status": "tainted",
          "schema_version": 1,
          "attributes": {
            "atomic": false,
            "chart": "redis",
            "cleanup_on_fail": false,
            "create_namespace": false,
            "dependency_update": false,
            "description": "Test",
            "devel": null,
            "disable_crd_hooks": false,
            "disable_openapi_validation": false,
            "disable_webhooks": false,
            "force_update": false,
            "id": "helm-test-1",
            "keyring": null,
            "lint": false,
            "manifest": null,
            "max_history": 0,
            "metadata": {
              "app_version": "7.4.0",
              "chart": "redis",
              "first_deployed": 1729881734,
              "last_deployed": 1729881734,
              "name": "helm-test-1",
              "namespace": "default",
              "revision": 1,
              "values": "{}",
              "version": "20.1.4"
            },
            "name": "helm-test-1",
            "namespace": "default",
            "pass_credentials": false,
            "postrender": null,
            "recreate_pods": false,
            "render_subchart_notes": true,
            "replace": false,
            "repository": "bitnami",
            "repository_ca_file": null,
            "repository_cert_file": null,
            "repository_key_file": null,
            "repository_password": null,
            "repository_username": null,
            "reset_values": false,
            "reuse_values": false,
            "set": null,
            "set_list": null,
            "set_sensitive": null,
            "skip_crds": false,
            "status": "deployed",
            "timeout": 300,
            "values": null,
            "verify": false,
            "version": "20.1.4",
            "wait": true,
            "wait_for_jobs": false
          },
          "sensitive_attributes": [
            [
              {
                "type": "get_attr",
                "value": "repository_password"
              }
            ]
          ]
        }
      ]
    }
  ],
  "check_results": null
}

Acceptance tests

Release Note

Release note for CHANGELOG:

...

References

Community Note

JaylonmcShan03 commented 3 weeks ago

Thanks for the updated test!