Q1. Calling a child module. Specifies the moudel version. During a terraform init, what happen if the version parameter is removed?
- Terraform would use the existing module already downloaded.
Q2. Alias
provider "aws" {
region = "us-east-1"
}
provider "aws" {
alias = "west"
region = "us-west-2"
}
provider "aws" {
alias = "eu"
region = "eu-west-2"
}
Using the same provider with diffeent configs for difference resources.
Q3. A deployed a new EC2 through the console. B imports the new EC2 instance.
$ terraform import aws_instance.web_app_42 i-b54a26b28b8acv7233
Has been coded. It brings Error: resource address "aws_instance.web_app_42" does not exist in the configuration.
To solve this...
Create a configuration for the new resource in the Terraform configuration file.
Q4. Which of the following commands can be used to detect configuration drift?
terraform apply -refresh-only
resource "aws_subnet" "private_subnet" {
count = length(var.private_subnet_names)
Q7.
resource "aws_instance" "database" {
# ...
for_each = {
"vault": "secrets",
"terraform": "infrastructure",
"consul": "networking",
"nomad": "scheduler"
}
}
aws_instance.database["vault"]
aws_instance.database["terraform"]
aws_instance.database["consul"]
aws_instance.database["nomad"]
Q8. Main.tf is always required ?
No. any file with a .tf or .tf.json will be okay.
Q9.
[AWS] Dive Into OpenSearch Service: Hands-on workshop (0) | 2024.02.13 |
---|---|
[DeepLearning.AI] ChatGPT Prompt Engineering for Developers (0) | 2024.02.12 |
[Terraform] Terraform Certified Associate (0) | 2024.02.02 |
[Terraform] Setup (0) | 2024.02.01 |
Threading과 Starmap의 차이 (0) | 2024.01.23 |