← Back to Lab

EC2 Terraform Basics — Technical Quiz

0/15

answered

1

What does terraform init do?

2

What does the version constraint ~> 5.0 allow?

3

What is the purpose of Terraform state?

4

What is the key difference between STOPPING and TERMINATING an EC2 instance?

5

When does user_data run on an EC2 instance?

6

Which statement about Security Groups vs Network ACLs (NACLs) is correct?

7

You allow inbound HTTP on port 80 in a Security Group. Do you also need an egress rule to allow the response traffic back to the client?

8

How does Terraform determine the order to create resources?

9

What is the difference between terraform plan and terraform apply?

10

Should .terraform.lock.hcl be committed to version control?

11

Why is a remote backend (e.g., S3 + DynamoDB) recommended for Terraform state in a team environment?

12

What does an Amazon Machine Image (AMI) contain?

13

When would you use an Elastic IP (EIP) instead of the default public IP?

14

How would you restrict SSH access in a Security Group to a single trusted IP?

15

What are Terraform output values used for?