Creating Firewalls Flashcards
What is the focus of today’s video?
The video explores how to create firewall rules in AWS through Terraform.
What is the name of the security group to be created?
The name of the security group should be terraform-firewall.
What are the inbound rules for the security group?
Allow Port 80 from the internet (0.0.0.0).
What are the outbound rules for the security group?
ALLOW ALL.
What is the purpose of a security group in AWS?
A security group acts as a virtual firewall to control inbound and outbound traffic.
How can you find Terraform code to create a security group?
Type ‘Terraform security group’ to access the appropriate documentation.
What is the first block of code to understand when creating a security group?
The aws_security_group block allows you to create a security group in AWS.
What are the two approaches to understand the parts of a Terraform resource?
- Read the documentation. 2. Create a resource from the console.
What is the description of the security group?
Managed from Terraform.
What is the significance of the VPC ID in the security group?
The VPC ID is optional and can be omitted.
What command is used to initialize Terraform?
The command is ‘terraform init’.
What command is used to plan changes in Terraform?
The command is ‘terraform plan’.
What command is used to apply changes in Terraform?
The command is ‘terraform apply’ with auto-approve.
What are ingress and egress rules in security groups?
Ingress refers to inbound rules, while egress refers to outbound rules.
What is the CIDR notation for allowing all IP addresses?
0.0.0.0/0.
What does the IP protocol ‘-1’ signify in outbound rules?
It signifies allowing all protocols.
What is the purpose of specifying a port range?
To allow a range of ports without creating multiple individual rules.
What happens when you change the security group ID in the rules?
The rules will be added to the specified security group instead.
What is the importance of understanding different resource types in Terraform?
Different resource types are managed on different documentation pages.