Question 80
A resource name needs one suffix for production and another suffix for nonproduction configurations. Which Terraform concept most directly explains the appropriate approach?
Explanation
Correct Answer
Use a conditional expression based on the environment input. The evaluated name contains the appropriate environment-dependent suffix.
Incorrect Answers
Declare a list(string) input type and preserve its ordering as required. The evaluated name contains the appropriate environment-dependent suffix.
Use narrowly scoped lifecycle ignore_changes for the autoscaler-owned attribute. Use a conditional expression based on the environment input.
Refer directly to the managed resource attribute rather than paste a historical value. Terraform conditional expressions select values based on a boolean condition.