How could you reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?
The correct way to reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration isdata.vsphere_datacenter.dc.id. This follows the syntax for accessing data source attributes, which isdata.TYPE.NAME.ATTRIBUTE. In this case, the data source type isvsphere_datacenter, the data source name isdc, and the attribute we want to access isid. The other options are incorrect because they either use the wrong syntax, the wrong punctuation, or the wrong case.Reference= [Data Source: vsphere_datacenter], [Data Source: vsphere_folder], [Expressions: Data Source Reference]
What are some benefits of using Sentinel with Terraform Cloud/Terraform Cloud? Choose three correct answers.
Sentinel is a policy-as-code framework that allows you to define and enforce rules on your Terraform configurations, states, and plans1. Some of the benefits of using Sentinel with Terraform Cloud/Terraform Enterprise are:
* You can restrict specific resource configurations, such as disallowing the use of CIDR=0.0.0.0/0, which would open up your network to the entire internet. This can help you prevent misconfigurations or security vulnerabilities in your infrastructure2.
* Policy-as-code can enforce security best practices, such as requiring encryption, authentication, or compliance standards. This can help you protect your data and meet regulatory requirements3.
* You can enforce a list of approved AWS AMIs, which are pre-configured images that contain the operating system and software you need to run your applications. This can help you ensure consistency, reliability, and performance across your infrastructure4.
Reference =
* 1: Terraform and Sentinel | Sentinel | HashiCorp Developer
* 2: Terraform Learning Resources: Getting Started with Sentinel in Terraform Cloud
* 3: Exploring the Power of HashiCorp Terraform, Sentinel, Terraform Cloud ...
* 4: Using New Sentinel Features in Terraform Cloud - Medium
Which of the following module source paths does not specify a remote module?
The module source path that does not specify a remote module issource = 'module/consul'. This specifies a local module, which is a module that is stored in a subdirectory of the current working directory. The other options are all examples of remote modules, which are modules that are stored outside of the current working directory and can be accessed by various protocols, such as Git, HTTP, or the Terraform Registry. Remote modules are useful for sharing and reusing code across different configurations and environments.Reference= [Module Sources], [Local Paths], [Terraform Registry], [Generic Git Repository], [GitHub]
When should you run terraform init?
You should runterraform initafter you start coding a new Terraform project and before you runterraform planfor the first time. This command will initialize the working directory by downloading the required providers and modules, creating the initial state file, and performing other necessary tasks.Reference= : Initialize a Terraform Project
Which of the following module source paths does not specify a remote module?
The module source path that does not specify a remote module issource = 'module/consul'. This specifies a local module, which is a module that is stored in a subdirectory of the current working directory. The other options are all examples of remote modules, which are modules that are stored outside of the current working directory and can be accessed by various protocols, such as Git, HTTP, or the Terraform Registry. Remote modules are useful for sharing and reusing code across different configurations and environments.Reference= [Module Sources], [Local Paths], [Terraform Registry], [Generic Git Repository], [GitHub]
Currently there are no comments in this discussion, be the first to comment!