Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 46 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 46
Topic #: 1
[All Terraform Associate Questions]

Examine the following Terraform configuration, which uses the data source for an AWS AMI.
What value should you enter for the ami argument in the AWS instance resource?

  • A. aws_ami.ubuntu
  • B. data.aws_ami.ubuntu
  • C. data.aws_ami.ubuntu.id
  • D. aws_ami.ubuntu.id
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Jaro3000
Highly Voted 2 years, 5 months ago
C is correct.
upvoted 12 times
...
Bere
Highly Voted 1 year, 3 months ago
Selected Answer: C
In the context of the example given in the question: data "aws_ami" "ubuntu" { most_recent = true filter { name = "name" values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"] } filter { name = "virtualization-type" values = ["hvm"] } owners = ["099720109477"] # Canonical } resource "aws_instance" "web" { ami = data.aws_ami.ubuntu.id instance_type = "t2.micro" tags = { Name = "HelloWorld" } }
upvoted 6 times
...
Ni33
Most Recent 1 year, 6 months ago
Selected Answer: C
C is the correct answer
upvoted 1 times
...
Power123
1 year, 7 months ago
Answer is C
upvoted 1 times
...
0ptimus
2 years, 2 months ago
Selected Answer: C
data.aws_ami.ubuntu.id
upvoted 1 times
...
Ahmad_Terraform
2 years, 4 months ago
data.aws_ami.ubuntu.id
upvoted 3 times
...
Eltooth
2 years, 5 months ago
Selected Answer: C
C is correct answer. https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance
upvoted 6 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...