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

CI: update var in terraform workflow #21

Merged
merged 4 commits into from
Dec 16, 2024
Merged

Conversation

DrInTech22
Copy link
Owner

No description provided.

Copy link

github-actions bot commented Dec 16, 2024

💰 Infracost report

Consider fixing this issue, it doesn't align with your company's FinOps policies & the Well-Architected Framework.

Tagging policies
🔴 FinOps tags

This example Tagging policy shows how you can enforce required FinOps tag keys/values in pull requests. This example checks for the tags 'Service' (can have any value) and 'Environment' (must be Dev/Stage/Prod) on all taggable resources being changed in the pull request. You can adjust it from https://dashboard.infracost.io > Governance > Tagging policies. You have a 14 day trial of this feature as it's part of Infracost Cloud.

resource aws_instance.ec2

  • Missing mandatory tag Environment. Must be one of Dev, Stage, Prod. Consider using default tags to avoid adding tags to individual resources.
  • Missing mandatory tag root_block_device.Environment. Must be one of Dev, Stage, Prod. Consider using default tags to avoid adding tags to individual resources.
  • Missing mandatory tags: Service, root_block_device.Service. Consider using default tags to avoid adding tags to individual resources.

in project DrInTech22/full-stack-gitops/terraform

Monthly estimate increased by $6 📈
Changed project Baseline cost Usage cost* Total change New monthly cost
DrInTech22/full-stack-gitops/terraform +$6 - +$6 (+10%) $69

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

Estimate details
Key: * usage cost, ~ changed, + added, - removed

──────────────────────────────────
Project: DrInTech22/full-stack-gitops/terraform

~ aws_instance.ec2
  +$37 ($31 → $69)

    ~ Instance usage (Linux/UNIX, on-demand, t3.medium → t2.large)
      +$37 ($30 → $68)

- aws_instance.ec2-2
  -$31

    - Instance usage (Linux/UNIX, on-demand, t3.medium)
      -$30

    - root_block_device

        - Storage (general purpose SSD, gp2)
          -$0.80

Monthly cost change for DrInTech22/full-stack-gitops/terraform
Amount:  +$6 ($62 → $69)
Percent: +10%

──────────────────────────────────
Key: * usage cost, ~ changed, + added, - removed

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

13 cloud resources were detected:
∙ 7 were estimated
∙ 6 were free

This comment will be updated when code changes.

Copy link

Terraform Plan 📖success

Show Plan
[command]/home/runner/work/_temp/9bd22c0c-0710-40d0-aadc-b1c94cf73c67/terraform-bin show -no-color tfplan.out

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

Terraform will perform the following actions:

  # aws_instance.ec2 will be created
  + resource "aws_instance" "ec2" {
      + ami                                  = "ami-005fc0f236362e99f"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = (known after apply)
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_stop                     = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + enable_primary_ipv6                  = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + host_resource_group_arn              = (known after apply)
      + iam_instance_profile                 = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_lifecycle                   = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "t3.medium"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = "hello"
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + spot_instance_request_id             = (known after apply)
      + subnet_id                            = (known after apply)
      + tags                                 = {
          + "Name" = "MainEC2Instance"
        }
      + tags_all                             = {
          + "Name" = "MainEC2Instance"
        }
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + user_data_replace_on_change          = false
      + vpc_security_group_ids               = (known after apply)

      + capacity_reservation_specification (known after apply)

      + cpu_options (known after apply)

      + ebs_block_device (known after apply)

      + enclave_options (known after apply)

      + ephemeral_block_device (known after apply)

      + instance_market_options (known after apply)

      + maintenance_options (known after apply)

      + metadata_options (known after apply)

      + network_interface (known after apply)

      + private_dns_name_options (known after apply)

      + root_block_device (known after apply)
    }

  # aws_instance.ec2-2 will be created
  + resource "aws_instance" "ec2-2" {
      + ami                                  = "ami-005fc0f236362e99f"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = (known after apply)
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_stop                     = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + enable_primary_ipv6                  = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + host_resource_group_arn              = (known after apply)
      + iam_instance_profile                 = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_lifecycle                   = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "t3.medium"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = "hello"
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + spot_instance_request_id             = (known after apply)
      + subnet_id                            = (known after apply)
      + tags                                 = {
          + "Name" = "MainEC2Instance"
        }
      + tags_all                             = {
          + "Name" = "MainEC2Instance"
        }
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + user_data_replace_on_change          = false
      + vpc_security_group_ids               = (known after apply)

      + capacity_reservation_specification (known after apply)

      + cpu_options (known after apply)

      + ebs_block_device (known after apply)

      + enclave_options (known after apply)

      + ephemeral_block_device (known after apply)

      + instance_market_options (known after apply)

      + maintenance_options (known after apply)

      + metadata_options (known after apply)

      + network_interface (known after apply)

      + private_dns_name_options (known after apply)

      + root_block_device (known after apply)
    }

  # aws_internet_gateway.igw will be created
  + resource "aws_internet_gateway" "igw" {
      + arn      = (known after apply)
      + id       = (known after apply)
      + owner_id = (known after apply)
      + tags     = {
          + "Name" = "MainIGW"
        }
      + tags_all = {
          + "Name" = "MainIGW"
        }
      + vpc_id   = (known after apply)
    }

  # aws_route53_record.db_record will be created
  + resource "aws_route53_record" "db_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "db.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.frontend_record will be created
  + resource "aws_route53_record" "frontend_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.traefik_record will be created
  + resource "aws_route53_record" "traefik_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "traefik.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.www_db_record will be created
  + resource "aws_route53_record" "www_db_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "www.db.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.www_frontend_record will be created
  + resource "aws_route53_record" "www_frontend_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "www.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.www_traefik_record will be created
  + resource "aws_route53_record" "www_traefik_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "www.traefik.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route_table.rt will be created
  + resource "aws_route_table" "rt" {
      + arn              = (known after apply)
      + id               = (known after apply)
      + owner_id         = (known after apply)
      + propagating_vgws = (known after apply)
      + route            = [
          + {
              + cidr_block                 = "0.0.0.0/0"
              + gateway_id                 = (known after apply)
                # (11 unchanged attributes hidden)
            },
        ]
      + tags             = {
          + "Name" = "MainRouteTable"
        }
      + tags_all         = {
          + "Name" = "MainRouteTable"
        }
      + vpc_id           = (known after apply)
    }

  # aws_route_table_association.rt_association will be created
  + resource "aws_route_table_association" "rt_association" {
      + id             = (known after apply)
      + route_table_id = (known after apply)
      + subnet_id      = (known after apply)
    }

  # aws_security_group.sg will be created
  + resource "aws_security_group" "sg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = [
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + from_port        = 0
              + ipv6_cidr_blocks = []
              + prefix_list_ids  = []
              + protocol         = "-1"
              + security_groups  = []
              + self             = false
              + to_port          = 0
                # (1 unchanged attribute hidden)
            },
        ]
      + id                     = (known after apply)
      + ingress                = [
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 22
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 22
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 443
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 443
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 5173
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 5173
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 8000
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 8000
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 8080
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 8080
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 80
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 80
            },
        ]
      + name                   = (known after apply)
      + name_prefix            = (known after apply)
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + tags                   = {
          + "Name" = "MainSG"
        }
      + tags_all               = {
          + "Name" = "MainSG"
        }
      + vpc_id                 = (known after apply)
    }

  # aws_subnet.public_subnet will be created
  + resource "aws_subnet" "public_subnet" {
      + arn                                            = (known after apply)
      + assign_ipv6_address_on_creation                = false
      + availability_zone                              = (known after apply)
      + availability_zone_id                           = (known after apply)
      + cidr_block                                     = "10.0.1.0/24"
      + 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                        = true
      + owner_id                                       = (known after apply)
      + private_dns_hostname_type_on_launch            = (known after apply)
      + tags                                           = {
          + "Name" = "MainSubnet"
        }
      + tags_all                                       = {
          + "Name" = "MainSubnet"
        }
      + vpc_id                                         = (known after apply)
    }

  # aws_vpc.vpc will be created
  + resource "aws_vpc" "vpc" {
      + arn                                  = (known after apply)
      + cidr_block                           = "10.0.0.0/16"
      + default_network_acl_id               = (known after apply)
      + default_route_table_id               = (known after apply)
      + default_security_group_id            = (known after apply)
      + dhcp_options_id                      = (known after apply)
      + enable_dns_hostnames                 = true
      + enable_dns_support                   = true
      + enable_network_address_usage_metrics = (known after apply)
      + id                                   = (known after apply)
      + instance_tenancy                     = "default"
      + ipv6_association_id                  = (known after apply)
      + ipv6_cidr_block                      = (known after apply)
      + ipv6_cidr_block_network_border_group = (known after apply)
      + main_route_table_id                  = (known after apply)
      + owner_id                             = (known after apply)
      + tags                                 = {
          + "Name" = "MainVPC"
        }
      + tags_all                             = {
          + "Name" = "MainVPC"
        }
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = (known after apply)
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0777"
      + filename             = "inventory.ini"
      + id                   = (known after apply)
    }

Plan: 15 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + instance_public_ip = (known after apply)
::debug::Terraform exited with code 0.
::debug::stdout: %0ATerraform used the selected providers to generate the following execution%0Aplan. Resource actions are indicated with the following symbols:%0A  + create%0A%0ATerraform will perform the following actions:%0A%0A  # aws_instance.ec2 will be created%0A  + resource "aws_instance" "ec2" {%0A      + ami                                  = "ami-005fc0f236362e99f"%0A      + arn                                  = (known after apply)%0A      + associate_public_ip_address          = (known after apply)%0A      + availability_zone                    = (known after apply)%0A      + cpu_core_count                       = (known after apply)%0A      + cpu_threads_per_core                 = (known after apply)%0A      + disable_api_stop                     = (known after apply)%0A      + disable_api_termination              = (known after apply)%0A      + ebs_optimized                        = (known after apply)%0A      + enable_primary_ipv6                  = (known after apply)%0A      + get_password_data                    = false%0A      + host_id                              = (known after apply)%0A      + host_resource_group_arn              = (known after apply)%0A      + iam_instance_profile                 = (known after apply)%0A      + id                                   = (known after apply)%0A      + instance_initiated_shutdown_behavior = (known after apply)%0A      + instance_lifecycle                   = (known after apply)%0A      + instance_state                       = (known after apply)%0A      + instance_type                        = "t3.medium"%0A      + ipv6_address_count                   = (known after apply)%0A      + ipv6_addresses                       = (known after apply)%0A      + key_name                             = "hello"%0A      + monitoring                           = (known after apply)%0A      + outpost_arn                          = (known after apply)%0A      + password_data                        = (known after apply)%0A      + placement_group                      = (known after apply)%0A      + placement_partition_number           = (known after apply)%0A      + primary_network_interface_id         = (known after apply)%0A      + private_dns                          = (known after apply)%0A      + private_ip                           = (known after apply)%0A      + public_dns                           = (known after apply)%0A      + public_ip                            = (known after apply)%0A      + secondary_private_ips                = (known after apply)%0A      + security_groups                      = (known after apply)%0A      + source_dest_check                    = true%0A      + spot_instance_request_id             = (known after apply)%0A      + subnet_id                            = (known after apply)%0A      + tags                                 = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tags_all                             = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tenancy                              = (known after apply)%0A      + user_data                            = (known after apply)%0A      + user_data_base64                     = (known after apply)%0A      + user_data_replace_on_change          = false%0A      + vpc_security_group_ids               = (known after apply)%0A%0A      + capacity_reservation_specification (known after apply)%0A%0A      + cpu_options (known after apply)%0A%0A      + ebs_block_device (known after apply)%0A%0A      + enclave_options (known after apply)%0A%0A      + ephemeral_block_device (known after apply)%0A%0A      + instance_market_options (known after apply)%0A%0A      + maintenance_options (known after apply)%0A%0A      + metadata_options (known after apply)%0A%0A      + network_interface (known after apply)%0A%0A      + private_dns_name_options (known after apply)%0A%0A      + root_block_device (known after apply)%0A    }%0A%0A  # aws_instance.ec2-2 will be created%0A  + resource "aws_instance" "ec2-2" {%0A      + ami                                  = "ami-005fc0f236362e99f"%0A      + arn                                  = (known after apply)%0A      + associate_public_ip_address          = (known after apply)%0A      + availability_zone                    = (known after apply)%0A      + cpu_core_count                       = (known after apply)%0A      + cpu_threads_per_core                 = (known after apply)%0A      + disable_api_stop                     = (known after apply)%0A      + disable_api_termination              = (known after apply)%0A      + ebs_optimized                        = (known after apply)%0A      + enable_primary_ipv6                  = (known after apply)%0A      + get_password_data                    = false%0A      + host_id                              = (known after apply)%0A      + host_resource_group_arn              = (known after apply)%0A      + iam_instance_profile                 = (known after apply)%0A      + id                                   = (known after apply)%0A      + instance_initiated_shutdown_behavior = (known after apply)%0A      + instance_lifecycle                   = (known after apply)%0A      + instance_state                       = (known after apply)%0A      + instance_type                        = "t3.medium"%0A      + ipv6_address_count                   = (known after apply)%0A      + ipv6_addresses                       = (known after apply)%0A      + key_name                             = "hello"%0A      + monitoring                           = (known after apply)%0A      + outpost_arn                          = (known after apply)%0A      + password_data                        = (known after apply)%0A      + placement_group                      = (known after apply)%0A      + placement_partition_number           = (known after apply)%0A      + primary_network_interface_id         = (known after apply)%0A      + private_dns                          = (known after apply)%0A      + private_ip                           = (known after apply)%0A      + public_dns                           = (known after apply)%0A      + public_ip                            = (known after apply)%0A      + secondary_private_ips                = (known after apply)%0A      + security_groups                      = (known after apply)%0A      + source_dest_check                    = true%0A      + spot_instance_request_id             = (known after apply)%0A      + subnet_id                            = (known after apply)%0A      + tags                                 = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tags_all                             = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tenancy                              = (known after apply)%0A      + user_data                            = (known after apply)%0A      + user_data_base64                     = (known after apply)%0A      + user_data_replace_on_change          = false%0A      + vpc_security_group_ids               = (known after apply)%0A%0A      + capacity_reservation_specification (known after apply)%0A%0A      + cpu_options (known after apply)%0A%0A      + ebs_block_device (known after apply)%0A%0A      + enclave_options (known after apply)%0A%0A      + ephemeral_block_device (known after apply)%0A%0A      + instance_market_options (known after apply)%0A%0A      + maintenance_options (known after apply)%0A%0A      + metadata_options (known after apply)%0A%0A      + network_interface (known after apply)%0A%0A      + private_dns_name_options (known after apply)%0A%0A      + root_block_device (known after apply)%0A    }%0A%0A  # aws_internet_gateway.igw will be created%0A  + resource "aws_internet_gateway" "igw" {%0A      + arn      = (known after apply)%0A      + id       = (known after apply)%0A      + owner_id = (known after apply)%0A      + tags     = {%0A          + "Name" = "MainIGW"%0A        }%0A      + tags_all = {%0A          + "Name" = "MainIGW"%0A        }%0A      + vpc_id   = (known after apply)%0A    }%0A%0A  # aws_route53_record.db_record will be created%0A  + resource "aws_route53_record" "db_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "db.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.frontend_record will be created%0A  + resource "aws_route53_record" "frontend_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.traefik_record will be created%0A  + resource "aws_route53_record" "traefik_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "traefik.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.www_db_record will be created%0A  + resource "aws_route53_record" "www_db_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "www.db.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.www_frontend_record will be created%0A  + resource "aws_route53_record" "www_frontend_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "www.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.www_traefik_record will be created%0A  + resource "aws_route53_record" "www_traefik_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "www.traefik.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route_table.rt will be created%0A  + resource "aws_route_table" "rt" {%0A      + arn              = (known after apply)%0A      + id               = (known after apply)%0A      + owner_id         = (known after apply)%0A      + propagating_vgws = (known after apply)%0A      + route            = [%0A          + {%0A              + cidr_block                 = "0.0.0.0/0"%0A              + gateway_id                 = (known after apply)%0A                # (11 unchanged attributes hidden)%0A            },%0A        ]%0A      + tags             = {%0A          + "Name" = "MainRouteTable"%0A        }%0A      + tags_all         = {%0A          + "Name" = "MainRouteTable"%0A        }%0A      + vpc_id           = (known after apply)%0A    }%0A%0A  # aws_route_table_association.rt_association will be created%0A  + resource "aws_route_table_association" "rt_association" {%0A      + id             = (known after apply)%0A      + route_table_id = (known after apply)%0A      + subnet_id      = (known after apply)%0A    }%0A%0A  # aws_security_group.sg will be created%0A  + resource "aws_security_group" "sg" {%0A      + arn                    = (known after apply)%0A      + description            = "Managed by Terraform"%0A      + egress                 = [%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + from_port        = 0%0A              + ipv6_cidr_blocks = []%0A              + prefix_list_ids  = []%0A              + protocol         = "-1"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 0%0A                # (1 unchanged attribute hidden)%0A            },%0A        ]%0A      + id                     = (known after apply)%0A      + ingress                = [%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 22%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 22%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 443%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 443%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 5173%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 5173%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 8000%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 8000%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 8080%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 8080%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 80%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 80%0A            },%0A        ]%0A      + name                   = (known after apply)%0A      + name_prefix            = (known after apply)%0A      + owner_id               = (known after apply)%0A      + revoke_rules_on_delete = false%0A      + tags                   = {%0A          + "Name" = "MainSG"%0A        }%0A      + tags_all               = {%0A          + "Name" = "MainSG"%0A        }%0A      + vpc_id                 = (known after apply)%0A    }%0A%0A  # aws_subnet.public_subnet will be created%0A  + resource "aws_subnet" "public_subnet" {%0A      + arn                                            = (known after apply)%0A      + assign_ipv6_address_on_creation                = false%0A      + availability_zone                              = (known after apply)%0A      + availability_zone_id                           = (known after apply)%0A      + cidr_block                                     = "10.0.1.0/24"%0A      + enable_dns64                                   = false%0A      + enable_resource_name_dns_a_record_on_launch    = false%0A      + enable_resource_name_dns_aaaa_record_on_launch = false%0A      + id                                             = (known after apply)%0A      + ipv6_cidr_block_association_id                 = (known after apply)%0A      + ipv6_native                                    = false%0A      + map_public_ip_on_launch                        = true%0A      + owner_id                                       = (known after apply)%0A      + private_dns_hostname_type_on_launch            = (known after apply)%0A      + tags                                           = {%0A          + "Name" = "MainSubnet"%0A        }%0A      + tags_all                                       = {%0A          + "Name" = "MainSubnet"%0A        }%0A      + vpc_id                                         = (known after apply)%0A    }%0A%0A  # aws_vpc.vpc will be created%0A  + resource "aws_vpc" "vpc" {%0A      + arn                                  = (known after apply)%0A      + cidr_block                           = "10.0.0.0/16"%0A      + default_network_acl_id               = (known after apply)%0A      + default_route_table_id               = (known after apply)%0A      + default_security_group_id            = (known after apply)%0A      + dhcp_options_id                      = (known after apply)%0A      + enable_dns_hostnames                 = true%0A      + enable_dns_support                   = true%0A      + enable_network_address_usage_metrics = (known after apply)%0A      + id                                   = (known after apply)%0A      + instance_tenancy                     = "default"%0A      + ipv6_association_id                  = (known after apply)%0A      + ipv6_cidr_block                      = (known after apply)%0A      + ipv6_cidr_block_network_border_group = (known after apply)%0A      + main_route_table_id                  = (known after apply)%0A      + owner_id                             = (known after apply)%0A      + tags                                 = {%0A          + "Name" = "MainVPC"%0A        }%0A      + tags_all                             = {%0A          + "Name" = "MainVPC"%0A        }%0A    }%0A%0A  # local_file.ansible_inventory will be created%0A  + resource "local_file" "ansible_inventory" {%0A      + content              = (known after apply)%0A      + content_base64sha256 = (known after apply)%0A      + content_base64sha512 = (known after apply)%0A      + content_md5          = (known after apply)%0A      + content_sha1         = (known after apply)%0A      + content_sha256       = (known after apply)%0A      + content_sha512       = (known after apply)%0A      + directory_permission = "0777"%0A      + file_permission      = "0777"%0A      + filename             = "inventory.ini"%0A      + id                   = (known after apply)%0A    }%0A%0APlan: 15 to add, 0 to change, 0 to destroy.%0A%0AChanges to Outputs:%0A  + instance_public_ip = (known after apply)%0A
::debug::stderr: 
::debug::exitcode: 0

New Infracost Breakdown 💰

Show Breakdown
Project: main

 Name                                                      Monthly Qty  Unit                  Monthly Cost   
                                                                                                             
 aws_instance.ec2                                                                                            
 ├─ Instance usage (Linux/UNIX, on-demand, t2.micro)               730  hours                        $8.47   
 └─ root_block_device                                                                                        
    └─ Storage (general purpose SSD, gp2)                            8  GB                           $0.80   
                                                                                                             
 aws_instance.ec2-2                                                                                          
 ├─ Instance usage (Linux/UNIX, on-demand, t2.micro)               730  hours                        $8.47   
 └─ root_block_device                                                                                        
    └─ Storage (general purpose SSD, gp2)                            8  GB                           $0.80   
                                                                                                             
 aws_route53_record.db_record                                                                                
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.frontend_record                                                                          
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.traefik_record                                                                           
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.www_db_record                                                                            
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.www_frontend_record                                                                      
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.www_traefik_record                                                                       
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 OVERALL TOTAL                                                                                     $18.54 

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

──────────────────────────────────
14 cloud resources were detected:
∙ 8 were estimated
∙ 6 were free

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Project                                            ┃ Baseline cost ┃ Usage cost* ┃ Total cost ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━╋━━━━━━━━━━━━┫
┃ main                                               ┃           $19 ┃           - ┃        $19 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━━━┛

Pushed by: @DrInTech22, Action: pull_request

Copy link

Terraform Plan 📖success

Show Plan
[command]/home/runner/work/_temp/a54b4a86-3ad6-417e-a512-4f4485a55d72/terraform-bin show -no-color tfplan.out

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

Terraform will perform the following actions:

  # aws_instance.ec2 will be created
  + resource "aws_instance" "ec2" {
      + ami                                  = "ami-005fc0f236362e99f"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = (known after apply)
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_stop                     = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + enable_primary_ipv6                  = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + host_resource_group_arn              = (known after apply)
      + iam_instance_profile                 = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_lifecycle                   = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "t3.medium"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = "hello"
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + spot_instance_request_id             = (known after apply)
      + subnet_id                            = (known after apply)
      + tags                                 = {
          + "Name" = "MainEC2Instance"
        }
      + tags_all                             = {
          + "Name" = "MainEC2Instance"
        }
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + user_data_replace_on_change          = false
      + vpc_security_group_ids               = (known after apply)

      + capacity_reservation_specification (known after apply)

      + cpu_options (known after apply)

      + ebs_block_device (known after apply)

      + enclave_options (known after apply)

      + ephemeral_block_device (known after apply)

      + instance_market_options (known after apply)

      + maintenance_options (known after apply)

      + metadata_options (known after apply)

      + network_interface (known after apply)

      + private_dns_name_options (known after apply)

      + root_block_device (known after apply)
    }

  # aws_instance.ec2-2 will be created
  + resource "aws_instance" "ec2-2" {
      + ami                                  = "ami-005fc0f236362e99f"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = (known after apply)
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_stop                     = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + enable_primary_ipv6                  = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + host_resource_group_arn              = (known after apply)
      + iam_instance_profile                 = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_lifecycle                   = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "t3.medium"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = "hello"
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + spot_instance_request_id             = (known after apply)
      + subnet_id                            = (known after apply)
      + tags                                 = {
          + "Name" = "MainEC2Instance"
        }
      + tags_all                             = {
          + "Name" = "MainEC2Instance"
        }
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + user_data_replace_on_change          = false
      + vpc_security_group_ids               = (known after apply)

      + capacity_reservation_specification (known after apply)

      + cpu_options (known after apply)

      + ebs_block_device (known after apply)

      + enclave_options (known after apply)

      + ephemeral_block_device (known after apply)

      + instance_market_options (known after apply)

      + maintenance_options (known after apply)

      + metadata_options (known after apply)

      + network_interface (known after apply)

      + private_dns_name_options (known after apply)

      + root_block_device (known after apply)
    }

  # aws_internet_gateway.igw will be created
  + resource "aws_internet_gateway" "igw" {
      + arn      = (known after apply)
      + id       = (known after apply)
      + owner_id = (known after apply)
      + tags     = {
          + "Name" = "MainIGW"
        }
      + tags_all = {
          + "Name" = "MainIGW"
        }
      + vpc_id   = (known after apply)
    }

  # aws_route53_record.db_record will be created
  + resource "aws_route53_record" "db_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "db.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.frontend_record will be created
  + resource "aws_route53_record" "frontend_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.traefik_record will be created
  + resource "aws_route53_record" "traefik_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "traefik.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.www_db_record will be created
  + resource "aws_route53_record" "www_db_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "www.db.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.www_frontend_record will be created
  + resource "aws_route53_record" "www_frontend_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "www.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.www_traefik_record will be created
  + resource "aws_route53_record" "www_traefik_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "www.traefik.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route_table.rt will be created
  + resource "aws_route_table" "rt" {
      + arn              = (known after apply)
      + id               = (known after apply)
      + owner_id         = (known after apply)
      + propagating_vgws = (known after apply)
      + route            = [
          + {
              + cidr_block                 = "0.0.0.0/0"
              + gateway_id                 = (known after apply)
                # (11 unchanged attributes hidden)
            },
        ]
      + tags             = {
          + "Name" = "MainRouteTable"
        }
      + tags_all         = {
          + "Name" = "MainRouteTable"
        }
      + vpc_id           = (known after apply)
    }

  # aws_route_table_association.rt_association will be created
  + resource "aws_route_table_association" "rt_association" {
      + id             = (known after apply)
      + route_table_id = (known after apply)
      + subnet_id      = (known after apply)
    }

  # aws_security_group.sg will be created
  + resource "aws_security_group" "sg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = [
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + from_port        = 0
              + ipv6_cidr_blocks = []
              + prefix_list_ids  = []
              + protocol         = "-1"
              + security_groups  = []
              + self             = false
              + to_port          = 0
                # (1 unchanged attribute hidden)
            },
        ]
      + id                     = (known after apply)
      + ingress                = [
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 22
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 22
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 443
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 443
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 5173
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 5173
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 8000
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 8000
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 8080
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 8080
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 80
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 80
            },
        ]
      + name                   = (known after apply)
      + name_prefix            = (known after apply)
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + tags                   = {
          + "Name" = "MainSG"
        }
      + tags_all               = {
          + "Name" = "MainSG"
        }
      + vpc_id                 = (known after apply)
    }

  # aws_subnet.public_subnet will be created
  + resource "aws_subnet" "public_subnet" {
      + arn                                            = (known after apply)
      + assign_ipv6_address_on_creation                = false
      + availability_zone                              = (known after apply)
      + availability_zone_id                           = (known after apply)
      + cidr_block                                     = "10.0.1.0/24"
      + 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                        = true
      + owner_id                                       = (known after apply)
      + private_dns_hostname_type_on_launch            = (known after apply)
      + tags                                           = {
          + "Name" = "MainSubnet"
        }
      + tags_all                                       = {
          + "Name" = "MainSubnet"
        }
      + vpc_id                                         = (known after apply)
    }

  # aws_vpc.vpc will be created
  + resource "aws_vpc" "vpc" {
      + arn                                  = (known after apply)
      + cidr_block                           = "10.0.0.0/16"
      + default_network_acl_id               = (known after apply)
      + default_route_table_id               = (known after apply)
      + default_security_group_id            = (known after apply)
      + dhcp_options_id                      = (known after apply)
      + enable_dns_hostnames                 = true
      + enable_dns_support                   = true
      + enable_network_address_usage_metrics = (known after apply)
      + id                                   = (known after apply)
      + instance_tenancy                     = "default"
      + ipv6_association_id                  = (known after apply)
      + ipv6_cidr_block                      = (known after apply)
      + ipv6_cidr_block_network_border_group = (known after apply)
      + main_route_table_id                  = (known after apply)
      + owner_id                             = (known after apply)
      + tags                                 = {
          + "Name" = "MainVPC"
        }
      + tags_all                             = {
          + "Name" = "MainVPC"
        }
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = (known after apply)
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0777"
      + filename             = "inventory.ini"
      + id                   = (known after apply)
    }

Plan: 15 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + instance_public_ip = (known after apply)
::debug::Terraform exited with code 0.
::debug::stdout: %0ATerraform used the selected providers to generate the following execution%0Aplan. Resource actions are indicated with the following symbols:%0A  + create%0A%0ATerraform will perform the following actions:%0A%0A  # aws_instance.ec2 will be created%0A  + resource "aws_instance" "ec2" {%0A      + ami                                  = "ami-005fc0f236362e99f"%0A      + arn                                  = (known after apply)%0A      + associate_public_ip_address          = (known after apply)%0A      + availability_zone                    = (known after apply)%0A      + cpu_core_count                       = (known after apply)%0A      + cpu_threads_per_core                 = (known after apply)%0A      + disable_api_stop                     = (known after apply)%0A      + disable_api_termination              = (known after apply)%0A      + ebs_optimized                        = (known after apply)%0A      + enable_primary_ipv6                  = (known after apply)%0A      + get_password_data                    = false%0A      + host_id                              = (known after apply)%0A      + host_resource_group_arn              = (known after apply)%0A      + iam_instance_profile                 = (known after apply)%0A      + id                                   = (known after apply)%0A      + instance_initiated_shutdown_behavior = (known after apply)%0A      + instance_lifecycle                   = (known after apply)%0A      + instance_state                       = (known after apply)%0A      + instance_type                        = "t3.medium"%0A      + ipv6_address_count                   = (known after apply)%0A      + ipv6_addresses                       = (known after apply)%0A      + key_name                             = "hello"%0A      + monitoring                           = (known after apply)%0A      + outpost_arn                          = (known after apply)%0A      + password_data                        = (known after apply)%0A      + placement_group                      = (known after apply)%0A      + placement_partition_number           = (known after apply)%0A      + primary_network_interface_id         = (known after apply)%0A      + private_dns                          = (known after apply)%0A      + private_ip                           = (known after apply)%0A      + public_dns                           = (known after apply)%0A      + public_ip                            = (known after apply)%0A      + secondary_private_ips                = (known after apply)%0A      + security_groups                      = (known after apply)%0A      + source_dest_check                    = true%0A      + spot_instance_request_id             = (known after apply)%0A      + subnet_id                            = (known after apply)%0A      + tags                                 = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tags_all                             = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tenancy                              = (known after apply)%0A      + user_data                            = (known after apply)%0A      + user_data_base64                     = (known after apply)%0A      + user_data_replace_on_change          = false%0A      + vpc_security_group_ids               = (known after apply)%0A%0A      + capacity_reservation_specification (known after apply)%0A%0A      + cpu_options (known after apply)%0A%0A      + ebs_block_device (known after apply)%0A%0A      + enclave_options (known after apply)%0A%0A      + ephemeral_block_device (known after apply)%0A%0A      + instance_market_options (known after apply)%0A%0A      + maintenance_options (known after apply)%0A%0A      + metadata_options (known after apply)%0A%0A      + network_interface (known after apply)%0A%0A      + private_dns_name_options (known after apply)%0A%0A      + root_block_device (known after apply)%0A    }%0A%0A  # aws_instance.ec2-2 will be created%0A  + resource "aws_instance" "ec2-2" {%0A      + ami                                  = "ami-005fc0f236362e99f"%0A      + arn                                  = (known after apply)%0A      + associate_public_ip_address          = (known after apply)%0A      + availability_zone                    = (known after apply)%0A      + cpu_core_count                       = (known after apply)%0A      + cpu_threads_per_core                 = (known after apply)%0A      + disable_api_stop                     = (known after apply)%0A      + disable_api_termination              = (known after apply)%0A      + ebs_optimized                        = (known after apply)%0A      + enable_primary_ipv6                  = (known after apply)%0A      + get_password_data                    = false%0A      + host_id                              = (known after apply)%0A      + host_resource_group_arn              = (known after apply)%0A      + iam_instance_profile                 = (known after apply)%0A      + id                                   = (known after apply)%0A      + instance_initiated_shutdown_behavior = (known after apply)%0A      + instance_lifecycle                   = (known after apply)%0A      + instance_state                       = (known after apply)%0A      + instance_type                        = "t3.medium"%0A      + ipv6_address_count                   = (known after apply)%0A      + ipv6_addresses                       = (known after apply)%0A      + key_name                             = "hello"%0A      + monitoring                           = (known after apply)%0A      + outpost_arn                          = (known after apply)%0A      + password_data                        = (known after apply)%0A      + placement_group                      = (known after apply)%0A      + placement_partition_number           = (known after apply)%0A      + primary_network_interface_id         = (known after apply)%0A      + private_dns                          = (known after apply)%0A      + private_ip                           = (known after apply)%0A      + public_dns                           = (known after apply)%0A      + public_ip                            = (known after apply)%0A      + secondary_private_ips                = (known after apply)%0A      + security_groups                      = (known after apply)%0A      + source_dest_check                    = true%0A      + spot_instance_request_id             = (known after apply)%0A      + subnet_id                            = (known after apply)%0A      + tags                                 = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tags_all                             = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tenancy                              = (known after apply)%0A      + user_data                            = (known after apply)%0A      + user_data_base64                     = (known after apply)%0A      + user_data_replace_on_change          = false%0A      + vpc_security_group_ids               = (known after apply)%0A%0A      + capacity_reservation_specification (known after apply)%0A%0A      + cpu_options (known after apply)%0A%0A      + ebs_block_device (known after apply)%0A%0A      + enclave_options (known after apply)%0A%0A      + ephemeral_block_device (known after apply)%0A%0A      + instance_market_options (known after apply)%0A%0A      + maintenance_options (known after apply)%0A%0A      + metadata_options (known after apply)%0A%0A      + network_interface (known after apply)%0A%0A      + private_dns_name_options (known after apply)%0A%0A      + root_block_device (known after apply)%0A    }%0A%0A  # aws_internet_gateway.igw will be created%0A  + resource "aws_internet_gateway" "igw" {%0A      + arn      = (known after apply)%0A      + id       = (known after apply)%0A      + owner_id = (known after apply)%0A      + tags     = {%0A          + "Name" = "MainIGW"%0A        }%0A      + tags_all = {%0A          + "Name" = "MainIGW"%0A        }%0A      + vpc_id   = (known after apply)%0A    }%0A%0A  # aws_route53_record.db_record will be created%0A  + resource "aws_route53_record" "db_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "db.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.frontend_record will be created%0A  + resource "aws_route53_record" "frontend_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.traefik_record will be created%0A  + resource "aws_route53_record" "traefik_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "traefik.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.www_db_record will be created%0A  + resource "aws_route53_record" "www_db_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "www.db.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.www_frontend_record will be created%0A  + resource "aws_route53_record" "www_frontend_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "www.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.www_traefik_record will be created%0A  + resource "aws_route53_record" "www_traefik_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "www.traefik.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route_table.rt will be created%0A  + resource "aws_route_table" "rt" {%0A      + arn              = (known after apply)%0A      + id               = (known after apply)%0A      + owner_id         = (known after apply)%0A      + propagating_vgws = (known after apply)%0A      + route            = [%0A          + {%0A              + cidr_block                 = "0.0.0.0/0"%0A              + gateway_id                 = (known after apply)%0A                # (11 unchanged attributes hidden)%0A            },%0A        ]%0A      + tags             = {%0A          + "Name" = "MainRouteTable"%0A        }%0A      + tags_all         = {%0A          + "Name" = "MainRouteTable"%0A        }%0A      + vpc_id           = (known after apply)%0A    }%0A%0A  # aws_route_table_association.rt_association will be created%0A  + resource "aws_route_table_association" "rt_association" {%0A      + id             = (known after apply)%0A      + route_table_id = (known after apply)%0A      + subnet_id      = (known after apply)%0A    }%0A%0A  # aws_security_group.sg will be created%0A  + resource "aws_security_group" "sg" {%0A      + arn                    = (known after apply)%0A      + description            = "Managed by Terraform"%0A      + egress                 = [%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + from_port        = 0%0A              + ipv6_cidr_blocks = []%0A              + prefix_list_ids  = []%0A              + protocol         = "-1"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 0%0A                # (1 unchanged attribute hidden)%0A            },%0A        ]%0A      + id                     = (known after apply)%0A      + ingress                = [%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 22%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 22%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 443%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 443%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 5173%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 5173%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 8000%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 8000%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 8080%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 8080%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 80%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 80%0A            },%0A        ]%0A      + name                   = (known after apply)%0A      + name_prefix            = (known after apply)%0A      + owner_id               = (known after apply)%0A      + revoke_rules_on_delete = false%0A      + tags                   = {%0A          + "Name" = "MainSG"%0A        }%0A      + tags_all               = {%0A          + "Name" = "MainSG"%0A        }%0A      + vpc_id                 = (known after apply)%0A    }%0A%0A  # aws_subnet.public_subnet will be created%0A  + resource "aws_subnet" "public_subnet" {%0A      + arn                                            = (known after apply)%0A      + assign_ipv6_address_on_creation                = false%0A      + availability_zone                              = (known after apply)%0A      + availability_zone_id                           = (known after apply)%0A      + cidr_block                                     = "10.0.1.0/24"%0A      + enable_dns64                                   = false%0A      + enable_resource_name_dns_a_record_on_launch    = false%0A      + enable_resource_name_dns_aaaa_record_on_launch = false%0A      + id                                             = (known after apply)%0A      + ipv6_cidr_block_association_id                 = (known after apply)%0A      + ipv6_native                                    = false%0A      + map_public_ip_on_launch                        = true%0A      + owner_id                                       = (known after apply)%0A      + private_dns_hostname_type_on_launch            = (known after apply)%0A      + tags                                           = {%0A          + "Name" = "MainSubnet"%0A        }%0A      + tags_all                                       = {%0A          + "Name" = "MainSubnet"%0A        }%0A      + vpc_id                                         = (known after apply)%0A    }%0A%0A  # aws_vpc.vpc will be created%0A  + resource "aws_vpc" "vpc" {%0A      + arn                                  = (known after apply)%0A      + cidr_block                           = "10.0.0.0/16"%0A      + default_network_acl_id               = (known after apply)%0A      + default_route_table_id               = (known after apply)%0A      + default_security_group_id            = (known after apply)%0A      + dhcp_options_id                      = (known after apply)%0A      + enable_dns_hostnames                 = true%0A      + enable_dns_support                   = true%0A      + enable_network_address_usage_metrics = (known after apply)%0A      + id                                   = (known after apply)%0A      + instance_tenancy                     = "default"%0A      + ipv6_association_id                  = (known after apply)%0A      + ipv6_cidr_block                      = (known after apply)%0A      + ipv6_cidr_block_network_border_group = (known after apply)%0A      + main_route_table_id                  = (known after apply)%0A      + owner_id                             = (known after apply)%0A      + tags                                 = {%0A          + "Name" = "MainVPC"%0A        }%0A      + tags_all                             = {%0A          + "Name" = "MainVPC"%0A        }%0A    }%0A%0A  # local_file.ansible_inventory will be created%0A  + resource "local_file" "ansible_inventory" {%0A      + content              = (known after apply)%0A      + content_base64sha256 = (known after apply)%0A      + content_base64sha512 = (known after apply)%0A      + content_md5          = (known after apply)%0A      + content_sha1         = (known after apply)%0A      + content_sha256       = (known after apply)%0A      + content_sha512       = (known after apply)%0A      + directory_permission = "0777"%0A      + file_permission      = "0777"%0A      + filename             = "inventory.ini"%0A      + id                   = (known after apply)%0A    }%0A%0APlan: 15 to add, 0 to change, 0 to destroy.%0A%0AChanges to Outputs:%0A  + instance_public_ip = (known after apply)%0A
::debug::stderr: 
::debug::exitcode: 0

New Infracost Breakdown 💰

Show Breakdown
Project: main

 Name                                                      Monthly Qty  Unit                  Monthly Cost   
                                                                                                             
 aws_instance.ec2                                                                                            
 ├─ Instance usage (Linux/UNIX, on-demand, t2.micro)               730  hours                        $8.47   
 └─ root_block_device                                                                                        
    └─ Storage (general purpose SSD, gp2)                            8  GB                           $0.80   
                                                                                                             
 aws_instance.ec2-2                                                                                          
 ├─ Instance usage (Linux/UNIX, on-demand, t2.micro)               730  hours                        $8.47   
 └─ root_block_device                                                                                        
    └─ Storage (general purpose SSD, gp2)                            8  GB                           $0.80   
                                                                                                             
 aws_route53_record.db_record                                                                                
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.frontend_record                                                                          
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.traefik_record                                                                           
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.www_db_record                                                                            
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.www_frontend_record                                                                      
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.www_traefik_record                                                                       
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 OVERALL TOTAL                                                                                     $18.54 

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

──────────────────────────────────
14 cloud resources were detected:
∙ 8 were estimated
∙ 6 were free

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Project                                            ┃ Baseline cost ┃ Usage cost* ┃ Total cost ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━╋━━━━━━━━━━━━┫
┃ main                                               ┃           $19 ┃           - ┃        $19 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━━━┛

Pushed by: @DrInTech22, Action: pull_request

Copy link

Terraform Plan 📖success

Show Plan
[command]/home/runner/work/_temp/27615d1b-08af-49e5-b9bc-657c0e1c80f6/terraform-bin show -no-color tfplan.out

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

Terraform will perform the following actions:

  # aws_instance.ec2 will be created
  + resource "aws_instance" "ec2" {
      + ami                                  = "ami-005fc0f236362e99f"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = (known after apply)
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_stop                     = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + enable_primary_ipv6                  = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + host_resource_group_arn              = (known after apply)
      + iam_instance_profile                 = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_lifecycle                   = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "t2.large"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = "hello"
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + spot_instance_request_id             = (known after apply)
      + subnet_id                            = (known after apply)
      + tags                                 = {
          + "Name" = "MainEC2Instance"
        }
      + tags_all                             = {
          + "Name" = "MainEC2Instance"
        }
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + user_data_replace_on_change          = false
      + vpc_security_group_ids               = (known after apply)

      + capacity_reservation_specification (known after apply)

      + cpu_options (known after apply)

      + ebs_block_device (known after apply)

      + enclave_options (known after apply)

      + ephemeral_block_device (known after apply)

      + instance_market_options (known after apply)

      + maintenance_options (known after apply)

      + metadata_options (known after apply)

      + network_interface (known after apply)

      + private_dns_name_options (known after apply)

      + root_block_device (known after apply)
    }

  # aws_instance.ec2-2 will be created
  + resource "aws_instance" "ec2-2" {
      + ami                                  = "ami-005fc0f236362e99f"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = (known after apply)
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_stop                     = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + enable_primary_ipv6                  = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + host_resource_group_arn              = (known after apply)
      + iam_instance_profile                 = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_lifecycle                   = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "t2.large"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = "hello"
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + spot_instance_request_id             = (known after apply)
      + subnet_id                            = (known after apply)
      + tags                                 = {
          + "Name" = "MainEC2Instance"
        }
      + tags_all                             = {
          + "Name" = "MainEC2Instance"
        }
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + user_data_replace_on_change          = false
      + vpc_security_group_ids               = (known after apply)

      + capacity_reservation_specification (known after apply)

      + cpu_options (known after apply)

      + ebs_block_device (known after apply)

      + enclave_options (known after apply)

      + ephemeral_block_device (known after apply)

      + instance_market_options (known after apply)

      + maintenance_options (known after apply)

      + metadata_options (known after apply)

      + network_interface (known after apply)

      + private_dns_name_options (known after apply)

      + root_block_device (known after apply)
    }

  # aws_internet_gateway.igw will be created
  + resource "aws_internet_gateway" "igw" {
      + arn      = (known after apply)
      + id       = (known after apply)
      + owner_id = (known after apply)
      + tags     = {
          + "Name" = "MainIGW"
        }
      + tags_all = {
          + "Name" = "MainIGW"
        }
      + vpc_id   = (known after apply)
    }

  # aws_route53_record.db_record will be created
  + resource "aws_route53_record" "db_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "db.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.frontend_record will be created
  + resource "aws_route53_record" "frontend_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.traefik_record will be created
  + resource "aws_route53_record" "traefik_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "traefik.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.www_db_record will be created
  + resource "aws_route53_record" "www_db_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "www.db.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.www_frontend_record will be created
  + resource "aws_route53_record" "www_frontend_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "www.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.www_traefik_record will be created
  + resource "aws_route53_record" "www_traefik_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "www.traefik.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route_table.rt will be created
  + resource "aws_route_table" "rt" {
      + arn              = (known after apply)
      + id               = (known after apply)
      + owner_id         = (known after apply)
      + propagating_vgws = (known after apply)
      + route            = [
          + {
              + cidr_block                 = "0.0.0.0/0"
              + gateway_id                 = (known after apply)
                # (11 unchanged attributes hidden)
            },
        ]
      + tags             = {
          + "Name" = "MainRouteTable"
        }
      + tags_all         = {
          + "Name" = "MainRouteTable"
        }
      + vpc_id           = (known after apply)
    }

  # aws_route_table_association.rt_association will be created
  + resource "aws_route_table_association" "rt_association" {
      + id             = (known after apply)
      + route_table_id = (known after apply)
      + subnet_id      = (known after apply)
    }

  # aws_security_group.sg will be created
  + resource "aws_security_group" "sg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = [
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + from_port        = 0
              + ipv6_cidr_blocks = []
              + prefix_list_ids  = []
              + protocol         = "-1"
              + security_groups  = []
              + self             = false
              + to_port          = 0
                # (1 unchanged attribute hidden)
            },
        ]
      + id                     = (known after apply)
      + ingress                = [
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 22
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 22
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 443
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 443
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 5173
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 5173
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 8000
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 8000
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 8080
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 8080
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 80
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 80
            },
        ]
      + name                   = (known after apply)
      + name_prefix            = (known after apply)
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + tags                   = {
          + "Name" = "MainSG"
        }
      + tags_all               = {
          + "Name" = "MainSG"
        }
      + vpc_id                 = (known after apply)
    }

  # aws_subnet.public_subnet will be created
  + resource "aws_subnet" "public_subnet" {
      + arn                                            = (known after apply)
      + assign_ipv6_address_on_creation                = false
      + availability_zone                              = (known after apply)
      + availability_zone_id                           = (known after apply)
      + cidr_block                                     = "10.0.1.0/24"
      + 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                        = true
      + owner_id                                       = (known after apply)
      + private_dns_hostname_type_on_launch            = (known after apply)
      + tags                                           = {
          + "Name" = "MainSubnet"
        }
      + tags_all                                       = {
          + "Name" = "MainSubnet"
        }
      + vpc_id                                         = (known after apply)
    }

  # aws_vpc.vpc will be created
  + resource "aws_vpc" "vpc" {
      + arn                                  = (known after apply)
      + cidr_block                           = "10.0.0.0/16"
      + default_network_acl_id               = (known after apply)
      + default_route_table_id               = (known after apply)
      + default_security_group_id            = (known after apply)
      + dhcp_options_id                      = (known after apply)
      + enable_dns_hostnames                 = true
      + enable_dns_support                   = true
      + enable_network_address_usage_metrics = (known after apply)
      + id                                   = (known after apply)
      + instance_tenancy                     = "default"
      + ipv6_association_id                  = (known after apply)
      + ipv6_cidr_block                      = (known after apply)
      + ipv6_cidr_block_network_border_group = (known after apply)
      + main_route_table_id                  = (known after apply)
      + owner_id                             = (known after apply)
      + tags                                 = {
          + "Name" = "MainVPC"
        }
      + tags_all                             = {
          + "Name" = "MainVPC"
        }
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = (known after apply)
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0777"
      + filename             = "inventory.ini"
      + id                   = (known after apply)
    }

Plan: 15 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + instance_public_ip = (known after apply)
::debug::Terraform exited with code 0.
::debug::stdout: %0ATerraform used the selected providers to generate the following execution%0Aplan. Resource actions are indicated with the following symbols:%0A  + create%0A%0ATerraform will perform the following actions:%0A%0A  # aws_instance.ec2 will be created%0A  + resource "aws_instance" "ec2" {%0A      + ami                                  = "ami-005fc0f236362e99f"%0A      + arn                                  = (known after apply)%0A      + associate_public_ip_address          = (known after apply)%0A      + availability_zone                    = (known after apply)%0A      + cpu_core_count                       = (known after apply)%0A      + cpu_threads_per_core                 = (known after apply)%0A      + disable_api_stop                     = (known after apply)%0A      + disable_api_termination              = (known after apply)%0A      + ebs_optimized                        = (known after apply)%0A      + enable_primary_ipv6                  = (known after apply)%0A      + get_password_data                    = false%0A      + host_id                              = (known after apply)%0A      + host_resource_group_arn              = (known after apply)%0A      + iam_instance_profile                 = (known after apply)%0A      + id                                   = (known after apply)%0A      + instance_initiated_shutdown_behavior = (known after apply)%0A      + instance_lifecycle                   = (known after apply)%0A      + instance_state                       = (known after apply)%0A      + instance_type                        = "t2.large"%0A      + ipv6_address_count                   = (known after apply)%0A      + ipv6_addresses                       = (known after apply)%0A      + key_name                             = "hello"%0A      + monitoring                           = (known after apply)%0A      + outpost_arn                          = (known after apply)%0A      + password_data                        = (known after apply)%0A      + placement_group                      = (known after apply)%0A      + placement_partition_number           = (known after apply)%0A      + primary_network_interface_id         = (known after apply)%0A      + private_dns                          = (known after apply)%0A      + private_ip                           = (known after apply)%0A      + public_dns                           = (known after apply)%0A      + public_ip                            = (known after apply)%0A      + secondary_private_ips                = (known after apply)%0A      + security_groups                      = (known after apply)%0A      + source_dest_check                    = true%0A      + spot_instance_request_id             = (known after apply)%0A      + subnet_id                            = (known after apply)%0A      + tags                                 = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tags_all                             = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tenancy                              = (known after apply)%0A      + user_data                            = (known after apply)%0A      + user_data_base64                     = (known after apply)%0A      + user_data_replace_on_change          = false%0A      + vpc_security_group_ids               = (known after apply)%0A%0A      + capacity_reservation_specification (known after apply)%0A%0A      + cpu_options (known after apply)%0A%0A      + ebs_block_device (known after apply)%0A%0A      + enclave_options (known after apply)%0A%0A      + ephemeral_block_device (known after apply)%0A%0A      + instance_market_options (known after apply)%0A%0A      + maintenance_options (known after apply)%0A%0A      + metadata_options (known after apply)%0A%0A      + network_interface (known after apply)%0A%0A      + private_dns_name_options (known after apply)%0A%0A      + root_block_device (known after apply)%0A    }%0A%0A  # aws_instance.ec2-2 will be created%0A  + resource "aws_instance" "ec2-2" {%0A      + ami                                  = "ami-005fc0f236362e99f"%0A      + arn                                  = (known after apply)%0A      + associate_public_ip_address          = (known after apply)%0A      + availability_zone                    = (known after apply)%0A      + cpu_core_count                       = (known after apply)%0A      + cpu_threads_per_core                 = (known after apply)%0A      + disable_api_stop                     = (known after apply)%0A      + disable_api_termination              = (known after apply)%0A      + ebs_optimized                        = (known after apply)%0A      + enable_primary_ipv6                  = (known after apply)%0A      + get_password_data                    = false%0A      + host_id                              = (known after apply)%0A      + host_resource_group_arn              = (known after apply)%0A      + iam_instance_profile                 = (known after apply)%0A      + id                                   = (known after apply)%0A      + instance_initiated_shutdown_behavior = (known after apply)%0A      + instance_lifecycle                   = (known after apply)%0A      + instance_state                       = (known after apply)%0A      + instance_type                        = "t2.large"%0A      + ipv6_address_count                   = (known after apply)%0A      + ipv6_addresses                       = (known after apply)%0A      + key_name                             = "hello"%0A      + monitoring                           = (known after apply)%0A      + outpost_arn                          = (known after apply)%0A      + password_data                        = (known after apply)%0A      + placement_group                      = (known after apply)%0A      + placement_partition_number           = (known after apply)%0A      + primary_network_interface_id         = (known after apply)%0A      + private_dns                          = (known after apply)%0A      + private_ip                           = (known after apply)%0A      + public_dns                           = (known after apply)%0A      + public_ip                            = (known after apply)%0A      + secondary_private_ips                = (known after apply)%0A      + security_groups                      = (known after apply)%0A      + source_dest_check                    = true%0A      + spot_instance_request_id             = (known after apply)%0A      + subnet_id                            = (known after apply)%0A      + tags                                 = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tags_all                             = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tenancy                              = (known after apply)%0A      + user_data                            = (known after apply)%0A      + user_data_base64                     = (known after apply)%0A      + user_data_replace_on_change          = false%0A      + vpc_security_group_ids               = (known after apply)%0A%0A      + capacity_reservation_specification (known after apply)%0A%0A      + cpu_options (known after apply)%0A%0A      + ebs_block_device (known after apply)%0A%0A      + enclave_options (known after apply)%0A%0A      + ephemeral_block_device (known after apply)%0A%0A      + instance_market_options (known after apply)%0A%0A      + maintenance_options (known after apply)%0A%0A      + metadata_options (known after apply)%0A%0A      + network_interface (known after apply)%0A%0A      + private_dns_name_options (known after apply)%0A%0A      + root_block_device (known after apply)%0A    }%0A%0A  # aws_internet_gateway.igw will be created%0A  + resource "aws_internet_gateway" "igw" {%0A      + arn      = (known after apply)%0A      + id       = (known after apply)%0A      + owner_id = (known after apply)%0A      + tags     = {%0A          + "Name" = "MainIGW"%0A        }%0A      + tags_all = {%0A          + "Name" = "MainIGW"%0A        }%0A      + vpc_id   = (known after apply)%0A    }%0A%0A  # aws_route53_record.db_record will be created%0A  + resource "aws_route53_record" "db_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "db.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.frontend_record will be created%0A  + resource "aws_route53_record" "frontend_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.traefik_record will be created%0A  + resource "aws_route53_record" "traefik_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "traefik.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.www_db_record will be created%0A  + resource "aws_route53_record" "www_db_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "www.db.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.www_frontend_record will be created%0A  + resource "aws_route53_record" "www_frontend_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "www.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.www_traefik_record will be created%0A  + resource "aws_route53_record" "www_traefik_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "www.traefik.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route_table.rt will be created%0A  + resource "aws_route_table" "rt" {%0A      + arn              = (known after apply)%0A      + id               = (known after apply)%0A      + owner_id         = (known after apply)%0A      + propagating_vgws = (known after apply)%0A      + route            = [%0A          + {%0A              + cidr_block                 = "0.0.0.0/0"%0A              + gateway_id                 = (known after apply)%0A                # (11 unchanged attributes hidden)%0A            },%0A        ]%0A      + tags             = {%0A          + "Name" = "MainRouteTable"%0A        }%0A      + tags_all         = {%0A          + "Name" = "MainRouteTable"%0A        }%0A      + vpc_id           = (known after apply)%0A    }%0A%0A  # aws_route_table_association.rt_association will be created%0A  + resource "aws_route_table_association" "rt_association" {%0A      + id             = (known after apply)%0A      + route_table_id = (known after apply)%0A      + subnet_id      = (known after apply)%0A    }%0A%0A  # aws_security_group.sg will be created%0A  + resource "aws_security_group" "sg" {%0A      + arn                    = (known after apply)%0A      + description            = "Managed by Terraform"%0A      + egress                 = [%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + from_port        = 0%0A              + ipv6_cidr_blocks = []%0A              + prefix_list_ids  = []%0A              + protocol         = "-1"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 0%0A                # (1 unchanged attribute hidden)%0A            },%0A        ]%0A      + id                     = (known after apply)%0A      + ingress                = [%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 22%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 22%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 443%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 443%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 5173%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 5173%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 8000%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 8000%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 8080%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 8080%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 80%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 80%0A            },%0A        ]%0A      + name                   = (known after apply)%0A      + name_prefix            = (known after apply)%0A      + owner_id               = (known after apply)%0A      + revoke_rules_on_delete = false%0A      + tags                   = {%0A          + "Name" = "MainSG"%0A        }%0A      + tags_all               = {%0A          + "Name" = "MainSG"%0A        }%0A      + vpc_id                 = (known after apply)%0A    }%0A%0A  # aws_subnet.public_subnet will be created%0A  + resource "aws_subnet" "public_subnet" {%0A      + arn                                            = (known after apply)%0A      + assign_ipv6_address_on_creation                = false%0A      + availability_zone                              = (known after apply)%0A      + availability_zone_id                           = (known after apply)%0A      + cidr_block                                     = "10.0.1.0/24"%0A      + enable_dns64                                   = false%0A      + enable_resource_name_dns_a_record_on_launch    = false%0A      + enable_resource_name_dns_aaaa_record_on_launch = false%0A      + id                                             = (known after apply)%0A      + ipv6_cidr_block_association_id                 = (known after apply)%0A      + ipv6_native                                    = false%0A      + map_public_ip_on_launch                        = true%0A      + owner_id                                       = (known after apply)%0A      + private_dns_hostname_type_on_launch            = (known after apply)%0A      + tags                                           = {%0A          + "Name" = "MainSubnet"%0A        }%0A      + tags_all                                       = {%0A          + "Name" = "MainSubnet"%0A        }%0A      + vpc_id                                         = (known after apply)%0A    }%0A%0A  # aws_vpc.vpc will be created%0A  + resource "aws_vpc" "vpc" {%0A      + arn                                  = (known after apply)%0A      + cidr_block                           = "10.0.0.0/16"%0A      + default_network_acl_id               = (known after apply)%0A      + default_route_table_id               = (known after apply)%0A      + default_security_group_id            = (known after apply)%0A      + dhcp_options_id                      = (known after apply)%0A      + enable_dns_hostnames                 = true%0A      + enable_dns_support                   = true%0A      + enable_network_address_usage_metrics = (known after apply)%0A      + id                                   = (known after apply)%0A      + instance_tenancy                     = "default"%0A      + ipv6_association_id                  = (known after apply)%0A      + ipv6_cidr_block                      = (known after apply)%0A      + ipv6_cidr_block_network_border_group = (known after apply)%0A      + main_route_table_id                  = (known after apply)%0A      + owner_id                             = (known after apply)%0A      + tags                                 = {%0A          + "Name" = "MainVPC"%0A        }%0A      + tags_all                             = {%0A          + "Name" = "MainVPC"%0A        }%0A    }%0A%0A  # local_file.ansible_inventory will be created%0A  + resource "local_file" "ansible_inventory" {%0A      + content              = (known after apply)%0A      + content_base64sha256 = (known after apply)%0A      + content_base64sha512 = (known after apply)%0A      + content_md5          = (known after apply)%0A      + content_sha1         = (known after apply)%0A      + content_sha256       = (known after apply)%0A      + content_sha512       = (known after apply)%0A      + directory_permission = "0777"%0A      + file_permission      = "0777"%0A      + filename             = "inventory.ini"%0A      + id                   = (known after apply)%0A    }%0A%0APlan: 15 to add, 0 to change, 0 to destroy.%0A%0AChanges to Outputs:%0A  + instance_public_ip = (known after apply)%0A
::debug::stderr: 
::debug::exitcode: 0

New Infracost Breakdown 💰

Show Breakdown
Project: main

 Name                                                      Monthly Qty  Unit                  Monthly Cost   
                                                                                                             
 aws_instance.ec2                                                                                            
 ├─ Instance usage (Linux/UNIX, on-demand, t2.large)               730  hours                       $67.74   
 └─ root_block_device                                                                                        
    └─ Storage (general purpose SSD, gp2)                            8  GB                           $0.80   
                                                                                                             
 aws_instance.ec2-2                                                                                          
 ├─ Instance usage (Linux/UNIX, on-demand, t2.large)               730  hours                       $67.74   
 └─ root_block_device                                                                                        
    └─ Storage (general purpose SSD, gp2)                            8  GB                           $0.80   
                                                                                                             
 aws_route53_record.db_record                                                                                
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.frontend_record                                                                          
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.traefik_record                                                                           
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.www_db_record                                                                            
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.www_frontend_record                                                                      
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.www_traefik_record                                                                       
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 OVERALL TOTAL                                                                                    $137.09 

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

──────────────────────────────────
14 cloud resources were detected:
∙ 8 were estimated
∙ 6 were free

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Project                                            ┃ Baseline cost ┃ Usage cost* ┃ Total cost ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━╋━━━━━━━━━━━━┫
┃ main                                               ┃          $137 ┃           - ┃       $137 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━━━┛

Pushed by: @DrInTech22, Action: pull_request

Copy link

Terraform Plan 📖success

Show Plan
[command]/home/runner/work/_temp/276115ec-328c-47a3-9ac6-b36d2e0eb0b7/terraform-bin show -no-color tfplan.out

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

Terraform will perform the following actions:

  # aws_instance.ec2 will be created
  + resource "aws_instance" "ec2" {
      + ami                                  = "ami-005fc0f236362e99f"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = (known after apply)
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_stop                     = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + enable_primary_ipv6                  = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + host_resource_group_arn              = (known after apply)
      + iam_instance_profile                 = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_lifecycle                   = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "t2.large"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = "hello"
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + spot_instance_request_id             = (known after apply)
      + subnet_id                            = (known after apply)
      + tags                                 = {
          + "Name" = "MainEC2Instance"
        }
      + tags_all                             = {
          + "Name" = "MainEC2Instance"
        }
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + user_data_replace_on_change          = false
      + vpc_security_group_ids               = (known after apply)

      + capacity_reservation_specification (known after apply)

      + cpu_options (known after apply)

      + ebs_block_device (known after apply)

      + enclave_options (known after apply)

      + ephemeral_block_device (known after apply)

      + instance_market_options (known after apply)

      + maintenance_options (known after apply)

      + metadata_options (known after apply)

      + network_interface (known after apply)

      + private_dns_name_options (known after apply)

      + root_block_device (known after apply)
    }

  # aws_internet_gateway.igw will be created
  + resource "aws_internet_gateway" "igw" {
      + arn      = (known after apply)
      + id       = (known after apply)
      + owner_id = (known after apply)
      + tags     = {
          + "Name" = "MainIGW"
        }
      + tags_all = {
          + "Name" = "MainIGW"
        }
      + vpc_id   = (known after apply)
    }

  # aws_route53_record.db_record will be created
  + resource "aws_route53_record" "db_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "db.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.frontend_record will be created
  + resource "aws_route53_record" "frontend_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.traefik_record will be created
  + resource "aws_route53_record" "traefik_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "traefik.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.www_db_record will be created
  + resource "aws_route53_record" "www_db_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "www.db.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.www_frontend_record will be created
  + resource "aws_route53_record" "www_frontend_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "www.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route53_record.www_traefik_record will be created
  + resource "aws_route53_record" "www_traefik_record" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "www.traefik.test.drintech.online"
      + records         = (known after apply)
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z01212662RD8CEFOSDUAM"
    }

  # aws_route_table.rt will be created
  + resource "aws_route_table" "rt" {
      + arn              = (known after apply)
      + id               = (known after apply)
      + owner_id         = (known after apply)
      + propagating_vgws = (known after apply)
      + route            = [
          + {
              + cidr_block                 = "0.0.0.0/0"
              + gateway_id                 = (known after apply)
                # (11 unchanged attributes hidden)
            },
        ]
      + tags             = {
          + "Name" = "MainRouteTable"
        }
      + tags_all         = {
          + "Name" = "MainRouteTable"
        }
      + vpc_id           = (known after apply)
    }

  # aws_route_table_association.rt_association will be created
  + resource "aws_route_table_association" "rt_association" {
      + id             = (known after apply)
      + route_table_id = (known after apply)
      + subnet_id      = (known after apply)
    }

  # aws_security_group.sg will be created
  + resource "aws_security_group" "sg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = [
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + from_port        = 0
              + ipv6_cidr_blocks = []
              + prefix_list_ids  = []
              + protocol         = "-1"
              + security_groups  = []
              + self             = false
              + to_port          = 0
                # (1 unchanged attribute hidden)
            },
        ]
      + id                     = (known after apply)
      + ingress                = [
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 22
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 22
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 443
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 443
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 5173
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 5173
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 8000
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 8000
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 8080
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 8080
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = "TLS from VPC"
              + from_port        = 80
              + ipv6_cidr_blocks = [
                  + "::/0",
                ]
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = false
              + to_port          = 80
            },
        ]
      + name                   = (known after apply)
      + name_prefix            = (known after apply)
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + tags                   = {
          + "Name" = "MainSG"
        }
      + tags_all               = {
          + "Name" = "MainSG"
        }
      + vpc_id                 = (known after apply)
    }

  # aws_subnet.public_subnet will be created
  + resource "aws_subnet" "public_subnet" {
      + arn                                            = (known after apply)
      + assign_ipv6_address_on_creation                = false
      + availability_zone                              = (known after apply)
      + availability_zone_id                           = (known after apply)
      + cidr_block                                     = "10.0.1.0/24"
      + 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                        = true
      + owner_id                                       = (known after apply)
      + private_dns_hostname_type_on_launch            = (known after apply)
      + tags                                           = {
          + "Name" = "MainSubnet"
        }
      + tags_all                                       = {
          + "Name" = "MainSubnet"
        }
      + vpc_id                                         = (known after apply)
    }

  # aws_vpc.vpc will be created
  + resource "aws_vpc" "vpc" {
      + arn                                  = (known after apply)
      + cidr_block                           = "10.0.0.0/16"
      + default_network_acl_id               = (known after apply)
      + default_route_table_id               = (known after apply)
      + default_security_group_id            = (known after apply)
      + dhcp_options_id                      = (known after apply)
      + enable_dns_hostnames                 = true
      + enable_dns_support                   = true
      + enable_network_address_usage_metrics = (known after apply)
      + id                                   = (known after apply)
      + instance_tenancy                     = "default"
      + ipv6_association_id                  = (known after apply)
      + ipv6_cidr_block                      = (known after apply)
      + ipv6_cidr_block_network_border_group = (known after apply)
      + main_route_table_id                  = (known after apply)
      + owner_id                             = (known after apply)
      + tags                                 = {
          + "Name" = "MainVPC"
        }
      + tags_all                             = {
          + "Name" = "MainVPC"
        }
    }

  # local_file.ansible_inventory will be created
  + resource "local_file" "ansible_inventory" {
      + content              = (known after apply)
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0777"
      + filename             = "inventory.ini"
      + id                   = (known after apply)
    }

Plan: 14 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + instance_public_ip = (known after apply)
::debug::Terraform exited with code 0.
::debug::stdout: %0ATerraform used the selected providers to generate the following execution%0Aplan. Resource actions are indicated with the following symbols:%0A  + create%0A%0ATerraform will perform the following actions:%0A%0A  # aws_instance.ec2 will be created%0A  + resource "aws_instance" "ec2" {%0A      + ami                                  = "ami-005fc0f236362e99f"%0A      + arn                                  = (known after apply)%0A      + associate_public_ip_address          = (known after apply)%0A      + availability_zone                    = (known after apply)%0A      + cpu_core_count                       = (known after apply)%0A      + cpu_threads_per_core                 = (known after apply)%0A      + disable_api_stop                     = (known after apply)%0A      + disable_api_termination              = (known after apply)%0A      + ebs_optimized                        = (known after apply)%0A      + enable_primary_ipv6                  = (known after apply)%0A      + get_password_data                    = false%0A      + host_id                              = (known after apply)%0A      + host_resource_group_arn              = (known after apply)%0A      + iam_instance_profile                 = (known after apply)%0A      + id                                   = (known after apply)%0A      + instance_initiated_shutdown_behavior = (known after apply)%0A      + instance_lifecycle                   = (known after apply)%0A      + instance_state                       = (known after apply)%0A      + instance_type                        = "t2.large"%0A      + ipv6_address_count                   = (known after apply)%0A      + ipv6_addresses                       = (known after apply)%0A      + key_name                             = "hello"%0A      + monitoring                           = (known after apply)%0A      + outpost_arn                          = (known after apply)%0A      + password_data                        = (known after apply)%0A      + placement_group                      = (known after apply)%0A      + placement_partition_number           = (known after apply)%0A      + primary_network_interface_id         = (known after apply)%0A      + private_dns                          = (known after apply)%0A      + private_ip                           = (known after apply)%0A      + public_dns                           = (known after apply)%0A      + public_ip                            = (known after apply)%0A      + secondary_private_ips                = (known after apply)%0A      + security_groups                      = (known after apply)%0A      + source_dest_check                    = true%0A      + spot_instance_request_id             = (known after apply)%0A      + subnet_id                            = (known after apply)%0A      + tags                                 = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tags_all                             = {%0A          + "Name" = "MainEC2Instance"%0A        }%0A      + tenancy                              = (known after apply)%0A      + user_data                            = (known after apply)%0A      + user_data_base64                     = (known after apply)%0A      + user_data_replace_on_change          = false%0A      + vpc_security_group_ids               = (known after apply)%0A%0A      + capacity_reservation_specification (known after apply)%0A%0A      + cpu_options (known after apply)%0A%0A      + ebs_block_device (known after apply)%0A%0A      + enclave_options (known after apply)%0A%0A      + ephemeral_block_device (known after apply)%0A%0A      + instance_market_options (known after apply)%0A%0A      + maintenance_options (known after apply)%0A%0A      + metadata_options (known after apply)%0A%0A      + network_interface (known after apply)%0A%0A      + private_dns_name_options (known after apply)%0A%0A      + root_block_device (known after apply)%0A    }%0A%0A  # aws_internet_gateway.igw will be created%0A  + resource "aws_internet_gateway" "igw" {%0A      + arn      = (known after apply)%0A      + id       = (known after apply)%0A      + owner_id = (known after apply)%0A      + tags     = {%0A          + "Name" = "MainIGW"%0A        }%0A      + tags_all = {%0A          + "Name" = "MainIGW"%0A        }%0A      + vpc_id   = (known after apply)%0A    }%0A%0A  # aws_route53_record.db_record will be created%0A  + resource "aws_route53_record" "db_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "db.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.frontend_record will be created%0A  + resource "aws_route53_record" "frontend_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.traefik_record will be created%0A  + resource "aws_route53_record" "traefik_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "traefik.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.www_db_record will be created%0A  + resource "aws_route53_record" "www_db_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "www.db.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.www_frontend_record will be created%0A  + resource "aws_route53_record" "www_frontend_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "www.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route53_record.www_traefik_record will be created%0A  + resource "aws_route53_record" "www_traefik_record" {%0A      + allow_overwrite = (known after apply)%0A      + fqdn            = (known after apply)%0A      + id              = (known after apply)%0A      + name            = "www.traefik.test.drintech.online"%0A      + records         = (known after apply)%0A      + ttl             = 300%0A      + type            = "A"%0A      + zone_id         = "Z01212662RD8CEFOSDUAM"%0A    }%0A%0A  # aws_route_table.rt will be created%0A  + resource "aws_route_table" "rt" {%0A      + arn              = (known after apply)%0A      + id               = (known after apply)%0A      + owner_id         = (known after apply)%0A      + propagating_vgws = (known after apply)%0A      + route            = [%0A          + {%0A              + cidr_block                 = "0.0.0.0/0"%0A              + gateway_id                 = (known after apply)%0A                # (11 unchanged attributes hidden)%0A            },%0A        ]%0A      + tags             = {%0A          + "Name" = "MainRouteTable"%0A        }%0A      + tags_all         = {%0A          + "Name" = "MainRouteTable"%0A        }%0A      + vpc_id           = (known after apply)%0A    }%0A%0A  # aws_route_table_association.rt_association will be created%0A  + resource "aws_route_table_association" "rt_association" {%0A      + id             = (known after apply)%0A      + route_table_id = (known after apply)%0A      + subnet_id      = (known after apply)%0A    }%0A%0A  # aws_security_group.sg will be created%0A  + resource "aws_security_group" "sg" {%0A      + arn                    = (known after apply)%0A      + description            = "Managed by Terraform"%0A      + egress                 = [%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + from_port        = 0%0A              + ipv6_cidr_blocks = []%0A              + prefix_list_ids  = []%0A              + protocol         = "-1"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 0%0A                # (1 unchanged attribute hidden)%0A            },%0A        ]%0A      + id                     = (known after apply)%0A      + ingress                = [%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 22%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 22%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 443%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 443%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 5173%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 5173%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 8000%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 8000%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 8080%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 8080%0A            },%0A          + {%0A              + cidr_blocks      = [%0A                  + "0.0.0.0/0",%0A                ]%0A              + description      = "TLS from VPC"%0A              + from_port        = 80%0A              + ipv6_cidr_blocks = [%0A                  + "::/0",%0A                ]%0A              + prefix_list_ids  = []%0A              + protocol         = "tcp"%0A              + security_groups  = []%0A              + self             = false%0A              + to_port          = 80%0A            },%0A        ]%0A      + name                   = (known after apply)%0A      + name_prefix            = (known after apply)%0A      + owner_id               = (known after apply)%0A      + revoke_rules_on_delete = false%0A      + tags                   = {%0A          + "Name" = "MainSG"%0A        }%0A      + tags_all               = {%0A          + "Name" = "MainSG"%0A        }%0A      + vpc_id                 = (known after apply)%0A    }%0A%0A  # aws_subnet.public_subnet will be created%0A  + resource "aws_subnet" "public_subnet" {%0A      + arn                                            = (known after apply)%0A      + assign_ipv6_address_on_creation                = false%0A      + availability_zone                              = (known after apply)%0A      + availability_zone_id                           = (known after apply)%0A      + cidr_block                                     = "10.0.1.0/24"%0A      + enable_dns64                                   = false%0A      + enable_resource_name_dns_a_record_on_launch    = false%0A      + enable_resource_name_dns_aaaa_record_on_launch = false%0A      + id                                             = (known after apply)%0A      + ipv6_cidr_block_association_id                 = (known after apply)%0A      + ipv6_native                                    = false%0A      + map_public_ip_on_launch                        = true%0A      + owner_id                                       = (known after apply)%0A      + private_dns_hostname_type_on_launch            = (known after apply)%0A      + tags                                           = {%0A          + "Name" = "MainSubnet"%0A        }%0A      + tags_all                                       = {%0A          + "Name" = "MainSubnet"%0A        }%0A      + vpc_id                                         = (known after apply)%0A    }%0A%0A  # aws_vpc.vpc will be created%0A  + resource "aws_vpc" "vpc" {%0A      + arn                                  = (known after apply)%0A      + cidr_block                           = "10.0.0.0/16"%0A      + default_network_acl_id               = (known after apply)%0A      + default_route_table_id               = (known after apply)%0A      + default_security_group_id            = (known after apply)%0A      + dhcp_options_id                      = (known after apply)%0A      + enable_dns_hostnames                 = true%0A      + enable_dns_support                   = true%0A      + enable_network_address_usage_metrics = (known after apply)%0A      + id                                   = (known after apply)%0A      + instance_tenancy                     = "default"%0A      + ipv6_association_id                  = (known after apply)%0A      + ipv6_cidr_block                      = (known after apply)%0A      + ipv6_cidr_block_network_border_group = (known after apply)%0A      + main_route_table_id                  = (known after apply)%0A      + owner_id                             = (known after apply)%0A      + tags                                 = {%0A          + "Name" = "MainVPC"%0A        }%0A      + tags_all                             = {%0A          + "Name" = "MainVPC"%0A        }%0A    }%0A%0A  # local_file.ansible_inventory will be created%0A  + resource "local_file" "ansible_inventory" {%0A      + content              = (known after apply)%0A      + content_base64sha256 = (known after apply)%0A      + content_base64sha512 = (known after apply)%0A      + content_md5          = (known after apply)%0A      + content_sha1         = (known after apply)%0A      + content_sha256       = (known after apply)%0A      + content_sha512       = (known after apply)%0A      + directory_permission = "0777"%0A      + file_permission      = "0777"%0A      + filename             = "inventory.ini"%0A      + id                   = (known after apply)%0A    }%0A%0APlan: 14 to add, 0 to change, 0 to destroy.%0A%0AChanges to Outputs:%0A  + instance_public_ip = (known after apply)%0A
::debug::stderr: 
::debug::exitcode: 0

New Infracost Breakdown 💰

Show Breakdown
Project: main

 Name                                                      Monthly Qty  Unit                  Monthly Cost   
                                                                                                             
 aws_instance.ec2                                                                                            
 ├─ Instance usage (Linux/UNIX, on-demand, t2.large)               730  hours                       $67.74   
 └─ root_block_device                                                                                        
    └─ Storage (general purpose SSD, gp2)                            8  GB                           $0.80   
                                                                                                             
 aws_route53_record.db_record                                                                                
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.frontend_record                                                                          
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.traefik_record                                                                           
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.www_db_record                                                                            
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.www_frontend_record                                                                      
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 aws_route53_record.www_traefik_record                                                                       
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries    
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries    
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries    
                                                                                                             
 OVERALL TOTAL                                                                                     $68.54 

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

──────────────────────────────────
13 cloud resources were detected:
∙ 7 were estimated
∙ 6 were free

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Project                                            ┃ Baseline cost ┃ Usage cost* ┃ Total cost ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━╋━━━━━━━━━━━━┫
┃ main                                               ┃           $69 ┃           - ┃        $69 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━━━┛

Pushed by: @DrInTech22, Action: pull_request

@DrInTech22 DrInTech22 merged commit 4716aa4 into infra_main Dec 16, 2024
2 checks passed
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.

1 participant