Courseiva

CCNA Hcp Terraform Governance Questions

33 questions · Hcp Terraform Governance topic · All types, answers revealed

1
MCQhard

If a Terraform run is stuck in a 'Policy Check' phase, which step should an administrator take?

A.Check the Policy Set configuration and execution logs.
B.Trigger a new plan.
C.Delete and recreate the workspace.
D.Disable the policy check.
AnswerA

Reviewing the Policy Set logs helps identify if a policy script is hanging or failing.

Why this answer

If the policy check is stuck, it may indicate a timeout or an issue with the policy engine execution environment.

2
Multi-Selecthard

Which TWO of the following scenarios would lead to an 'Error' status in a Terraform run within HCP Terraform?

Select 2 answers
A.A soft-mandatory Sentinel policy warning.
B.A hard-mandatory Sentinel policy failure.
C.The workspace is locked by another run.
D.Incorrect AWS credentials preventing plan execution.
E.Invalid HCL syntax in the configuration.
AnswersD, E

Authentication failures cause the plan phase to error out.

Why this answer

Errors occur during the plan phase if the configuration is invalid or if there are provider authentication failures.

3
MCQhard

You want to trigger a run only when a specific file within a module path changes. How do you configure this?

A.Use the 'VCS Triggers' setting in the workspace.
B.Use a 'trigger_path' variable in the Terraform code.
C.Modify the '.terraform-version' file.
D.Use a Sentinel policy to filter changes.
AnswerA

VCS path filters allow you to restrict runs to specific directories.

Why this answer

The VCS path filter in the workspace configuration allows you to define which directory changes trigger a new run.

4
Multi-Selecthard

Which TWO of the following are required to successfully integrate VCS with HCP Terraform?

Select 2 answers
A.A direct peering link.
B.A VPN connection between AWS and HCP Terraform.
C.A static IP address for the organization.
D.An OAuth application created in the VCS provider.
E.A configured VCS connection in the organization settings.
AnswersD, E

This establishes the link between the two services.

Why this answer

A VCS connection requires an OAuth application authorized in your VCS provider and the connection setup in the HCP Terraform organization settings.

5
Multi-Selectmedium

Which THREE of the following are required components of a Sentinel Policy Set?

Select 3 answers
A.A paid subscription license key.
B.A list of policies.
C.A list of allowed IP addresses.
D.A VCS repository containing the policy code.
E.A defined scope of workspaces.
AnswersB, D, E

The set must contain the actual policies.

Why this answer

Policy sets require a name, a link to the policy code (VCS), and a definition of which workspaces apply to the policies.

6
MCQmedium

In the context of team permissions, what does the 'Admin' role on an organization allow?

A.Permission to create new organizations.
B.Read access to logs only.
C.Access to view the billing credit card information.
D.Full control over all resources in the organization.
AnswerD

Organization admins have broad permissions over the entire environment.

Why this answer

The organization Admin role provides full control over all projects, workspaces, and team memberships within the organization.

7
Multi-Selecteasy

Which TWO of the following are valid ways to trigger a run in an HCP Terraform workspace?

Select 2 answers
A.Pushing a change to the linked VCS repository.
B.Using a local API key for authentication.
C.Modifying the state file directly.
D.Executing 'terraform apply' locally.
E.Clicking 'Queue plan' in the HCP Terraform UI.
AnswersA, E

VCS integration is a primary trigger method.

Why this answer

Runs can be triggered via manual clicks in the UI or by pushing code changes to a connected VCS repository.

8
MCQmedium

You want to enforce a policy that prevents creating AWS EC2 instances larger than 't3.medium'. Where do you configure this?

A.By modifying the Terraform provider source.
B.Inside an HCP Terraform Policy Set.
C.In the Private Module Registry settings.
D.Within the workspace's variables.
AnswerB

Policy Sets are the containers for Sentinel policies applied to workspaces.

Why this answer

Sentinel policies are written in HCL and uploaded to Policy Sets, which are then associated with workspaces.

9
MCQhard

A team reports that their Terraform plan is failing because it cannot find a provider version. What is the most likely cause if the provider is in the Private Module Registry?

A.The provider is not configured in the 'required_providers' block.
B.The Private Module Registry does not host providers.
C.The workspace is in 'Local' execution mode.
D.The organization's subscription does not allow custom providers.
AnswerA

Terraform requires explicit declaration of provider requirements.

Why this answer

Providers and Modules are different concepts in HCP Terraform. If a provider is required, it must be available in the registry or the provider cache.

10
Multi-Selecthard

Which THREE of the following items can be included in a Variable Set?

Select 3 answers
A.Terraform variables.
B.Environment variables.
C.Terraform provider configurations.
D.Sentinel policy sets.
E.Scope definition (Projects or Organization).
AnswersA, B, E

Standard Terraform input variables.

Why this answer

Variable sets can contain Terraform variables, environment variables, and can be scoped to specific projects or organizations.

11
MCQmedium

You need to automate the publication of a module to the Private Module Registry. What should you do?

A.Run the 'terraform publish' command.
B.Push a release tag to the linked VCS repository.
C.Manually upload the zip file to the registry.
D.Configure a webhook in the workspace settings.
AnswerB

Tagging a version in the VCS repo is the standard trigger for module publication.

Why this answer

HCP Terraform monitors your VCS repository; when you push a new release tag (e.g., v1.0.0), it automatically triggers the publication to the registry.

12
MCQeasy

Where can you define variables that apply to all workspaces within an organization in HCP Terraform?

A.In the Private Module Registry.
B.In a Variable Set.
C.In the individual workspace configuration.
D.In the organization settings directly.
AnswerB

Variable Sets are designed for global or group-wide variable management.

Why this answer

Variable Sets allow you to group variables and apply them across multiple workspaces simultaneously.

13
MCQmedium

What is the purpose of 'Project' in HCP Terraform?

A.To define the Sentinel policies for an environment.
B.To store Terraform state files securely.
C.To group workspaces and manage access control for teams.
D.To define the cloud provider budget.
AnswerC

Projects provide a logical grouping for workspaces and RBAC scope.

Why this answer

Projects are used to group workspaces, allowing for easier team permission management and organization.

14
Multi-Selecteasy

Which THREE of the following are benefits of using projects to organize workspaces?

Select 3 answers
A.Improved workspace discovery.
B.Simplified RBAC management for teams.
C.Logical grouping for complex organizations.
D.Faster plan execution speeds.
E.Automatic state backup.
AnswersA, B, C

Organizing by project makes it easier for users to find relevant workspaces.

Why this answer

Projects improve team isolation, simplify permission management, and help structure large organizations.

15
MCQhard

If an organization wants to allow teams to manage their own workspaces but prevent them from viewing other teams' workspaces, how should they configure HCP Terraform?

A.Assign teams access at the Project level rather than the Organization level.
B.Enable 'Organization-wide' access for all teams.
C.Use individual workspace permissions instead of projects.
D.Create a separate organization for each team.
AnswerA

Project-based RBAC allows for granular isolation between teams.

Why this answer

By creating separate Projects and assigning teams specific permissions only to their relevant Projects, you achieve isolation.

16
MCQeasy

Which of the following can be used to monitor costs in an HCP Terraform workspace?

A.Terraform State inspection.
B.Sentinel Policy sets.
C.Cost Estimation feature.
D.VCS commit logs.
AnswerC

Cost estimation provides financial impact analysis during plan.

Why this answer

Cost Estimation is the specific feature for tracking the monetary impact of infrastructure changes.

17
MCQeasy

A team is using the Private Module Registry and needs to ensure that only approved module versions are available for use in workspaces. Which feature should they implement?

A.Implement Sentinel policies on the registry.
B.Enable auto-publish for all versions.
C.Set the module to Private and grant access only to specific organizations.
D.Use module sharing permissions to manage access to the registry.
AnswerD

Sharing levels in the Private Module Registry allow you to define who can see and use your modules.

Why this answer

Module sharing levels allow teams to restrict access to modules, but 'Module Versioning' and 'Module Status' (beta/deprecated) are the standard ways to manage availability in the Private Module Registry.

18
Multi-Selectmedium

Which TWO of the following are true regarding Private Module Registry versioning?

Select 2 answers
A.Versions can be deleted at any time without restriction.
B.Versions must follow Semantic Versioning (SemVer).
C.You can only have one version per module.
D.Versions are created manually by uploading files.
E.The Registry automatically detects new tags as module versions.
AnswersB, E

HCP Terraform requires SemVer for module versions.

Why this answer

Versions are managed by tags in VCS, and Semantic Versioning (SemVer) is required.

19
MCQeasy

Which type of Sentinel policy is used to block a run without possibility of override?

A.Advisory.
B.Policy-Override.
C.Soft-mandatory.
D.Hard-mandatory.
AnswerD

Hard-mandatory policies cannot be overridden.

Why this answer

Hard-mandatory policies require the policy to pass before the run can proceed; they cannot be overridden.

20
MCQhard

How can you view the detailed breakdown of cost estimates for a specific Terraform plan?

A.Run the 'terraform show' command on the state file.
B.Check the cloud provider's billing dashboard.
C.Use the Sentinel CLI tool.
D.Open the run page in the HCP Terraform UI.
AnswerD

The UI provides the interface to view cost estimation data.

Why this answer

The run details page in the HCP Terraform UI displays the cost estimation summary, which can be expanded for details.

21
MCQeasy

What happens if a Sentinel policy results in an 'advisory' output?

A.The plan is marked as failed.
B.The run logs display a warning, but the process continues.
C.The policy is treated as a hard-mandatory failure.
D.The run is paused for manual intervention.
AnswerB

Advisory policies are for non-blocking feedback.

Why this answer

Advisory policies provide information or warnings in the run logs but do not block the execution.

22
MCQmedium

When configuring team permissions, what does the 'Workspace: Settings' permission allow?

A.Viewing plan and apply logs only.
B.Triggering runs manually.
C.Modifying workspace settings like variable sets and execution modes.
D.Deleting the workspace.
AnswerC

Settings permission specifically grants access to configure the workspace environment.

Why this answer

The 'Settings' permission allows users to modify workspace configurations, including variable sets and notification settings.

23
Multi-Selecteasy

Which THREE of the following attributes are available to a Sentinel policy via the 'tfrun' import?

Select 3 answers
A.User who triggered the run.
B.The provider source code.
C.The raw state file contents.
D.Workspace name.
E.Organization name.
AnswersA, D, E

The policy knows the actor.

Why this answer

The 'tfrun' import provides access to metadata about the current run, including the workspace, the user, and the organization.

24
MCQeasy

When using Cost Estimation in HCP Terraform, which of the following is true?

A.It calculates costs based on real-time AWS billing API calls.
B.It applies to all resources, including custom providers.
C.It requires the Terraform provider to support the cost estimation feature.
D.It only works for paid HCP Terraform tiers.
AnswerC

Only providers with specific cost metadata support this feature.

Why this answer

HCP Terraform uses the current plan to calculate cost impact against the existing state.

25
MCQhard

How can you restrict the ability of team members to delete workspaces?

A.Set the workspace status to 'Locked'.
B.Change the workspace execution mode to local.
C.Remove the 'Delete' permission from the team's project-level permissions.
D.Enable 'Prevent Destroy' in Terraform code.
AnswerC

Project-level permissions allow managing workspace lifecycles.

Why this answer

RBAC in HCP Terraform is granular. You must ensure users do not have the 'Admin' or 'Delete' permissions on the specific workspace.

26
MCQeasy

Which of the following is an advantage of using Variable Sets?

A.They centralize variable management to avoid duplication across workspaces.
B.They allow for secret rotation in AWS.
C.They automatically run Terraform plans.
D.They provide encryption for state files.
AnswerA

Centralization is the primary purpose of Variable Sets.

Why this answer

Variable Sets avoid duplication by allowing you to define a set of variables once and reuse them across multiple workspaces.

27
MCQeasy

Which of the following is a primary benefit of using a Private Module Registry?

A.It encrypts all Terraform state files.
B.It allows central management and version control of reusable modules.
C.It forces all workspaces to use the same module versions.
D.It automatically generates cost estimates for all modules.
AnswerB

This is the core value proposition of the Private Module Registry.

Why this answer

The Private Module Registry allows organizations to share verified, reusable infrastructure code internally.

28
Multi-Selectmedium

Which THREE of the following can be managed using team permissions in HCP Terraform?

Select 3 answers
A.Project visibility.
B.Global IP firewalling.
C.Workspace access.
D.Organization billing limits.
E.Module Registry access.
AnswersA, C, E

Permissions control who can see projects.

Why this answer

Permissions control access to workspaces, projects, and the registry.

29
MCQmedium

You are configuring RBAC in HCP Terraform. A user needs to trigger runs and view plan logs but should not be allowed to modify workspace variables. Which permission set is appropriate?

A.Grant Admin access.
B.Grant 'Read' and 'Queue Plan' permissions.
C.Grant 'Manage Variables' permission.
D.Grant 'Write' permission to the workspace.
AnswerB

Queue Plan allows triggering runs, while Read allows viewing logs without changing variables.

Why this answer

The 'read' and 'write' permissions are distinct. Specifically, the 'Plan' permission allows triggering runs, while 'Manage' permissions are required for variables.

30
MCQhard

A Sentinel policy is failing on a cost estimation result. What is the most likely cause if the cost estimation feature is enabled but the policy still fails?

A.The cost estimation provider is not configured for AWS.
B.The workspace does not have Sentinel enabled.
C.The API key for AWS is invalid.
D.The policy attempts to access cost data before the estimation has completed.
AnswerD

Policies run after the plan; if cost estimation hasn't finalized, the policy might throw an error.

Why this answer

Sentinel policies can access the cost estimation data via the 'tfrun' import, but if the estimation is still in progress or failed to generate, the policy will fail.

31
MCQhard

What is the result of a 'soft-mandatory' Sentinel policy failing during a run?

A.The run is immediately aborted.
B.The policy is skipped automatically.
C.The run pauses and waits for an override.
D.The run completes but triggers an alert.
AnswerC

Soft-mandatory policies require manual override to proceed.

Why this answer

Soft-mandatory policies allow a user with the appropriate permissions to override the failure and continue the run.

32
MCQmedium

You need to ensure that all workspaces use a specific set of tags. How can this be enforced?

A.Using an HCP Terraform Sentinel policy.
B.Using a VCS branch protection rule.
C.Using a variable validation block.
D.Enabling 'Strict Mode' in the organization settings.
AnswerA

Sentinel can evaluate workspace attributes via the 'tfrun' import.

Why this answer

Sentinel can inspect the workspace configuration metadata, including tags, to ensure compliance.

33
Multi-Selecteasy

Which TWO of the following are standard stages of an HCP Terraform run pipeline?

Select 2 answers
A.Policy Check.
B.Code linting.
C.Plan.
D.Automatic refactoring.
E.State migration.
AnswersA, C

Policy checking follows the plan.

Why this answer

The pipeline consists of Plan, Policy Check, and Apply stages.

Ready to test yourself?

Try a timed practice session using only Hcp Terraform Governance questions.