If a dynamic ebs_options block on an aws_elasticsearch_domain exists, but then is removed due to changes of variable values in a subsequent run, then the plan should propose to remove the block.
Actual Behavior
In the scenario described, the plan does not propose to remove the dynamic block.
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.9.4
AWS Provider Version
5.63.1
Affected Resource(s)
aws_elasticsearch_domain
Expected Behavior
If a dynamic ebs_options block on an aws_elasticsearch_domain exists, but then is removed due to changes of variable values in a subsequent run, then the plan should propose to remove the block.
Actual Behavior
In the scenario described, the plan does not propose to remove the dynamic block.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
With the attached file
moo.tf
, runThis completes normally, creating an Elasticsearch domain with a single r6g data node.
Then run
Note that the resulting plan proposes only to change the instance type, and not also to remove the ebs_options block:
As a result, the update fails, because r6gd instances don't support EBS volumes:
Indeed, the planned values in the plan file show that the
ebs_options
block is still present:Workaround
Don't use a dynamic block, but instead write
(and to similarly null out all other arguments to the
ebs_options
block that one might wish to use).Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No