Question 1
A financial services company is using OCI Resource Manager to deploy a complex, multi-VCN architecture. The lead DevOps engineer needs to ensure that sensitive outputs, such as a database administrator's initial password, are not displayed in the stack's log files or stored in the state file in plain text. Which Terraform language feature should be used in the configuration to achieve this?
Answer and explanation
Correct answer: B
The correct way to prevent a Terraform output value from being displayed in logs is to mark it as sensitive. By setting the sensitive = true argument in the output block, Terraform will redact the value from CLI output. OCI Resource Manager respects this flag and will also hide the value in its logs and state file displays, providing the necessary security for sensitive information.