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

Arranging constraints order shouldn't matter and constraints should resolve properly (GB -> MB) #536

Open
dparv opened this issue Jul 27, 2024 · 1 comment
Labels
area/application hint/main going on main branch

Comments

@dparv
Copy link

dparv commented Jul 27, 2024

Description

Arranging constraints should't matter in a terraform plan and what gets added to the terraform state, e.g. those two should be the same, but if it's not defined as the lower one, there is the error below:

constraints = "arch=amd64 root-disk=102400M cores=8 mem=16384M allocate-public-ip=false"
constraints = "arch=amd64 cores=8 mem=16384M root-disk=102400M allocate-public-ip=false"

Another thing is adding 16G won't work, as on the next apply terraform complains that plan says 16G, but but state says 16384M. Those values are the same, so we shouldn't get an error about it.

Urgency

Annoying bug in our test suite

Terraform Juju Provider version

0.13.0

Terraform version

1.7.4

Juju version

3.4.4

Terraform Configuration(s)

No response

Reproduce / Test

terraform apply

Debug/Panic Output

│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to juju_application.opensearch, provider
│ "provider[\"registry.terraform.io/juju/juju\"]" produced an unexpected new
│ value: .constraints: was cty.StringVal("arch=amd64 root-disk=102400M
│ cores=8 mem=16384M allocate-public-ip=false"), but now
│ cty.StringVal("arch=amd64 cores=8 mem=16384M root-disk=102400M
│ allocate-public-ip=false").
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.


│ Error: Provider produced inconsistent result after apply

│ When applying changes to juju_application.self-signed-certificates,
│ provider "provider[\"registry.terraform.io/juju/juju\"]" produced an
│ unexpected new value: .constraints: was cty.StringVal("arch=amd64
│ root-disk=30720M cores=2 mem=4G allocate-public-ip=false"), but now
│ cty.StringVal("arch=amd64 cores=2 mem=4096M root-disk=30720M
│ allocate-public-ip=false").

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

Notes & References

No response

@hmlanigan hmlanigan added hint/main going on main branch area/application labels Aug 1, 2024
@hmlanigan
Copy link
Member

This is a duplicate of #344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/application hint/main going on main branch
Projects
None yet
Development

No branches or pull requests

2 participants