5. You want to update an AWS S3 bucket's tags without triggering bucket replacement or downtime. Which lifecycle customization should you apply in Terraform to achieve this?
hard
A. Use ignore_changes = ["tags"] to skip tag updates.
B. Use prevent_destroy = true to block bucket deletion.
C. Use create_before_destroy = true to create new bucket first.
D. Use ignore_changes = ["versioning"] to skip versioning changes.
Solution
Step 1: Identify the goal to update tags without replacement
Tags often cause resource updates; ignoring changes to tags avoids replacement.
Step 2: Choose lifecycle setting to ignore tag changes
Setting ignore_changes = ["tags"] tells Terraform not to replace the bucket when tags change.
Final Answer:
Use ignore_changes = ["tags"] to skip tag updates. -> Option A
Quick Check:
ignore_changes on tags prevents replacement on tag updates [OK]
Hint: Ignore tag changes to update tags without replacement [OK]
Common Mistakes:
Using prevent_destroy which blocks deletion but not replacement
Using create_before_destroy which affects replacement order
Ignoring unrelated attributes like versioning
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.