Terraform Associate Practice Exam

Question: 1 / 400

What is the impact of marking a variable as sensitive in Terraform?

It makes the variable publicly accessible in the state file

It prevents the variable from being displayed in plan and apply outputs

Marking a variable as sensitive in Terraform has a significant impact on how that variable is handled throughout the lifecycle of a Terraform configuration. When a variable is designated as sensitive, it is specifically designed to prevent it from being displayed in Terraform's output, including the console or any log files, during commands like `terraform plan` or `terraform apply`. This is crucial for security reasons, as sensitive data often involves secrets, passwords, or tokens that should not be exposed publicly or logged, thereby helping to protect against unauthorized access.

However, even though marking a variable as sensitive prevents it from being printed in the outputs, it does not encrypt the variable or restrict its use in any comparisons. The variable remains usable within the configuration files and can be utilized wherever necessary, except in scenarios where the output is displayed. This distinction is important; it ensures security while maintaining functional flexibility in Terraform configurations.

Get further explanation with Examzify DeepDiveBeta

It restricts the variable from being used in any comparison

It ensures the variable is encrypted in the Terraform code

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy