Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial code and issues #1

Open
TDWolff opened this issue Jul 8, 2024 · 0 comments
Open

Initial code and issues #1

TDWolff opened this issue Jul 8, 2024 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@TDWolff
Copy link
Contributor

TDWolff commented Jul 8, 2024

This script sets up a cloud infrastructure on AWS. It starts by setting up a Virtual Private Cloud (VPC) with a specific IP range. Within this VPC, it creates several subnets, each with its own IP range and associated with a specific availability zone.

The script then sets up security groups, which act as virtual firewalls controlling inbound and outbound traffic for the instances. Each security group is associated with a specific subnet and has rules for specific types of traffic.

Next, the script creates several EC2 instances, which are virtual servers in the AWS cloud. Each instance is associated with a specific subnet and security group, and uses a specific Amazon Machine Image (AMI) and instance type.

The script also sets up an internet gateway and a NAT gateway to allow the instances to communicate with the internet. It creates a route table that directs traffic from the instances to the internet gateway.

Finally, the script sets up an application load balancer that distributes incoming traffic across multiple targets, in this case, two of the EC2 instances. The load balancer uses a target group to handle health checks and to determine where to route traffic.

In summary, this script sets up a secure, scalable, and highly available cloud infrastructure on AWS. It includes a VPC, subnets, security groups, EC2 instances, an internet gateway, a NAT gateway, a route table, and a load balancer.


Found Issues

  • Problem: When user tries to do terraform plan -var-file secrets.tfvars the terminal comes back with errors and the message indicates that there is an unsupported block type "listener" in your aws_lb resource declaration. In Terraform, the aws_lb resource does not support a nested listener block. Instead, listeners should be defined separately using the aws_lb_listener resource
  • Fix: Remove the listener block from your aws_lb resource, \add a new aws_lb_listener resource to define your listener, replace aws_lb_target_group.example.arn with the ARN of your target group. the warnins is indicating that the vpc argument in your aws_eip resource is deprecated. You should replace it with the domain argument:
@TDWolff TDWolff added bug Something isn't working documentation Improvements or additions to documentation labels Jul 8, 2024
TDWolff added a commit that referenced this issue Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant