Hashicorp Terraform Associate
What command can you use to display details about the resource as shown below? resource "aws_internet_gateway" "demo" { vpc_id = aws_ tags = { Name = "demo_igw" } } - Answer- terraform state show aws_internet_ Your organization has multiple engineers that have permission to manage Terraform as well as administrative access to the public cloud where these resources are provisioned. If an engineer makes a change outside of Terraform, what command can you run to detect drift and update the state file? - Answer- terraform apply -refresh-only "To instruct Terraform to refresh the state file based on the current configuration of managed resources, you can use the terraform apply -refresh-only command. If Terraform discovers drift, it will update the state file with the changes." You have infrastructure deployed with Terraform. A developer recently submitted a support ticket to update a security group to permit a new port. To satisfy the ticket, you update the Terraform configuration to reflect the changes and run a Terraform plan. However, a co-worker has since logged into the console and manually updated the security group. What will happen when you run a Terraform apply? - Answer- Nothing. Terraform will validate the infras matches the desired state. After deploying a new virtual machine using Terraform, you find that the local script didn't run properly. However, Terraform reports the virtual machine was successfully created. How can you force Terraform to replace the virtual machine without impacting the rest of the managed infrastructure? - Answer- Use terraform apply -replace to tag the resource for replacement True or False? In order to use the Terraform console command, the CLI must be able to lock state to prevent changes. - Answer- True "The terraform console command will read the Terraform configuration in the current working directory and the Terraform state file from the configured backend so that in
Información del documento
- Subido en
- 11 de septiembre de 2023
- Número de páginas
- 3
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas