You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The resource will be created with the right state containing the network_prefix_length and the vpc_uuid
Subsequent plans will result into diffs saying that the network_prefix_length value is immutable even though the value has not changed.
Expected behaviour
No diffs should happen if the value of the immutable property has not changed.
Additional context
When comparing the state from remote API with the local changes, the structs marshalled from the API response JSON was treating all ints as floats and when the comparison with the local state value was performed, the check was detecting a diff due to type differences even though the value was the same:
Example: immutable field updated [updatedValue: %!s(int=26); actual: %!s(float64=26)]
Checklist
Don't forget to go through the checklist to make sure the issue is created properly:
I have added a corresponding label (feature request/bug/etc) to the issue (right side menu)
I have added this issue to the 'API Terraform Provider' GitHub project (right side menu)
The text was updated successfully, but these errors were encountered:
Fixed the following bugs:
#159: immutable properties where the value has not changed not working properly (#159)
#160: readonly properties inside objects are included in the payload and sent to the API when a resource is updated (#160)
#161: immutable properties within objects and lists of objects are not working as expected (#161)
devstar0826
added a commit
to devstar0826/terraform-provider-openapi
that referenced
this issue
Oct 24, 2019
Describe the bug
Terraform complains for immutable property even though swagger is marked with default value
To Reproduce
Given a terraform compatible resources that uses the following swagger as the resource model definition:
And the following corresponding terraform configuration:
Steps to reproduce the behaviour:
Expected behaviour
No diffs should happen if the value of the immutable property has not changed.
Additional context
When comparing the state from remote API with the local changes, the structs marshalled from the API response JSON was treating all ints as floats and when the comparison with the local state value was performed, the check was detecting a diff due to type differences even though the value was the same:
Example: immutable field updated [updatedValue: %!s(int=26); actual: %!s(float64=26)]
Checklist
Don't forget to go through the checklist to make sure the issue is created properly:
The text was updated successfully, but these errors were encountered: