Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 104

Your risk management organization requires that new AWS S3 buckets must be private and encrypted at rest. How can Terraform Enterprise automatically and proactively enforce this security control?

    Correct Answer: A

    Terraform Enterprise can enforce security controls through the use of Sentinel policies. Sentinel is a policy as code framework that integrates with Terraform Enterprise and checks compliance with predefined rules before each 'apply' operation. By using a Sentinel policy, it ensures that all new S3 buckets are private and encrypted at rest, proactively preventing non-compliant resources from being created or updated.

Discussion
campsOption: A

A. With a Sentinel policy, which runs before every apply. Terraform Enterprise can enforce security controls through the use of Sentinel policies. Sentinel is a policy as code framework that integrates with Terraform Enterprise and can be used to enforce specific security controls. In this case, the Sentinel policy could check that all new S3 buckets are set to be private and encrypted at rest and prevent the Terraform apply from proceeding if the buckets do not meet this requirement. This ensures that the security control is automatically and proactively enforced every time Terraform makes changes to the infrastructure.

mav3r1ckOption: A

A. Reference: https://docs.hashicorp.com/sentinel/intro/what https://medium.com/hashicorp-engineering/enforcing-aws-s3-security-best-practice-using-terraform-sentinel-ddcd181ff4b7

NunyabiznesOption: A

import "tfplan" # Ensure all new S3 buckets are private and encrypted at rest deny[msg] { resources := tfplan.module_paths["aws_s3_bucket"] not all_true([ for r in resources: r.attributes.acl == "private" and r.attributes.server_side_encryption_configuration.0.rule.0.apply_server_side_encryption_by_default.0.sse_algorithm == "AES256" ]) msg := "All new S3 buckets must be private and encrypted at rest" }

SilentMilliOption: A

Terraform Enterprise provides the ability to enforce security controls through Sentinel policies, which are a form of policy as code. Sentinel policies allow you to define and enforce organizational or regulatory policies by creating a set of rules that run before each Terraform operation.

bora4motionOption: A

I go with A.

BurakkoOption: A

With a Sentinel policy for sure.

selvaraj133eceOption: B

Answer, B only. They want to keep the S3 bucket private. So, it will be a different state file.

Rohit000003Option: A

As per terraform document

Ni33Option: A

AAAAAAAAAAA

Power123Option: A

A is correct

Ame2222Option: A

A is correct

Daro_Option: A

yes A Corrct

seif1993Option: A

yes A Corrct

RVivekOption: A

Sentinel policy is the best way to manage multiple workspaces