Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After terraform import charm config isn't correctly recognised #96

Closed
mthaddon opened this issue Sep 27, 2022 · 1 comment · Fixed by #108
Closed

After terraform import charm config isn't correctly recognised #96

mthaddon opened this issue Sep 27, 2022 · 1 comment · Fixed by #108

Comments

@mthaddon
Copy link

Terraform Version

$ terraform -v
Terraform v1.3.0
on linux_amd64
+ provider registry.terraform.io/juju/juju v0.4.1

Affected Resource(s)

juju_application

Terraform Configuration Files

resource "juju_application" "indico" {
  name  = "indico"
  model = juju_model.staging.name

  charm {
    name = "indico"
  }
  config = {
   indico_no_reply_email = "[email protected]" 
  } 
  units = 1
}

Debug Output

Showing juju config is already set to [email protected]:

juju config indico indico_no_reply_email
[email protected]

Terraform plan output

  # juju_application.indico will be updated in-place
  ~ resource "juju_application" "indico" {
      ~ config = {
          + "indico_no_reply_email"       = "[email protected]"
        }
        id     = "stg-events:indico"
        name   = "indico"
        # (3 unchanged attributes hidden)
     }

Panic Output

N/A

Expected Behavior

Terraform plan should recognise that the config value is already set to the one it says it's going to change it to.

Actual Behavior

Terraform plan shows it's going to change the config.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. juju deploy indico --config indico_no_reply_email="[email protected]"
  2. terraform import juju_application.indico stg-events:indico
  3. terraform plan

Important Factoids

N/A

References

N/A

@mthaddon
Copy link
Author

Can we have a 0.4.2 release so this change can be used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant