Deploying to Oracle Cloud Infrastructure with Terraform Ed 1 Quiz Questions and Answers

What Terraform feature is shown in the example below? resource "aws_security_group " "example " { name = "sg-app-web-01 " dynamic "ingress " { for_each = var.service_ports content { from_port = ingress.value to_port = ingress.value protocol = "tcp " } } }

Answer :
  • Dynamic Block

Your organization has moved to AWS and has manually deployed infrastructure using the console. Recently, a decision has been made to standardize Terraform for all deployments moving forward. What can you do to ensure that all existing is managed by Terraform moving forward without interruption to existing services?

Answer :
  • Using terraform-import, import the existing infrastructure into your Terraform state

Given the following snippet of code, what does servers = 4 reference? module "servers " { source = "./modules/aws-servers " servers = 4 }

Answer :
  • the value of an input variable

Can performing a terraform plan can modify the existing Terraform state file?

Answer :
  • FALSE

What happens when a terraform apply command is executed?

Answer :
  • Applies the changes required in the target infrastructure in order to reach the desired configurations.

In Terraform Enterprise, how many VCS repos can be mapped to a workspace?

Answer :
  • 1

Stephen is writing brand new code and needs to ensure it is syntactically valid and internally consistent. Stephen doesn't want to wait for Terraform to access any remote services while making sure his code is valid. What command can he use to accomplish this?

Answer :
  • terraform validate

Select the answer below that completes the following statement: Terraform Cloud can be managed from the CLI but requires __________.

Answer :
  • an API token

Which of the following commands will launch the Interactive console for Terraform interpolations?

Answer :
  • terraform console

Which are some of the benefits of using Infrastructure as Code in general? (Select three)

Answer :
  • It can be reused
  • It can be versioned
  • It can be shared