🌙 Dark Mode
Test Your Knowledge: AWS EC2 and Security Group with Terraform
1. What is the purpose of the AWS provider block in Terraform?
To specify the cloud provider and region
To define the EC2 instance
To create a security group
2. What does the `ami` argument in the `aws_instance` resource specify?
The Amazon Machine Image (AMI) ID
The instance type
The security group name
3. What is the purpose of the `instance_type` argument in the `aws_instance` resource?
To define the size and capacity of the instance
To specify the AMI ID
To define the security group
4. What does the `key_name` argument in the `aws_instance` resource specify?
The key pair used for SSH access
The AMI ID
The instance type
5. What is the purpose of the `security_groups` argument in the `aws_instance` resource?
To associate the instance with a security group
To define the AMI ID
To specify the instance type
6. What is the purpose of the `aws_security_group` resource?
To define inbound and outbound traffic rules
To create an EC2 instance
To specify the AMI ID
7. What does the `ingress` block in the `aws_security_group` resource define?
Inbound traffic rules
Outbound traffic rules
The instance type
8. What does the `egress` block in the `aws_security_group` resource define?
Outbound traffic rules
Inbound traffic rules
The AMI ID
Submit Quiz