[sfn/state_machine] fix logging_configuration #39947
Open
+1
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to AWS specifications, the default is set to OFF if not specified https://docs.aws.amazon.com/step-functions/latest/apireference/API_CreateStateMachine.html
Description
In the
aws_sfn_state_machine
resource, iflogging_configuration
is specified butlevel
is not, applying it once succeeds, but trying to apply it again results in a failure.This is likely because, in AWS, the default value for
level
is "OFF," so "OFF" is recorded in the deployed environment and tfstate. However, since no default value was set in the Terraform provider, it is mistakenly detected as a change.https://docs.aws.amazon.com/step-functions/latest/apireference/API_CreateStateMachine.html
Therefore, I set a default value for
level
in the schema of the Terraform provider. After testing, I confirmed that no changes are detected upon reapplying.Relations
Closes #34697
References
Output from Acceptance Testing