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

Infra_features #10

Merged
merged 2 commits into from
Dec 11, 2024
Merged

Infra_features #10

merged 2 commits into from
Dec 11, 2024

Conversation

DrInTech22
Copy link
Owner

No description provided.

Copy link

💰 Infracost report

This pull request is aligned with your company's FinOps policies and the Well-Architected Framework.

This comment will be updated when code changes.

Copy link

Terraform Plan 📖success

Show Plan
[command]/home/runner/work/_temp/49684a54-0bfa-4270-9f20-6f78e6d6fd1d/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)
      + 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                             = "private_key"
      + 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                            = "subnet-0a3ad59e14cd84837"
      + 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               = [
          + "sg-0eae5c57e34170666",
        ]

      + 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_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"
    }

  # 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             = "../ansible/inventory.ini"
      + id                   = (known after apply)
    }

  # null_resource.run_ansible will be created
  + resource "null_resource" "run_ansible" {
      + id = (known after apply)
    }

Plan: 9 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      + 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                             = "private_key"%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                            = "subnet-0a3ad59e14cd84837"%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               = [%0A          + "sg-0eae5c57e34170666",%0A        ]%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_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  # 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             = "../ansible/inventory.ini"%0A      + id                   = (known after apply)%0A    }%0A%0A  # null_resource.run_ansible will be created%0A  + resource "null_resource" "run_ansible" {%0A      + id = (known after apply)%0A    }%0A%0APlan: 9 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 40cf03c into infra_main Dec 11, 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