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
Leaving out the optional default_result attribute of the aws_autoscaling_lifecycle_hook will make plan always see a difference after the first apply, since the AWS API will fill this in on creation with the value ABANDON:
I tried adding an else here to set the default value the AWS API uses in case there is no input, but no luck, I guess this is only read on apply and not when diffing:
Expected behaviour is that Terraform is aware of the default value and does not produce a diff.
I've worked around this by making the default_result explicit, if there is a standard way to deal with this pattern (Cloud service API adding default values when omitted) I'd be happy to work on this myself.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi @elblivion this needed to be changed to a computed value. There is a PR just about to hit for this with a test to prove that it's now working as expected
I also updated the docs to note that the default is ABANDON
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Apr 28, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi folks,
Leaving out the optional
default_result
attribute of theaws_autoscaling_lifecycle_hook
will makeplan
always see a difference after the firstapply
, since the AWS API will fill this in on creation with the valueABANDON
:I tried adding an
else
here to set the default value the AWS API uses in case there is no input, but no luck, I guess this is only read on apply and not when diffing:terraform/builtin/providers/aws/resource_aws_autoscaling_lifecycle_hook.go
Line 142 in 4577318
Expected behaviour is that Terraform is aware of the default value and does not produce a diff.
I've worked around this by making the default_result explicit, if there is a standard way to deal with this pattern (Cloud service API adding default values when omitted) I'd be happy to work on this myself.
Thanks!
The text was updated successfully, but these errors were encountered: