cesko-digital / nasi-politici

Největší otevřená databáze českých politiků a političek. Zjistěte si, kdo vám vládne.
https://www.nasipolitici.cz
MIT License
20 stars 7 forks source link

Remove NAT gateway from AWS (cost savings) #64

Closed martinwenisch closed 4 years ago

martinwenisch commented 4 years ago

Udelal sem analyzu ceny AWS a smazal jsem NAT gateway (je to sice staticky naklad, ale relativne velky oproti celkove cene, kterou se snazime dostat co nejniz).

Druha relativne draha polozka je ELB (elastic load balancer), ktery je take staticky naklad, ale momentalne 50% ceny. Nechavam ho tam, protoze tam v tehle architekture byt musi.

Zbytek mimo ceny za beh kontejneru jsou halerove polozky.

github-actions[bot] commented 4 years ago

terraform plan Success

Show Output ``` An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols: ~ update in-place - destroy Terraform will perform the following actions: # aws_eip.nat-gateway-ip will be destroyed - resource "aws_eip" "nat-gateway-ip" { - association_id = "eipassoc-4d543080" -> null - domain = "vpc" -> null - id = "eipalloc-08dccb599d349a49e" -> null - network_interface = "eni-059f56cd69cb445b4" -> null - private_dns = "ip-10-0-21-164.eu-central-1.compute.internal" -> null - private_ip = "10.0.21.164" -> null - public_dns = "ec2-35-156-170-157.eu-central-1.compute.amazonaws.com" -> null - public_ip = "35.156.170.157" -> null - public_ipv4_pool = "amazon" -> null - tags = {} -> null - vpc = true -> null } # aws_nat_gateway.nat-gateway will be destroyed - resource "aws_nat_gateway" "nat-gateway" { - allocation_id = "eipalloc-08dccb599d349a49e" -> null - id = "nat-0dd452ef1a5980a83" -> null - network_interface_id = "eni-059f56cd69cb445b4" -> null - private_ip = "10.0.21.164" -> null - public_ip = "35.156.170.157" -> null - subnet_id = "subnet-0b1c3af001915ce73" -> null - tags = {} -> null } # aws_route_table.private-routes will be updated in-place ~ resource "aws_route_table" "private-routes" { id = "rtb-0eb6ea99032824a8c" owner_id = "377434098968" propagating_vgws = [] ~ route = [ - { - cidr_block = "0.0.0.0/0" - egress_only_gateway_id = "" - gateway_id = "" - instance_id = "" - ipv6_cidr_block = "" - nat_gateway_id = "nat-0dd452ef1a5980a83" - network_interface_id = "" - transit_gateway_id = "" - vpc_peering_connection_id = "" }, + { + cidr_block = "0.0.0.0/0" + egress_only_gateway_id = "" + gateway_id = "igw-0784d24de6e76e237" + instance_id = "" + ipv6_cidr_block = "" + nat_gateway_id = "" + network_interface_id = "" + transit_gateway_id = "" + vpc_peering_connection_id = "" }, ] tags = { "Name" = "nasipolitici-private-routes" } vpc_id = "vpc-0c53fe02d84d085b4" } Plan: 0 to add, 1 to change, 2 to destroy. ```

Workflow: Terraform Plan on PR, Action: hashicorpterraform-github-actions3, Working Directory: infrastructure/aws, Workspace: default