Coder Social home page Coder Social logo

Comments (5)

powellchristoph avatar powellchristoph commented on June 12, 2024 1

That didn't work, but it did give me the solution. Documenting here incase someone else runs into it.

Just changing the output.

# Example 
module.test.module.controlplane.module.host[0].null_resource.shell: Destroying... [id=7139279717175408238]
╷
│ Error: Missing map element
│
│   on .terraform/modules/test.controlplane.client_certificate/main.tf line 125, in resource "null_resource" "shell":
│  125:       self.triggers.uuid,
│     ├────────────────
│     │ self.triggers is map of string with 12 elements
│
│ This map does not have an element with the key "uuid".

But just removing the affected state directly did work. Then changing the output_kubernetes_config back to true and it was recreated correctly.

# example
tf state rm 'module.test.module.controlplane.module.client_key[0].null_resource.shell'
Removed module.test.module.controlplane.module.client_key[0].null_resource.shell
Successfully removed 1 resource instance(s).

As always, thanks for the quick reply!

from terraform-openstack-rke2.

stale avatar stale commented on June 12, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from terraform-openstack-rke2.

powellchristoph avatar powellchristoph commented on June 12, 2024

So @remche, I'm a little late to the party with this issue. Have you attempted an in-place upgrade?

The state blows up when applied. It wants to recreate the resources and then blows up in the process.

  # module.test.module.controlplane.module.client_certificate[0].null_resource.shell must be replaced
-/+ resource "null_resource" "shell" {
      ~ id       = "2748727677926441344" -> (known after apply)
      ~ triggers = { # forces replacement
          + "command_destroy_unix"              = ":"
          + "command_destroy_windows"           = "% ':'"
          - "command_when_destroy_unix"         = ":" -> null
          - "command_when_destroy_windows"      = "% ':'" -> null
          + "debug"                             = "false"
          + "environment"                       = jsonencode({})
          - "environment_keys"                  = "" -> null
          - "environment_values"                = "" -> null
          + "exit_code_file"                    = "7cfd3e2a-263e-a7b7-6e9e-1bc5a0365729.exitcode"
          + "fail_create_on_nonzero_exit_code"  = "true"
          + "fail_create_on_stderr"             = "false"
          + "fail_create_on_timeout"            = "true"
          + "fail_destroy_on_nonzero_exit_code" = "true"
          + "fail_destroy_on_stderr"            = "false"
          + "fail_destroy_on_timeout"           = "true"
          - "fail_on_error"                     = "false" -> null
          - "random_uuid"                       = "7cfd3e2a-263e-a7b7-6e9e-1bc5a0365729" -> null
          + "sensitive_environment"             = jsonencode({})
          - "sensitive_environment_keys"        = "" -> null
          - "sensitive_environment_values"      = "e3b0c44298fc1c191b7852b855" -> null
          + "stderr_file"                       = "7cfd3e2a-263e-a7b7-6e9e-1bc5a0365729.stderr"
          + "stdout_file"                       = "7cfd3e2a-263e-a7b7-6e9e-1bc5a0365729.stdout"
          + "timeout_create"                    = "0"
          + "timeout_destroy"                   = "0"
          - "trigger"                           = "" -> null
          + "triggers"                          = ""
          + "uuid"                              = "7cfd3e2a-263e-a7b7-6e9e-1bc5a0365729"
            # (3 unchanged elements hidden)
        }
    }
    
    
    │ Error: Missing map element
│
│   on .terraform/modules/test.controlplane.client_certificate/main.tf line 125, in resource "null_resource" "shell":
│  125:       self.triggers.uuid,
│     ├────────────────
│     │ self.triggers is map of string with 12 elements
│
│ This map does not have an element with the key "uuid".
╵

Are you aware of a process to upgrade an existing state to the new module?

from terraform-openstack-rke2.

remche avatar remche commented on June 12, 2024

@powellchristoph could you try to upgrade with output_kubernetes_config = false before adding it again ?

from terraform-openstack-rke2.

remche avatar remche commented on June 12, 2024

@powellchristoph thanks for documenting the issue. Let's pin it in for a while !

from terraform-openstack-rke2.

Related Issues (20)

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.