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

Add network #7

Merged
merged 2 commits into from
Oct 14, 2023
Merged

Add network #7

merged 2 commits into from
Oct 14, 2023

Conversation

kunduso
Copy link
Owner

@kunduso kunduso commented Oct 14, 2023

This pr closes #6

@kunduso kunduso self-assigned this Oct 14, 2023
@kunduso kunduso temporarily deployed to production October 14, 2023 12:15 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

💰 Infracost estimate: monthly cost will decrease by $4 📉

Project Cost change New monthly cost
kunduso/amazon-elasticache-redis-tf/TFplan.JSON -$4 $0
Infracost output
──────────────────────────────────
Project: kunduso/amazon-elasticache-redis-tf/TFplan.JSON

- aws_eip.nat_gateway[0]
  -$4

    - IP address (if unused)
      -$4

Monthly cost change for kunduso/amazon-elasticache-redis-tf/TFplan.JSON
Amount:  -$4 ($4 → $0.00)

──────────────────────────────────
Key: ~ changed, + added, - removed

14 cloud resources were detected:
∙ 0 were estimated
∙ 14 were free:
  ∙ 4 x aws_route_table
  ∙ 4 x aws_route_table_association
  ∙ 4 x aws_subnet
  ∙ 1 x aws_default_security_group
  ∙ 1 x aws_vpc

Infracost estimate: monthly cost will decrease by $4 ↓
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃ Project                                            ┃ Cost change ┃ New monthly cost ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━┫
┃ kunduso/amazon-elasticache-redis-tf/TFplan.JSON    ┃         -$4 ┃ $0.00            ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━┛
This comment will be updated when the cost estimate changes.

@github-actions
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Terraform Validation 🤖success

Show Plan

terraform
data.aws_availability_zones.available: Reading...
aws_route.internet-route: Refreshing state... [id=r-rtb-07a879baced138b591080289494]
aws_vpc.this: Refreshing state... [id=vpc-0aee610d9ee2f5056]
aws_eip.nat_gateway[0]: Refreshing state... [id=eipalloc-01e06a70b323fcfb9]
aws_internet_gateway.this-igw: Refreshing state... [id=igw-0e608e9414093eb0d]
data.aws_availability_zones.available: Read complete after 0s [id=us-east-2]
aws_route_table.private[2]: Refreshing state... [id=rtb-0be19402a8902cddc]
aws_route_table.private[1]: Refreshing state... [id=rtb-09c463d4787f20931]
aws_route_table.private[0]: Refreshing state... [id=rtb-00fd94662b273fa5f]
aws_route_table.public: Refreshing state... [id=rtb-07a879baced138b59]
aws_default_security_group.default: Refreshing state... [id=sg-017656e5a4e187b27]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  - destroy

Terraform will perform the following actions:

  # aws_eip.nat_gateway[0] will be destroyed
  # (because aws_eip.nat_gateway is not in configuration)
  - resource "aws_eip" "nat_gateway" {
      - allocation_id        = "eipalloc-01e06a70b323fcfb9" -> null
      - domain               = "vpc" -> null
      - id                   = "eipalloc-01e06a70b323fcfb9" -> null
      - network_border_group = "us-east-2" -> null
      - public_dns           = "ec2-18-118-67-157.us-east-2.compute.amazonaws.com" -> null
      - public_ip            = "18.118.67.157" -> null
      - public_ipv4_pool     = "amazon" -> null
      - tags                 = {} -> null
      - tags_all             = {
          - "Source" = "https://github.com/kunduso/add-asg-elb-terraform"
        } -> null
      - vpc                  = true -> null
    }

  # aws_internet_gateway.this-igw will be destroyed
  # (because aws_internet_gateway.this-igw is not in configuration)
  - resource "aws_internet_gateway" "this-igw" {
      - arn      = "arn:aws:ec2:us-east-2:743794601996:internet-gateway/igw-0e608e9414093eb0d" -> null
      - id       = "igw-0e608e9414093eb0d" -> null
      - owner_id = "743794601996" -> null
      - tags     = {
          - "Name" = "app-4-gateway"
        } -> null
      - tags_all = {
          - "Name"   = "app-4-gateway"
          - "Source" = "https://github.com/kunduso/add-asg-elb-terraform"
        } -> null
      - vpc_id   = "vpc-0aee610d9ee2f5056" -> null
    }

  # aws_route.internet-route will be destroyed
  # (because aws_route.internet-route is not in configuration)
  - resource "aws_route" "internet-route" {
      - destination_cidr_block = "0.0.0.0/0" -> null
      - gateway_id             = "igw-0e608e9414093eb0d" -> null
      - id                     = "r-rtb-07a879baced138b591080289494" -> null
      - origin                 = "CreateRoute" -> null
      - route_table_id         = "rtb-07a879baced138b59" -> null
      - state                  = "active" -> null
    }

  # aws_route_table_association.private[0] will be created
  + resource "aws_route_table_association" "private" {
      + id             = (known after apply)
      + route_table_id = "rtb-00fd94662b273fa5f"
      + subnet_id      = (known after apply)
    }

  # aws_route_table_association.private[1] will be created
  + resource "aws_route_table_association" "private" {
      + id             = (known after apply)
      + route_table_id = "rtb-09c463d4787f20931"
      + subnet_id      = (known after apply)
    }

  # aws_route_table_association.private[2] will be created
  + resource "aws_route_table_association" "private" {
      + id             = (known after apply)
      + route_table_id = "rtb-0be19402a8902cddc"
      + subnet_id      = (known after apply)
    }

  # aws_route_table_association.public[0] will be created
  + resource "aws_route_table_association" "public" {
      + id             = (known after apply)
      + route_table_id = "rtb-07a879baced138b59"
      + subnet_id      = (known after apply)
    }

  # aws_subnet.private[0] will be created
  + resource "aws_subnet" "private" {
      + arn                                            = (known after apply)
      + assign_ipv6_address_on_creation                = false
      + availability_zone                              = "us-east-2a"
      + availability_zone_id                           = (known after apply)
      + cidr_block                                     = "10.20.32.0/27"
      + enable_dns64                                   = false
      + enable_resource_name_dns_a_record_on_launch    = false
      + enable_resource_name_dns_aaaa_record_on_launch = false
      + id                                             = (known after apply)
      + ipv6_cidr_block_association_id                 = (known after apply)
      + ipv6_native                                    = false
      + map_public_ip_on_launch                        = false
      + owner_id                                       = (known after apply)
      + private_dns_hostname_type_on_launch            = (known after apply)
      + tags                                           = {
          + "Name" = "app-4-private-1"
        }
      + tags_all                                       = {
          + "Name"   = "app-4-private-1"
          + "Source" = "https://github.com/kunduso/add-asg-elb-terraform"
        }
      + vpc_id                                         = "vpc-0aee610d9ee2f5056"
    }

  # aws_subnet.private[1] will be created
  + resource "aws_subnet" "private" {
      + arn                                            = (known after apply)
      + assign_ipv6_address_on_creation                = false
      + availability_zone                              = "us-east-2b"
      + availability_zone_id                           = (known after apply)
      + cidr_block                                     = "10.20.32.32/27"
      + enable_dns64                                   = false
      + enable_resource_name_dns_a_record_on_launch    = false
      + enable_resource_name_dns_aaaa_record_on_launch = false
      + id                                             = (known after apply)
      + ipv6_cidr_block_association_id                 = (known after apply)
      + ipv6_native                                    = false
      + map_public_ip_on_launch                        = false
      + owner_id                                       = (known after apply)
      + private_dns_hostname_type_on_launch            = (known after apply)
      + tags                                           = {
          + "Name" = "app-4-private-2"
        }
      + tags_all                                       = {
          + "Name"   = "app-4-private-2"
          + "Source" = "https://github.com/kunduso/add-asg-elb-terraform"
        }
      + vpc_id                                         = "vpc-0aee610d9ee2f5056"
    }

  # aws_subnet.private[2] will be created
  + resource "aws_subnet" "private" {
      + arn                                            = (known after apply)
      + assign_ipv6_address_on_creation                = false
      + availability_zone                              = "us-east-2c"
      + availability_zone_id                           = (known after apply)
      + cidr_block                                     = "10.20.32.64/27"
      + enable_dns64                                   = false
      + enable_resource_name_dns_a_record_on_launch    = false
      + enable_resource_name_dns_aaaa_record_on_launch = false
      + id                                             = (known after apply)
      + ipv6_cidr_block_association_id                 = (known after apply)
      + ipv6_native                                    = false
      + map_public_ip_on_launch                        = false
      + owner_id                                       = (known after apply)
      + private_dns_hostname_type_on_launch            = (known after apply)
      + tags                                           = {
          + "Name" = "app-4-private-3"
        }
      + tags_all                                       = {
          + "Name"   = "app-4-private-3"
          + "Source" = "https://github.com/kunduso/add-asg-elb-terraform"
        }
      + vpc_id                                         = "vpc-0aee610d9ee2f5056"
    }

  # aws_subnet.public[0] will be created
  + resource "aws_subnet" "public" {
      + arn                                            = (known after apply)
      + assign_ipv6_address_on_creation                = false
      + availability_zone                              = "us-east-2a"
      + availability_zone_id                           = (known after apply)
      + cidr_block                                     = "10.20.32.96/27"
      + enable_dns64                                   = false
      + enable_resource_name_dns_a_record_on_launch    = false
      + enable_resource_name_dns_aaaa_record_on_launch = false
      + id                                             = (known after apply)
      + ipv6_cidr_block_association_id                 = (known after apply)
      + ipv6_native                                    = false
      + map_public_ip_on_launch                        = false
      + owner_id                                       = (known after apply)
      + private_dns_hostname_type_on_launch            = (known after apply)
      + tags                                           = {
          + "Name" = "app-4-public-1"
        }
      + tags_all                                       = {
          + "Name"   = "app-4-public-1"
          + "Source" = "https://github.com/kunduso/add-asg-elb-terraform"
        }
      + vpc_id                                         = "vpc-0aee610d9ee2f5056"
    }

Plan: 8 to add, 0 to change, 3 to destroy.

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: TFplan.JSON

To perform exactly these actions, run the following command to apply:
    terraform apply "TFplan.JSON"

Pushed by: @kunduso, Action: pull_request

@kunduso kunduso merged commit 58ed0ce into main Oct 14, 2023
@kunduso kunduso deleted the add-network branch October 14, 2023 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

correct subnet cidrs
1 participant