From f2a8db492e9a5fcc75ecebf67f9e75d8132964e5 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 15 Apr 2024 21:41:32 +0100 Subject: [PATCH] Move to demo folder --- 2-simple-example/iac/terraform.tfstate | 3698 ----------------- .../iac/.terraform.lock.hcl | 0 demo/iac/.terraform.tfstate.lock.info | 1 + {2-simple-example => demo}/iac/data.tf | 0 {2-simple-example => demo}/iac/ecs.tf | 2 +- {2-simple-example => demo}/iac/locals.tf | 0 {2-simple-example => demo}/iac/main.tf | 0 .../iac/modules/cluster/README.md | 0 .../iac/modules/cluster/main.tf | 0 .../iac/modules/cluster/outputs.tf | 0 .../iac/modules/cluster/variables.tf | 0 .../iac/modules/cluster/versions.tf | 0 .../modules/container-definition/README.md | 0 .../iac/modules/container-definition/main.tf | 0 .../modules/container-definition/outputs.tf | 0 .../modules/container-definition/variables.tf | 0 .../modules/container-definition/versions.tf | 0 .../iac/modules/service/README.md | 0 .../iac/modules/service/main.tf | 0 .../iac/modules/service/outputs.tf | 0 .../iac/modules/service/variables.tf | 0 .../iac/modules/service/versions.tf | 0 {2-simple-example => demo}/iac/outputs.tf | 0 {2-simple-example => demo}/iac/route53.tf | 0 demo/iac/terraform.tfstate | 1573 +++++++ .../iac/terraform.tfstate.backup | 137 +- {2-simple-example => demo}/iac/variables.tf | 0 {2-simple-example => demo}/iac/versions.tf | 0 {2-simple-example => demo}/iac/vpc.tf | 0 29 files changed, 1623 insertions(+), 3788 deletions(-) delete mode 100644 2-simple-example/iac/terraform.tfstate rename {2-simple-example => demo}/iac/.terraform.lock.hcl (100%) create mode 100644 demo/iac/.terraform.tfstate.lock.info rename {2-simple-example => demo}/iac/data.tf (100%) rename {2-simple-example => demo}/iac/ecs.tf (99%) rename {2-simple-example => demo}/iac/locals.tf (100%) rename {2-simple-example => demo}/iac/main.tf (100%) rename {2-simple-example => demo}/iac/modules/cluster/README.md (100%) rename {2-simple-example => demo}/iac/modules/cluster/main.tf (100%) rename {2-simple-example => demo}/iac/modules/cluster/outputs.tf (100%) rename {2-simple-example => demo}/iac/modules/cluster/variables.tf (100%) rename {2-simple-example => demo}/iac/modules/cluster/versions.tf (100%) rename {2-simple-example => demo}/iac/modules/container-definition/README.md (100%) rename {2-simple-example => demo}/iac/modules/container-definition/main.tf (100%) rename {2-simple-example => demo}/iac/modules/container-definition/outputs.tf (100%) rename {2-simple-example => demo}/iac/modules/container-definition/variables.tf (100%) rename {2-simple-example => demo}/iac/modules/container-definition/versions.tf (100%) rename {2-simple-example => demo}/iac/modules/service/README.md (100%) rename {2-simple-example => demo}/iac/modules/service/main.tf (100%) rename {2-simple-example => demo}/iac/modules/service/outputs.tf (100%) rename {2-simple-example => demo}/iac/modules/service/variables.tf (100%) rename {2-simple-example => demo}/iac/modules/service/versions.tf (100%) rename {2-simple-example => demo}/iac/outputs.tf (100%) rename {2-simple-example => demo}/iac/route53.tf (100%) create mode 100644 demo/iac/terraform.tfstate rename {2-simple-example => demo}/iac/terraform.tfstate.backup (98%) rename {2-simple-example => demo}/iac/variables.tf (100%) rename {2-simple-example => demo}/iac/versions.tf (100%) rename {2-simple-example => demo}/iac/vpc.tf (100%) diff --git a/2-simple-example/iac/terraform.tfstate b/2-simple-example/iac/terraform.tfstate deleted file mode 100644 index 23f76fd..0000000 --- a/2-simple-example/iac/terraform.tfstate +++ /dev/null @@ -1,3698 +0,0 @@ -{ - "version": 4, - "terraform_version": "1.6.2", - "serial": 240, - "lineage": "eee76b09-c66c-0cf5-be4a-cdd9e6b807e9", - "outputs": { - "cluster_arn": { - "value": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", - "type": "string" - }, - "cluster_autoscaling_capacity_providers": { - "value": {}, - "type": [ - "object", - {} - ] - }, - "cluster_capacity_providers": { - "value": { - "chat-app-demo": { - "capacity_providers": [ - "FARGATE", - "FARGATE_SPOT" - ], - "cluster_name": "chat-app-demo", - "default_capacity_provider_strategy": [ - { - "base": 0, - "capacity_provider": "FARGATE_SPOT", - "weight": 50 - }, - { - "base": 20, - "capacity_provider": "FARGATE", - "weight": 50 - } - ], - "id": "chat-app-demo" - } - }, - "type": [ - "object", - { - "chat-app-demo": [ - "object", - { - "capacity_providers": [ - "set", - "string" - ], - "cluster_name": "string", - "default_capacity_provider_strategy": [ - "set", - [ - "object", - { - "base": "number", - "capacity_provider": "string", - "weight": "number" - } - ] - ], - "id": "string" - } - ] - } - ] - }, - "cluster_id": { - "value": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", - "type": "string" - }, - "cluster_name": { - "value": "chat-app-demo", - "type": "string" - }, - "service_autoscaling_policies": { - "value": { - "cpu": { - "alarm_arns": [ - "arn:aws:cloudwatch:eu-west-1:355614969320:alarm:TargetTracking-service/chat-app-demo/chat-app-demo-AlarmHigh-4a15096b-24f3-4d5e-92c7-2dcad838dd96", - "arn:aws:cloudwatch:eu-west-1:355614969320:alarm:TargetTracking-service/chat-app-demo/chat-app-demo-AlarmLow-7517ee09-8ead-4ef7-96a2-1da4d3ca50f8" - ], - "arn": "arn:aws:autoscaling:eu-west-1:355614969320:scalingPolicy:4124fdd5-6308-45e0-bb88-59b50bd7e1e5:resource/ecs/service/chat-app-demo/chat-app-demo:policyName/cpu", - "id": "cpu", - "name": "cpu", - "policy_type": "TargetTrackingScaling", - "resource_id": "service/chat-app-demo/chat-app-demo", - "scalable_dimension": "ecs:service:DesiredCount", - "service_namespace": "ecs", - "step_scaling_policy_configuration": [], - "target_tracking_scaling_policy_configuration": [ - { - "customized_metric_specification": [], - "disable_scale_in": false, - "predefined_metric_specification": [ - { - "predefined_metric_type": "ECSServiceAverageCPUUtilization", - "resource_label": "" - } - ], - "scale_in_cooldown": 300, - "scale_out_cooldown": 60, - "target_value": 75 - } - ] - }, - "memory": { - "alarm_arns": [ - "arn:aws:cloudwatch:eu-west-1:355614969320:alarm:TargetTracking-service/chat-app-demo/chat-app-demo-AlarmHigh-e1ac6d4d-a925-4f16-82e1-7265670bc5d7", - "arn:aws:cloudwatch:eu-west-1:355614969320:alarm:TargetTracking-service/chat-app-demo/chat-app-demo-AlarmLow-b31315ea-bbd0-4c22-8c1d-52aaafc579d3" - ], - "arn": "arn:aws:autoscaling:eu-west-1:355614969320:scalingPolicy:4124fdd5-6308-45e0-bb88-59b50bd7e1e5:resource/ecs/service/chat-app-demo/chat-app-demo:policyName/memory", - "id": "memory", - "name": "memory", - "policy_type": "TargetTrackingScaling", - "resource_id": "service/chat-app-demo/chat-app-demo", - "scalable_dimension": "ecs:service:DesiredCount", - "service_namespace": "ecs", - "step_scaling_policy_configuration": [], - "target_tracking_scaling_policy_configuration": [ - { - "customized_metric_specification": [], - "disable_scale_in": false, - "predefined_metric_specification": [ - { - "predefined_metric_type": "ECSServiceAverageMemoryUtilization", - "resource_label": "" - } - ], - "scale_in_cooldown": 300, - "scale_out_cooldown": 60, - "target_value": 75 - } - ] - } - }, - "type": [ - "object", - { - "cpu": [ - "object", - { - "alarm_arns": [ - "list", - "string" - ], - "arn": "string", - "id": "string", - "name": "string", - "policy_type": "string", - "resource_id": "string", - "scalable_dimension": "string", - "service_namespace": "string", - "step_scaling_policy_configuration": [ - "list", - [ - "object", - { - "adjustment_type": "string", - "cooldown": "number", - "metric_aggregation_type": "string", - "min_adjustment_magnitude": "number", - "step_adjustment": [ - "set", - [ - "object", - { - "metric_interval_lower_bound": "string", - "metric_interval_upper_bound": "string", - "scaling_adjustment": "number" - } - ] - ] - } - ] - ], - "target_tracking_scaling_policy_configuration": [ - "list", - [ - "object", - { - "customized_metric_specification": [ - "list", - [ - "object", - { - "dimensions": [ - "set", - [ - "object", - { - "name": "string", - "value": "string" - } - ] - ], - "metric_name": "string", - "metrics": [ - "set", - [ - "object", - { - "expression": "string", - "id": "string", - "label": "string", - "metric_stat": [ - "list", - [ - "object", - { - "metric": [ - "list", - [ - "object", - { - "dimensions": [ - "set", - [ - "object", - { - "name": "string", - "value": "string" - } - ] - ], - "metric_name": "string", - "namespace": "string" - } - ] - ], - "stat": "string", - "unit": "string" - } - ] - ], - "return_data": "bool" - } - ] - ], - "namespace": "string", - "statistic": "string", - "unit": "string" - } - ] - ], - "disable_scale_in": "bool", - "predefined_metric_specification": [ - "list", - [ - "object", - { - "predefined_metric_type": "string", - "resource_label": "string" - } - ] - ], - "scale_in_cooldown": "number", - "scale_out_cooldown": "number", - "target_value": "number" - } - ] - ] - } - ], - "memory": [ - "object", - { - "alarm_arns": [ - "list", - "string" - ], - "arn": "string", - "id": "string", - "name": "string", - "policy_type": "string", - "resource_id": "string", - "scalable_dimension": "string", - "service_namespace": "string", - "step_scaling_policy_configuration": [ - "list", - [ - "object", - { - "adjustment_type": "string", - "cooldown": "number", - "metric_aggregation_type": "string", - "min_adjustment_magnitude": "number", - "step_adjustment": [ - "set", - [ - "object", - { - "metric_interval_lower_bound": "string", - "metric_interval_upper_bound": "string", - "scaling_adjustment": "number" - } - ] - ] - } - ] - ], - "target_tracking_scaling_policy_configuration": [ - "list", - [ - "object", - { - "customized_metric_specification": [ - "list", - [ - "object", - { - "dimensions": [ - "set", - [ - "object", - { - "name": "string", - "value": "string" - } - ] - ], - "metric_name": "string", - "metrics": [ - "set", - [ - "object", - { - "expression": "string", - "id": "string", - "label": "string", - "metric_stat": [ - "list", - [ - "object", - { - "metric": [ - "list", - [ - "object", - { - "dimensions": [ - "set", - [ - "object", - { - "name": "string", - "value": "string" - } - ] - ], - "metric_name": "string", - "namespace": "string" - } - ] - ], - "stat": "string", - "unit": "string" - } - ] - ], - "return_data": "bool" - } - ] - ], - "namespace": "string", - "statistic": "string", - "unit": "string" - } - ] - ], - "disable_scale_in": "bool", - "predefined_metric_specification": [ - "list", - [ - "object", - { - "predefined_metric_type": "string", - "resource_label": "string" - } - ] - ], - "scale_in_cooldown": "number", - "scale_out_cooldown": "number", - "target_value": "number" - } - ] - ] - } - ] - } - ] - }, - "service_autoscaling_scheduled_actions": { - "value": {}, - "type": [ - "object", - {} - ] - }, - "service_container_definitions": { - "value": { - "chat-app": { - "cloudwatch_log_group_arn": "arn:aws:logs:eu-west-1:355614969320:log-group:/aws/ecs/chat-app-demo/chat-app", - "cloudwatch_log_group_name": "/aws/ecs/chat-app-demo/chat-app", - "container_definition": { - "cpu": 512, - "environment": [ - { - "name": "REDIS_ENDPOINT", - "value": "valkey" - } - ], - "image": "richarvey/chat-app:latest", - "interactive": false, - "linuxParameters": { - "initProcessEnabled": true - }, - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/aws/ecs/chat-app-demo/chat-app", - "awslogs-region": "eu-west-1", - "awslogs-stream-prefix": "ecs" - } - }, - "memory": 1024, - "memoryReservation": 100, - "mountPoints": [], - "name": "chat-app", - "portMappings": [ - { - "containerPort": 3000, - "hostPort": 3000, - "name": "chat-app", - "protocol": "tcp" - } - ], - "privileged": false, - "pseudoTerminal": false, - "readonlyRootFilesystem": true, - "startTimeout": 30, - "stopTimeout": 120, - "systemControls": [], - "user": "0", - "volumesFrom": [] - } - } - }, - "type": [ - "object", - { - "chat-app": [ - "object", - { - "cloudwatch_log_group_arn": "string", - "cloudwatch_log_group_name": "string", - "container_definition": [ - "object", - { - "cpu": "number", - "environment": [ - "list", - [ - "object", - { - "name": "string", - "value": "string" - } - ] - ], - "image": "string", - "interactive": "bool", - "linuxParameters": [ - "object", - { - "initProcessEnabled": "bool" - } - ], - "logConfiguration": [ - "object", - { - "logDriver": "string", - "options": [ - "object", - { - "awslogs-group": "string", - "awslogs-region": "string", - "awslogs-stream-prefix": "string" - } - ] - } - ], - "memory": "number", - "memoryReservation": "number", - "mountPoints": [ - "list", - "dynamic" - ], - "name": "string", - "portMappings": [ - "list", - [ - "object", - { - "containerPort": "number", - "hostPort": "number", - "name": "string", - "protocol": "string" - } - ] - ], - "privileged": "bool", - "pseudoTerminal": "bool", - "readonlyRootFilesystem": "bool", - "startTimeout": "number", - "stopTimeout": "number", - "systemControls": [ - "list", - [ - "map", - "string" - ] - ], - "user": "string", - "volumesFrom": [ - "list", - "dynamic" - ] - } - ] - } - ] - } - ] - }, - "service_id": { - "value": "arn:aws:ecs:eu-west-1:355614969320:service/chat-app-demo/chat-app-demo", - "type": "string" - }, - "service_name": { - "value": "chat-app-demo", - "type": "string" - }, - "service_security_group_arn": { - "value": "arn:aws:ec2:eu-west-1:355614969320:security-group/sg-05ad2646d8cc5f4a3", - "type": "string" - }, - "service_security_group_id": { - "value": "sg-05ad2646d8cc5f4a3", - "type": "string" - }, - "service_task_definition_arn": { - "value": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo:11", - "type": "string" - }, - "service_task_definition_family": { - "value": "chat-app-demo", - "type": "string" - }, - "service_task_definition_family_revision": { - "value": "chat-app-demo:11", - "type": "string" - }, - "service_task_definition_revision": { - "value": 11, - "type": "number" - }, - "service_task_exec_iam_role_arn": { - "value": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826752300000004", - "type": "string" - }, - "service_task_exec_iam_role_name": { - "value": "chat-app-demo-20240415175826752300000004", - "type": "string" - }, - "service_task_exec_iam_role_unique_id": { - "value": "AROAVFTCNZXUE6COZ2VQP", - "type": "string" - }, - "service_tasks_iam_role_arn": { - "value": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826751700000003", - "type": "string" - }, - "service_tasks_iam_role_name": { - "value": "chat-app-demo-20240415175826751700000003", - "type": "string" - }, - "service_tasks_iam_role_unique_id": { - "value": "AROAVFTCNZXUKB5TCDIJT", - "type": "string" - } - }, - "resources": [ - { - "mode": "data", - "type": "aws_availability_zones", - "name": "available", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "all_availability_zones": null, - "exclude_names": null, - "exclude_zone_ids": null, - "filter": null, - "group_names": [ - "eu-west-1" - ], - "id": "eu-west-1", - "names": [ - "eu-west-1a", - "eu-west-1b", - "eu-west-1c" - ], - "state": null, - "timeouts": null, - "zone_ids": [ - "euw1-az1", - "euw1-az2", - "euw1-az3" - ] - }, - "sensitive_attributes": [] - } - ] - }, - { - "mode": "managed", - "type": "aws_ecs_service", - "name": "service", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "alarms": [], - "capacity_provider_strategy": [], - "cluster": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", - "deployment_circuit_breaker": [ - { - "enable": false, - "rollback": false - } - ], - "deployment_controller": [ - { - "type": "ECS" - } - ], - "deployment_maximum_percent": 200, - "deployment_minimum_healthy_percent": 100, - "desired_count": 1, - "enable_ecs_managed_tags": false, - "enable_execute_command": false, - "force_new_deployment": null, - "health_check_grace_period_seconds": 0, - "iam_role": "/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS", - "id": "arn:aws:ecs:eu-west-1:355614969320:service/chat-app-demo/valkey", - "launch_type": "FARGATE", - "load_balancer": [], - "name": "valkey", - "network_configuration": [ - { - "assign_public_ip": false, - "security_groups": [ - "sg-0e041494928dc0a6b" - ], - "subnets": [ - "subnet-03484242e7e025e98", - "subnet-08a36304b08dcd4df", - "subnet-0d743b4c62e3de6de" - ] - } - ], - "ordered_placement_strategy": [], - "placement_constraints": [], - "platform_version": "LATEST", - "propagate_tags": "NONE", - "scheduling_strategy": "REPLICA", - "service_connect_configuration": [ - { - "enabled": true, - "log_configuration": [], - "namespace": "chat-app-demo", - "service": [ - { - "client_alias": [ - { - "dns_name": "valkey", - "port": 6379 - } - ], - "discovery_name": "valkey", - "ingress_port_override": 0, - "port_name": "valkey", - "timeout": [], - "tls": [] - } - ] - } - ], - "service_registries": [], - "tags": {}, - "tags_all": {}, - "task_definition": "service:3", - "timeouts": null, - "triggers": {}, - "wait_for_steady_state": false - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19", - "dependencies": [ - "aws_ecs_task_definition.task", - "aws_security_group.sg", - "data.aws_availability_zones.available", - "module.ecs_cluster.aws_cloudwatch_log_group.this", - "module.ecs_cluster.aws_ecs_cluster.this", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "mode": "managed", - "type": "aws_ecs_task_definition", - "name": "task", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ecs:eu-west-1:355614969320:task-definition/service:4", - "arn_without_revision": "arn:aws:ecs:eu-west-1:355614969320:task-definition/service", - "container_definitions": "[{\"cpu\":512,\"environment\":[],\"essential\":true,\"image\":\"valkey/valkey:7.2.4-rc1-alpine\",\"memory\":1024,\"mountPoints\":[],\"name\":\"valkey\",\"portMappings\":[{\"containerPort\":6379,\"hostPort\":6379,\"name\":\"valkey\",\"protocol\":\"tcp\"}],\"systemControls\":[],\"volumesFrom\":[]}]", - "cpu": "512", - "ephemeral_storage": [], - "execution_role_arn": "", - "family": "service", - "id": "service", - "inference_accelerator": [], - "ipc_mode": "", - "memory": "1024", - "network_mode": "awsvpc", - "pid_mode": "", - "placement_constraints": [], - "proxy_configuration": [], - "requires_compatibilities": [ - "EC2", - "FARGATE" - ], - "revision": 4, - "runtime_platform": [], - "skip_destroy": false, - "tags": {}, - "tags_all": {}, - "task_role_arn": "", - "track_latest": false, - "volume": [] - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" - } - ] - }, - { - "mode": "managed", - "type": "aws_route53_record", - "name": "chat", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 2, - "attributes": { - "alias": [ - { - "evaluate_target_health": true, - "name": "chat-app-demo-2046813119.eu-west-1.elb.amazonaws.com", - "zone_id": "Z32O12XQLNTSW2" - } - ], - "allow_overwrite": null, - "cidr_routing_policy": [], - "failover_routing_policy": [], - "fqdn": "chat.ngd.io", - "geolocation_routing_policy": [], - "geoproximity_routing_policy": [], - "health_check_id": "", - "id": "Z2TWGHEC8YQMWW_chat.ngd.io_A", - "latency_routing_policy": [], - "multivalue_answer_routing_policy": false, - "name": "chat.ngd.io", - "records": null, - "set_identifier": "", - "ttl": 0, - "type": "A", - "weighted_routing_policy": [], - "zone_id": "Z2TWGHEC8YQMWW" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", - "dependencies": [ - "data.aws_availability_zones.available", - "module.alb.aws_lb.this", - "module.alb.aws_security_group.this", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "mode": "managed", - "type": "aws_security_group", - "name": "sg", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:security-group/sg-0e041494928dc0a6b", - "description": "Managed by Terraform", - "egress": [ - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "", - "from_port": 0, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "-1", - "security_groups": [], - "self": false, - "to_port": 0 - } - ], - "id": "sg-0e041494928dc0a6b", - "ingress": [ - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "Port 80", - "from_port": 6379, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 6379 - }, - { - "cidr_blocks": [], - "description": "", - "from_port": 0, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "-1", - "security_groups": [], - "self": true, - "to_port": 0 - } - ], - "name": "ecs", - "name_prefix": "", - "owner_id": "355614969320", - "revoke_rules_on_delete": false, - "tags": {}, - "tags_all": {}, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", - "dependencies": [ - "module.vpc.aws_vpc.this" - ] - } - ] - }, - { - "mode": "managed", - "type": "aws_service_discovery_http_namespace", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "arn": "arn:aws:servicediscovery:eu-west-1:355614969320:namespace/ns-7exezy2cesetek5e", - "description": "CloudMap namespace for chat-app-demo", - "http_name": "chat-app-demo", - "id": "ns-7exezy2cesetek5e", - "name": "chat-app-demo", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - } - ] - }, - { - "mode": "managed", - "type": "null_resource", - "name": "update_desired_count", - "provider": "provider[\"registry.opentofu.org/hashicorp/null\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "id": "1861562314639812291", - "triggers": { - "desired_count": "3" - } - }, - "sensitive_attributes": [], - "dependencies": [ - "aws_service_discovery_http_namespace.this", - "data.aws_availability_zones.available", - "module.alb.aws_lb_target_group.this", - "module.ecs_cluster.aws_cloudwatch_log_group.this", - "module.ecs_cluster.aws_ecs_cluster.this", - "module.ecs_service.aws_ecs_service.ignore_task_definition", - "module.ecs_service.aws_ecs_service.this", - "module.ecs_service.aws_ecs_task_definition.this", - "module.ecs_service.aws_iam_policy.service", - "module.ecs_service.aws_iam_role.service", - "module.ecs_service.aws_iam_role.task_exec", - "module.ecs_service.aws_iam_role.tasks", - "module.ecs_service.aws_iam_role_policy_attachment.service", - "module.ecs_service.aws_security_group.this", - "module.ecs_service.data.aws_caller_identity.current", - "module.ecs_service.data.aws_ecs_task_definition.this", - "module.ecs_service.data.aws_iam_policy_document.service", - "module.ecs_service.data.aws_iam_policy_document.service_assume", - "module.ecs_service.data.aws_iam_policy_document.task_exec_assume", - "module.ecs_service.data.aws_iam_policy_document.tasks_assume", - "module.ecs_service.data.aws_partition.current", - "module.ecs_service.data.aws_region.current", - "module.ecs_service.data.aws_subnet.this", - "module.ecs_service.module.container_definition.aws_cloudwatch_log_group.this", - "module.ecs_service.module.container_definition.data.aws_region.current", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.alb", - "mode": "data", - "type": "aws_partition", - "name": "current", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "dns_suffix": "amazonaws.com", - "id": "aws", - "partition": "aws", - "reverse_dns_prefix": "com.amazonaws" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.alb", - "mode": "managed", - "type": "aws_lb", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "access_logs": [ - { - "bucket": "", - "enabled": false, - "prefix": "" - } - ], - "arn": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:loadbalancer/app/chat-app-demo/9cf8ea90daa21fc1", - "arn_suffix": "app/chat-app-demo/9cf8ea90daa21fc1", - "connection_logs": [ - { - "bucket": "", - "enabled": false, - "prefix": "" - } - ], - "customer_owned_ipv4_pool": "", - "desync_mitigation_mode": "defensive", - "dns_name": "chat-app-demo-2046813119.eu-west-1.elb.amazonaws.com", - "dns_record_client_routing_policy": null, - "drop_invalid_header_fields": true, - "enable_cross_zone_load_balancing": true, - "enable_deletion_protection": false, - "enable_http2": true, - "enable_tls_version_and_cipher_suite_headers": false, - "enable_waf_fail_open": false, - "enable_xff_client_port": false, - "enforce_security_group_inbound_rules_on_private_link_traffic": "", - "id": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:loadbalancer/app/chat-app-demo/9cf8ea90daa21fc1", - "idle_timeout": 60, - "internal": false, - "ip_address_type": "ipv4", - "load_balancer_type": "application", - "name": "chat-app-demo", - "name_prefix": "", - "preserve_host_header": false, - "security_groups": [ - "sg-062ee908d87078647" - ], - "subnet_mapping": [ - { - "allocation_id": "", - "ipv6_address": "", - "outpost_id": "", - "private_ipv4_address": "", - "subnet_id": "subnet-020b69a138405c937" - }, - { - "allocation_id": "", - "ipv6_address": "", - "outpost_id": "", - "private_ipv4_address": "", - "subnet_id": "subnet-08c4d0f2a7397c568" - }, - { - "allocation_id": "", - "ipv6_address": "", - "outpost_id": "", - "private_ipv4_address": "", - "subnet_id": "subnet-0b0690ac033109c33" - } - ], - "subnets": [ - "subnet-020b69a138405c937", - "subnet-08c4d0f2a7397c568", - "subnet-0b0690ac033109c33" - ], - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "timeouts": { - "create": null, - "delete": null, - "update": null - }, - "vpc_id": "vpc-036c1349ddd4a46ce", - "xff_header_processing_mode": "append", - "zone_id": "Z32O12XQLNTSW2" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwLCJ1cGRhdGUiOjYwMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.alb.aws_security_group.this", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.alb", - "mode": "managed", - "type": "aws_lb_listener", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": "ex_http", - "schema_version": 0, - "attributes": { - "alpn_policy": null, - "arn": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:listener/app/chat-app-demo/9cf8ea90daa21fc1/ce67dddf7aaf975b", - "certificate_arn": null, - "default_action": [ - { - "authenticate_cognito": [], - "authenticate_oidc": [], - "fixed_response": [], - "forward": [], - "order": 1, - "redirect": [], - "target_group_arn": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:targetgroup/tf-20240415175838841400000009/035dee14007ac0e1", - "type": "forward" - } - ], - "id": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:listener/app/chat-app-demo/9cf8ea90daa21fc1/ce67dddf7aaf975b", - "load_balancer_arn": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:loadbalancer/app/chat-app-demo/9cf8ea90daa21fc1", - "mutual_authentication": [], - "port": 80, - "protocol": "HTTP", - "ssl_policy": "", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsInVwZGF0ZSI6MzAwMDAwMDAwMDAwfX0=", - "dependencies": [ - "data.aws_availability_zones.available", - "module.alb.aws_lb.this", - "module.alb.aws_lb_target_group.this", - "module.alb.aws_security_group.this", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.alb", - "mode": "managed", - "type": "aws_lb_target_group", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": "ex_ecs", - "schema_version": 0, - "attributes": { - "arn": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:targetgroup/tf-20240415175838841400000009/035dee14007ac0e1", - "arn_suffix": "targetgroup/tf-20240415175838841400000009/035dee14007ac0e1", - "connection_termination": null, - "deregistration_delay": "5", - "health_check": [ - { - "enabled": true, - "healthy_threshold": 5, - "interval": 30, - "matcher": "200", - "path": "/", - "port": "traffic-port", - "protocol": "HTTP", - "timeout": 5, - "unhealthy_threshold": 2 - } - ], - "id": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:targetgroup/tf-20240415175838841400000009/035dee14007ac0e1", - "ip_address_type": "ipv4", - "lambda_multi_value_headers_enabled": false, - "load_balancer_arns": [ - "arn:aws:elasticloadbalancing:eu-west-1:355614969320:loadbalancer/app/chat-app-demo/9cf8ea90daa21fc1" - ], - "load_balancing_algorithm_type": "round_robin", - "load_balancing_anomaly_mitigation": "off", - "load_balancing_cross_zone_enabled": "true", - "name": "tf-20240415175838841400000009", - "name_prefix": "tf-", - "port": 80, - "preserve_client_ip": null, - "protocol": "HTTP", - "protocol_version": "HTTP1", - "proxy_protocol_v2": false, - "slow_start": 0, - "stickiness": [ - { - "cookie_duration": 86400, - "cookie_name": "", - "enabled": false, - "type": "lb_cookie" - } - ], - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "target_failover": [ - { - "on_deregistration": null, - "on_unhealthy": null - } - ], - "target_health_state": [ - { - "enable_unhealthy_connection_termination": null - } - ], - "target_type": "ip", - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.vpc.aws_vpc.this" - ], - "create_before_destroy": true - } - ] - }, - { - "module": "module.alb", - "mode": "managed", - "type": "aws_security_group", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:security-group/sg-062ee908d87078647", - "description": "Security group for chat-app-demo application load balancer", - "egress": [ - { - "cidr_blocks": [ - "10.0.0.0/16" - ], - "description": "", - "from_port": 0, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "-1", - "security_groups": [], - "self": false, - "to_port": 0 - } - ], - "id": "sg-062ee908d87078647", - "ingress": [ - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "", - "from_port": 80, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 80 - } - ], - "name": "chat-app-demo-2024041517583920720000000a", - "name_prefix": "chat-app-demo-", - "owner_id": "355614969320", - "revoke_rules_on_delete": false, - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", - "dependencies": [ - "module.vpc.aws_vpc.this" - ], - "create_before_destroy": true - } - ] - }, - { - "module": "module.alb", - "mode": "managed", - "type": "aws_vpc_security_group_egress_rule", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": "all", - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:security-group-rule/sgr-042c963363f21beb4", - "cidr_ipv4": "10.0.0.0/16", - "cidr_ipv6": null, - "description": null, - "from_port": null, - "id": "sgr-042c963363f21beb4", - "ip_protocol": "-1", - "prefix_list_id": null, - "referenced_security_group_id": null, - "security_group_id": "sg-062ee908d87078647", - "security_group_rule_id": "sgr-042c963363f21beb4", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "to_port": null - }, - "sensitive_attributes": [], - "dependencies": [ - "module.alb.aws_security_group.this", - "module.vpc.aws_vpc.this" - ] - } - ] - }, - { - "module": "module.alb", - "mode": "managed", - "type": "aws_vpc_security_group_ingress_rule", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": "all_http", - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:security-group-rule/sgr-0816e54f4b12b00ca", - "cidr_ipv4": "0.0.0.0/0", - "cidr_ipv6": null, - "description": null, - "from_port": 80, - "id": "sgr-0816e54f4b12b00ca", - "ip_protocol": "tcp", - "prefix_list_id": null, - "referenced_security_group_id": null, - "security_group_id": "sg-062ee908d87078647", - "security_group_rule_id": "sgr-0816e54f4b12b00ca", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "terraform-aws-modules": "alb" - }, - "to_port": 80 - }, - "sensitive_attributes": [], - "dependencies": [ - "module.alb.aws_security_group.this", - "module.vpc.aws_vpc.this" - ] - } - ] - }, - { - "module": "module.ecs_cluster", - "mode": "managed", - "type": "aws_cloudwatch_log_group", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:logs:eu-west-1:355614969320:log-group:/aws/ecs/chat-app-demo", - "id": "/aws/ecs/chat-app-demo", - "kms_key_id": "", - "log_group_class": "STANDARD", - "name": "/aws/ecs/chat-app-demo", - "name_prefix": "", - "retention_in_days": 90, - "skip_destroy": false, - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - } - ] - }, - { - "module": "module.ecs_cluster", - "mode": "managed", - "type": "aws_ecs_cluster", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", - "configuration": [ - { - "execute_command_configuration": [ - { - "kms_key_id": "", - "log_configuration": [], - "logging": "DEFAULT" - } - ] - } - ], - "id": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", - "name": "chat-app-demo", - "service_connect_defaults": [], - "setting": [ - { - "name": "containerInsights", - "value": "enabled" - } - ], - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ecs_cluster.aws_cloudwatch_log_group.this" - ] - } - ] - }, - { - "module": "module.ecs_cluster", - "mode": "managed", - "type": "aws_ecs_cluster_capacity_providers", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "capacity_providers": [ - "FARGATE", - "FARGATE_SPOT" - ], - "cluster_name": "chat-app-demo", - "default_capacity_provider_strategy": [ - { - "base": 0, - "capacity_provider": "FARGATE_SPOT", - "weight": 50 - }, - { - "base": 20, - "capacity_provider": "FARGATE", - "weight": 50 - } - ], - "id": "chat-app-demo" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ecs_cluster.aws_cloudwatch_log_group.this", - "module.ecs_cluster.aws_ecs_capacity_provider.this", - "module.ecs_cluster.aws_ecs_cluster.this" - ] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_caller_identity", - "name": "current", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "account_id": "355614969320", - "arn": "arn:aws:iam::355614969320:user/rharvey", - "id": "355614969320", - "user_id": "AIDAIICBK3Q64EOQBD5HM" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_ecs_task_definition", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo:11", - "arn_without_revision": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo", - "execution_role_arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826752300000004", - "family": "chat-app-demo", - "id": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo:11", - "network_mode": "awsvpc", - "revision": 11, - "status": "ACTIVE", - "task_definition": "chat-app-demo", - "task_role_arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826751700000003" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_iam_policy_document", - "name": "task_exec", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "id": "1415633931", - "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"Logs\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"logs:PutLogEvents\",\n \"logs:CreateLogStream\"\n ],\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"ECR\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"ecr:GetDownloadUrlForLayer\",\n \"ecr:GetAuthorizationToken\",\n \"ecr:BatchGetImage\",\n \"ecr:BatchCheckLayerAvailability\"\n ],\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"GetSSMParams\",\n \"Effect\": \"Allow\",\n \"Action\": \"ssm:GetParameters\",\n \"Resource\": \"arn:aws:ssm:*:*:parameter/*\"\n },\n {\n \"Sid\": \"GetSecrets\",\n \"Effect\": \"Allow\",\n \"Action\": \"secretsmanager:GetSecretValue\",\n \"Resource\": \"arn:aws:secretsmanager:*:*:secret:*\"\n }\n ]\n}", - "override_json": null, - "override_policy_documents": null, - "policy_id": null, - "source_json": null, - "source_policy_documents": null, - "statement": [ - { - "actions": [ - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "condition": [], - "effect": "Allow", - "not_actions": [], - "not_principals": [], - "not_resources": [], - "principals": [], - "resources": [ - "*" - ], - "sid": "Logs" - }, - { - "actions": [ - "ecr:BatchCheckLayerAvailability", - "ecr:BatchGetImage", - "ecr:GetAuthorizationToken", - "ecr:GetDownloadUrlForLayer" - ], - "condition": [], - "effect": "Allow", - "not_actions": [], - "not_principals": [], - "not_resources": [], - "principals": [], - "resources": [ - "*" - ], - "sid": "ECR" - }, - { - "actions": [ - "ssm:GetParameters" - ], - "condition": [], - "effect": "Allow", - "not_actions": [], - "not_principals": [], - "not_resources": [], - "principals": [], - "resources": [ - "arn:aws:ssm:*:*:parameter/*" - ], - "sid": "GetSSMParams" - }, - { - "actions": [ - "secretsmanager:GetSecretValue" - ], - "condition": [], - "effect": "Allow", - "not_actions": [], - "not_principals": [], - "not_resources": [], - "principals": [], - "resources": [ - "arn:aws:secretsmanager:*:*:secret:*" - ], - "sid": "GetSecrets" - } - ], - "version": "2012-10-17" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_iam_policy_document", - "name": "task_exec_assume", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "id": "2291109037", - "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"ECSTaskExecutionAssumeRole\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ecs-tasks.amazonaws.com\"\n }\n }\n ]\n}", - "override_json": null, - "override_policy_documents": null, - "policy_id": null, - "source_json": null, - "source_policy_documents": null, - "statement": [ - { - "actions": [ - "sts:AssumeRole" - ], - "condition": [], - "effect": "Allow", - "not_actions": [], - "not_principals": [], - "not_resources": [], - "principals": [ - { - "identifiers": [ - "ecs-tasks.amazonaws.com" - ], - "type": "Service" - } - ], - "resources": [], - "sid": "ECSTaskExecutionAssumeRole" - } - ], - "version": "2012-10-17" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_iam_policy_document", - "name": "tasks", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "id": "757765849", - "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"ECSExec\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"ssmmessages:OpenDataChannel\",\n \"ssmmessages:OpenControlChannel\",\n \"ssmmessages:CreateDataChannel\",\n \"ssmmessages:CreateControlChannel\"\n ],\n \"Resource\": \"*\"\n }\n ]\n}", - "override_json": null, - "override_policy_documents": null, - "policy_id": null, - "source_json": null, - "source_policy_documents": null, - "statement": [ - { - "actions": [ - "ssmmessages:CreateControlChannel", - "ssmmessages:CreateDataChannel", - "ssmmessages:OpenControlChannel", - "ssmmessages:OpenDataChannel" - ], - "condition": [], - "effect": "Allow", - "not_actions": [], - "not_principals": [], - "not_resources": [], - "principals": [], - "resources": [ - "*" - ], - "sid": "ECSExec" - } - ], - "version": "2012-10-17" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_iam_policy_document", - "name": "tasks_assume", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "id": "780565365", - "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"ECSTasksAssumeRole\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ecs-tasks.amazonaws.com\"\n },\n \"Condition\": {\n \"ArnLike\": {\n \"aws:SourceArn\": \"arn:aws:ecs:eu-west-1:355614969320:*\"\n },\n \"StringEquals\": {\n \"aws:SourceAccount\": \"355614969320\"\n }\n }\n }\n ]\n}", - "override_json": null, - "override_policy_documents": null, - "policy_id": null, - "source_json": null, - "source_policy_documents": null, - "statement": [ - { - "actions": [ - "sts:AssumeRole" - ], - "condition": [ - { - "test": "ArnLike", - "values": [ - "arn:aws:ecs:eu-west-1:355614969320:*" - ], - "variable": "aws:SourceArn" - }, - { - "test": "StringEquals", - "values": [ - "355614969320" - ], - "variable": "aws:SourceAccount" - } - ], - "effect": "Allow", - "not_actions": [], - "not_principals": [], - "not_resources": [], - "principals": [ - { - "identifiers": [ - "ecs-tasks.amazonaws.com" - ], - "type": "Service" - } - ], - "resources": [], - "sid": "ECSTasksAssumeRole" - } - ], - "version": "2012-10-17" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_partition", - "name": "current", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "dns_suffix": "amazonaws.com", - "id": "aws", - "partition": "aws", - "reverse_dns_prefix": "com.amazonaws" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_region", - "name": "current", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "description": "Europe (Ireland)", - "endpoint": "ec2.eu-west-1.amazonaws.com", - "id": "eu-west-1", - "name": "eu-west-1" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_subnet", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-0d743b4c62e3de6de", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1a", - "availability_zone_id": "euw1-az1", - "available_ip_address_count": 4091, - "cidr_block": "10.0.0.0/20", - "customer_owned_ipv4_pool": "", - "default_for_az": false, - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "filter": null, - "id": "subnet-0d743b4c62e3de6de", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "state": "available", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_appautoscaling_policy", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": "cpu", - "schema_version": 0, - "attributes": { - "alarm_arns": [ - "arn:aws:cloudwatch:eu-west-1:355614969320:alarm:TargetTracking-service/chat-app-demo/chat-app-demo-AlarmHigh-4a15096b-24f3-4d5e-92c7-2dcad838dd96", - "arn:aws:cloudwatch:eu-west-1:355614969320:alarm:TargetTracking-service/chat-app-demo/chat-app-demo-AlarmLow-7517ee09-8ead-4ef7-96a2-1da4d3ca50f8" - ], - "arn": "arn:aws:autoscaling:eu-west-1:355614969320:scalingPolicy:4124fdd5-6308-45e0-bb88-59b50bd7e1e5:resource/ecs/service/chat-app-demo/chat-app-demo:policyName/cpu", - "id": "cpu", - "name": "cpu", - "policy_type": "TargetTrackingScaling", - "resource_id": "service/chat-app-demo/chat-app-demo", - "scalable_dimension": "ecs:service:DesiredCount", - "service_namespace": "ecs", - "step_scaling_policy_configuration": [], - "target_tracking_scaling_policy_configuration": [ - { - "customized_metric_specification": [], - "disable_scale_in": false, - "predefined_metric_specification": [ - { - "predefined_metric_type": "ECSServiceAverageCPUUtilization", - "resource_label": "" - } - ], - "scale_in_cooldown": 300, - "scale_out_cooldown": 60, - "target_value": 75 - } - ] - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "aws_service_discovery_http_namespace.this", - "data.aws_availability_zones.available", - "module.alb.aws_lb_target_group.this", - "module.ecs_cluster.aws_cloudwatch_log_group.this", - "module.ecs_cluster.aws_ecs_cluster.this", - "module.ecs_service.aws_appautoscaling_target.this", - "module.ecs_service.aws_ecs_service.ignore_task_definition", - "module.ecs_service.aws_ecs_service.this", - "module.ecs_service.aws_ecs_task_definition.this", - "module.ecs_service.aws_iam_policy.service", - "module.ecs_service.aws_iam_role.service", - "module.ecs_service.aws_iam_role.task_exec", - "module.ecs_service.aws_iam_role.tasks", - "module.ecs_service.aws_iam_role_policy_attachment.service", - "module.ecs_service.aws_security_group.this", - "module.ecs_service.data.aws_caller_identity.current", - "module.ecs_service.data.aws_ecs_task_definition.this", - "module.ecs_service.data.aws_iam_policy_document.service", - "module.ecs_service.data.aws_iam_policy_document.service_assume", - "module.ecs_service.data.aws_iam_policy_document.task_exec_assume", - "module.ecs_service.data.aws_iam_policy_document.tasks_assume", - "module.ecs_service.data.aws_partition.current", - "module.ecs_service.data.aws_region.current", - "module.ecs_service.data.aws_subnet.this", - "module.ecs_service.module.container_definition.aws_cloudwatch_log_group.this", - "module.ecs_service.module.container_definition.data.aws_region.current", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": "memory", - "schema_version": 0, - "attributes": { - "alarm_arns": [ - "arn:aws:cloudwatch:eu-west-1:355614969320:alarm:TargetTracking-service/chat-app-demo/chat-app-demo-AlarmHigh-e1ac6d4d-a925-4f16-82e1-7265670bc5d7", - "arn:aws:cloudwatch:eu-west-1:355614969320:alarm:TargetTracking-service/chat-app-demo/chat-app-demo-AlarmLow-b31315ea-bbd0-4c22-8c1d-52aaafc579d3" - ], - "arn": "arn:aws:autoscaling:eu-west-1:355614969320:scalingPolicy:4124fdd5-6308-45e0-bb88-59b50bd7e1e5:resource/ecs/service/chat-app-demo/chat-app-demo:policyName/memory", - "id": "memory", - "name": "memory", - "policy_type": "TargetTrackingScaling", - "resource_id": "service/chat-app-demo/chat-app-demo", - "scalable_dimension": "ecs:service:DesiredCount", - "service_namespace": "ecs", - "step_scaling_policy_configuration": [], - "target_tracking_scaling_policy_configuration": [ - { - "customized_metric_specification": [], - "disable_scale_in": false, - "predefined_metric_specification": [ - { - "predefined_metric_type": "ECSServiceAverageMemoryUtilization", - "resource_label": "" - } - ], - "scale_in_cooldown": 300, - "scale_out_cooldown": 60, - "target_value": 75 - } - ] - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "aws_service_discovery_http_namespace.this", - "data.aws_availability_zones.available", - "module.alb.aws_lb_target_group.this", - "module.ecs_cluster.aws_cloudwatch_log_group.this", - "module.ecs_cluster.aws_ecs_cluster.this", - "module.ecs_service.aws_appautoscaling_target.this", - "module.ecs_service.aws_ecs_service.ignore_task_definition", - "module.ecs_service.aws_ecs_service.this", - "module.ecs_service.aws_ecs_task_definition.this", - "module.ecs_service.aws_iam_policy.service", - "module.ecs_service.aws_iam_role.service", - "module.ecs_service.aws_iam_role.task_exec", - "module.ecs_service.aws_iam_role.tasks", - "module.ecs_service.aws_iam_role_policy_attachment.service", - "module.ecs_service.aws_security_group.this", - "module.ecs_service.data.aws_caller_identity.current", - "module.ecs_service.data.aws_ecs_task_definition.this", - "module.ecs_service.data.aws_iam_policy_document.service", - "module.ecs_service.data.aws_iam_policy_document.service_assume", - "module.ecs_service.data.aws_iam_policy_document.task_exec_assume", - "module.ecs_service.data.aws_iam_policy_document.tasks_assume", - "module.ecs_service.data.aws_partition.current", - "module.ecs_service.data.aws_region.current", - "module.ecs_service.data.aws_subnet.this", - "module.ecs_service.module.container_definition.aws_cloudwatch_log_group.this", - "module.ecs_service.module.container_definition.data.aws_region.current", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_appautoscaling_target", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:application-autoscaling:eu-west-1:355614969320:scalable-target/0ec54124fdd5630845e0bb8859b50bd7e1e5", - "id": "service/chat-app-demo/chat-app-demo", - "max_capacity": 10, - "min_capacity": 1, - "resource_id": "service/chat-app-demo/chat-app-demo", - "role_arn": "arn:aws:iam::355614969320:role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService", - "scalable_dimension": "ecs:service:DesiredCount", - "service_namespace": "ecs", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "aws_service_discovery_http_namespace.this", - "data.aws_availability_zones.available", - "module.alb.aws_lb_target_group.this", - "module.ecs_cluster.aws_cloudwatch_log_group.this", - "module.ecs_cluster.aws_ecs_cluster.this", - "module.ecs_service.aws_ecs_service.ignore_task_definition", - "module.ecs_service.aws_ecs_service.this", - "module.ecs_service.aws_ecs_task_definition.this", - "module.ecs_service.aws_iam_policy.service", - "module.ecs_service.aws_iam_role.service", - "module.ecs_service.aws_iam_role.task_exec", - "module.ecs_service.aws_iam_role.tasks", - "module.ecs_service.aws_iam_role_policy_attachment.service", - "module.ecs_service.aws_security_group.this", - "module.ecs_service.data.aws_caller_identity.current", - "module.ecs_service.data.aws_ecs_task_definition.this", - "module.ecs_service.data.aws_iam_policy_document.service", - "module.ecs_service.data.aws_iam_policy_document.service_assume", - "module.ecs_service.data.aws_iam_policy_document.task_exec_assume", - "module.ecs_service.data.aws_iam_policy_document.tasks_assume", - "module.ecs_service.data.aws_partition.current", - "module.ecs_service.data.aws_region.current", - "module.ecs_service.data.aws_subnet.this", - "module.ecs_service.module.container_definition.aws_cloudwatch_log_group.this", - "module.ecs_service.module.container_definition.data.aws_region.current", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_ecs_service", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "alarms": [], - "capacity_provider_strategy": [], - "cluster": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", - "deployment_circuit_breaker": [ - { - "enable": false, - "rollback": false - } - ], - "deployment_controller": [ - { - "type": "ECS" - } - ], - "deployment_maximum_percent": 200, - "deployment_minimum_healthy_percent": 66, - "desired_count": 1, - "enable_ecs_managed_tags": true, - "enable_execute_command": true, - "force_new_deployment": true, - "health_check_grace_period_seconds": 0, - "iam_role": "/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS", - "id": "arn:aws:ecs:eu-west-1:355614969320:service/chat-app-demo/chat-app-demo", - "launch_type": "FARGATE", - "load_balancer": [ - { - "container_name": "chat-app", - "container_port": 3000, - "elb_name": "", - "target_group_arn": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:targetgroup/tf-20240415175838841400000009/035dee14007ac0e1" - } - ], - "name": "chat-app-demo", - "network_configuration": [ - { - "assign_public_ip": false, - "security_groups": [ - "sg-05ad2646d8cc5f4a3" - ], - "subnets": [ - "subnet-03484242e7e025e98", - "subnet-08a36304b08dcd4df", - "subnet-0d743b4c62e3de6de" - ] - } - ], - "ordered_placement_strategy": [], - "placement_constraints": [], - "platform_version": "LATEST", - "propagate_tags": "NONE", - "scheduling_strategy": "REPLICA", - "service_connect_configuration": [ - { - "enabled": true, - "log_configuration": [], - "namespace": "arn:aws:servicediscovery:eu-west-1:355614969320:namespace/ns-7exezy2cesetek5e", - "service": [ - { - "client_alias": [ - { - "dns_name": "chat-app", - "port": 3000 - } - ], - "discovery_name": "chat-app", - "ingress_port_override": 0, - "port_name": "chat-app", - "timeout": [], - "tls": [] - } - ] - } - ], - "service_registries": [], - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "ServiceTag": "Tag on service level" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", - "ServiceTag": "Tag on service level" - }, - "task_definition": "chat-app-demo:11", - "timeouts": { - "create": null, - "delete": null, - "update": null - }, - "triggers": {}, - "wait_for_steady_state": false - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19", - "dependencies": [ - "aws_service_discovery_http_namespace.this", - "data.aws_availability_zones.available", - "module.alb.aws_lb_target_group.this", - "module.ecs_cluster.aws_cloudwatch_log_group.this", - "module.ecs_cluster.aws_ecs_cluster.this", - "module.ecs_service.aws_ecs_task_definition.this", - "module.ecs_service.aws_iam_policy.service", - "module.ecs_service.aws_iam_role.service", - "module.ecs_service.aws_iam_role.task_exec", - "module.ecs_service.aws_iam_role.tasks", - "module.ecs_service.aws_iam_role_policy_attachment.service", - "module.ecs_service.aws_security_group.this", - "module.ecs_service.data.aws_caller_identity.current", - "module.ecs_service.data.aws_ecs_task_definition.this", - "module.ecs_service.data.aws_iam_policy_document.service", - "module.ecs_service.data.aws_iam_policy_document.service_assume", - "module.ecs_service.data.aws_iam_policy_document.task_exec_assume", - "module.ecs_service.data.aws_iam_policy_document.tasks_assume", - "module.ecs_service.data.aws_partition.current", - "module.ecs_service.data.aws_region.current", - "module.ecs_service.data.aws_subnet.this", - "module.ecs_service.module.container_definition.aws_cloudwatch_log_group.this", - "module.ecs_service.module.container_definition.data.aws_region.current", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_ecs_task_definition", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo:11", - "arn_without_revision": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo", - "container_definitions": "[{\"cpu\":512,\"environment\":[{\"name\":\"REDIS_ENDPOINT\",\"value\":\"valkey\"}],\"essential\":true,\"image\":\"richarvey/chat-app:latest\",\"interactive\":false,\"linuxParameters\":{\"initProcessEnabled\":true},\"logConfiguration\":{\"logDriver\":\"awslogs\",\"options\":{\"awslogs-group\":\"/aws/ecs/chat-app-demo/chat-app\",\"awslogs-region\":\"eu-west-1\",\"awslogs-stream-prefix\":\"ecs\"}},\"memory\":1024,\"memoryReservation\":100,\"mountPoints\":[],\"name\":\"chat-app\",\"portMappings\":[{\"containerPort\":3000,\"hostPort\":3000,\"name\":\"chat-app\",\"protocol\":\"tcp\"}],\"privileged\":false,\"pseudoTerminal\":false,\"readonlyRootFilesystem\":true,\"startTimeout\":30,\"stopTimeout\":120,\"systemControls\":[],\"user\":\"0\",\"volumesFrom\":[]}]", - "cpu": "1024", - "ephemeral_storage": [], - "execution_role_arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826752300000004", - "family": "chat-app-demo", - "id": "chat-app-demo", - "inference_accelerator": [], - "ipc_mode": "", - "memory": "4096", - "network_mode": "awsvpc", - "pid_mode": "", - "placement_constraints": [], - "proxy_configuration": [], - "requires_compatibilities": [ - "FARGATE" - ], - "revision": 11, - "runtime_platform": [ - { - "cpu_architecture": "X86_64", - "operating_system_family": "LINUX" - } - ], - "skip_destroy": false, - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "task_role_arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826751700000003", - "track_latest": false, - "volume": [] - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", - "dependencies": [ - "module.ecs_service.aws_iam_role.task_exec", - "module.ecs_service.aws_iam_role.tasks", - "module.ecs_service.data.aws_caller_identity.current", - "module.ecs_service.data.aws_iam_policy_document.task_exec_assume", - "module.ecs_service.data.aws_iam_policy_document.tasks_assume", - "module.ecs_service.data.aws_partition.current", - "module.ecs_service.data.aws_region.current", - "module.ecs_service.module.container_definition.aws_cloudwatch_log_group.this", - "module.ecs_service.module.container_definition.data.aws_region.current" - ], - "create_before_destroy": true - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_iam_policy", - "name": "task_exec", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:iam::355614969320:policy/chat-app-demo-20240415175826751600000002", - "description": "Task execution role IAM policy", - "id": "arn:aws:iam::355614969320:policy/chat-app-demo-20240415175826751600000002", - "name": "chat-app-demo-20240415175826751600000002", - "name_prefix": "chat-app-demo-", - "path": "/", - "policy": "{\"Statement\":[{\"Action\":[\"logs:PutLogEvents\",\"logs:CreateLogStream\"],\"Effect\":\"Allow\",\"Resource\":\"*\",\"Sid\":\"Logs\"},{\"Action\":[\"ecr:GetDownloadUrlForLayer\",\"ecr:GetAuthorizationToken\",\"ecr:BatchGetImage\",\"ecr:BatchCheckLayerAvailability\"],\"Effect\":\"Allow\",\"Resource\":\"*\",\"Sid\":\"ECR\"},{\"Action\":\"ssm:GetParameters\",\"Effect\":\"Allow\",\"Resource\":\"arn:aws:ssm:*:*:parameter/*\",\"Sid\":\"GetSSMParams\"},{\"Action\":\"secretsmanager:GetSecretValue\",\"Effect\":\"Allow\",\"Resource\":\"arn:aws:secretsmanager:*:*:secret:*\",\"Sid\":\"GetSecrets\"}],\"Version\":\"2012-10-17\"}", - "policy_id": "ANPAVFTCNZXUCAOJRGKTW", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ecs_service.data.aws_iam_policy_document.task_exec" - ] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_iam_role", - "name": "task_exec", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826752300000004", - "assume_role_policy": "{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"ecs-tasks.amazonaws.com\"},\"Sid\":\"ECSTaskExecutionAssumeRole\"}],\"Version\":\"2012-10-17\"}", - "create_date": "2024-04-15T17:58:27Z", - "description": "Task execution role for chat-app-demo", - "force_detach_policies": true, - "id": "chat-app-demo-20240415175826752300000004", - "inline_policy": [], - "managed_policy_arns": [ - "arn:aws:iam::355614969320:policy/chat-app-demo-20240415175826751600000002" - ], - "max_session_duration": 3600, - "name": "chat-app-demo-20240415175826752300000004", - "name_prefix": "chat-app-demo-", - "path": "/", - "permissions_boundary": "", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "unique_id": "AROAVFTCNZXUE6COZ2VQP" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ecs_service.data.aws_iam_policy_document.task_exec_assume" - ], - "create_before_destroy": true - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_iam_role", - "name": "tasks", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826751700000003", - "assume_role_policy": "{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Condition\":{\"ArnLike\":{\"aws:SourceArn\":\"arn:aws:ecs:eu-west-1:355614969320:*\"},\"StringEquals\":{\"aws:SourceAccount\":\"355614969320\"}},\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"ecs-tasks.amazonaws.com\"},\"Sid\":\"ECSTasksAssumeRole\"}],\"Version\":\"2012-10-17\"}", - "create_date": "2024-04-15T17:58:27Z", - "description": "", - "force_detach_policies": true, - "id": "chat-app-demo-20240415175826751700000003", - "inline_policy": [ - { - "name": "chat-app-demo-20240415175827755900000005", - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"ssmmessages:OpenDataChannel\",\"ssmmessages:OpenControlChannel\",\"ssmmessages:CreateDataChannel\",\"ssmmessages:CreateControlChannel\"],\"Effect\":\"Allow\",\"Resource\":\"*\",\"Sid\":\"ECSExec\"}]}" - } - ], - "managed_policy_arns": [], - "max_session_duration": 3600, - "name": "chat-app-demo-20240415175826751700000003", - "name_prefix": "chat-app-demo-", - "path": "/", - "permissions_boundary": "", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "unique_id": "AROAVFTCNZXUKB5TCDIJT" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ecs_service.data.aws_caller_identity.current", - "module.ecs_service.data.aws_iam_policy_document.tasks_assume", - "module.ecs_service.data.aws_partition.current", - "module.ecs_service.data.aws_region.current" - ], - "create_before_destroy": true - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_iam_role_policy", - "name": "tasks", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "id": "chat-app-demo-20240415175826751700000003:chat-app-demo-20240415175827755900000005", - "name": "chat-app-demo-20240415175827755900000005", - "name_prefix": "chat-app-demo-", - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"ssmmessages:OpenDataChannel\",\"ssmmessages:OpenControlChannel\",\"ssmmessages:CreateDataChannel\",\"ssmmessages:CreateControlChannel\"],\"Effect\":\"Allow\",\"Resource\":\"*\",\"Sid\":\"ECSExec\"}]}", - "role": "chat-app-demo-20240415175826751700000003" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ecs_service.aws_iam_role.tasks", - "module.ecs_service.data.aws_caller_identity.current", - "module.ecs_service.data.aws_iam_policy_document.tasks", - "module.ecs_service.data.aws_iam_policy_document.tasks_assume", - "module.ecs_service.data.aws_partition.current", - "module.ecs_service.data.aws_region.current" - ] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_iam_role_policy_attachment", - "name": "task_exec", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "id": "chat-app-demo-20240415175826752300000004-20240415175827925700000006", - "policy_arn": "arn:aws:iam::355614969320:policy/chat-app-demo-20240415175826751600000002", - "role": "chat-app-demo-20240415175826752300000004" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ecs_service.aws_iam_policy.task_exec", - "module.ecs_service.aws_iam_role.task_exec", - "module.ecs_service.data.aws_iam_policy_document.task_exec", - "module.ecs_service.data.aws_iam_policy_document.task_exec_assume" - ] - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_security_group", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:security-group/sg-05ad2646d8cc5f4a3", - "description": "Managed by Terraform", - "egress": [ - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "", - "from_port": 0, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "-1", - "security_groups": [], - "self": false, - "to_port": 0 - } - ], - "id": "sg-05ad2646d8cc5f4a3", - "ingress": [ - { - "cidr_blocks": [], - "description": "Service port", - "from_port": 3000, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [ - "sg-062ee908d87078647" - ], - "self": false, - "to_port": 3000 - } - ], - "name": "chat-app-demo-2024041517583976900000000b", - "name_prefix": "chat-app-demo-", - "owner_id": "355614969320", - "revoke_rules_on_delete": false, - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", - "dependencies": [ - "data.aws_availability_zones.available", - "module.ecs_service.data.aws_subnet.this", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ], - "create_before_destroy": true - } - ] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_security_group_rule", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": "alb_ingress_3000", - "schema_version": 2, - "attributes": { - "cidr_blocks": null, - "description": "Service port", - "from_port": 3000, - "id": "sgrule-2432472228", - "ipv6_cidr_blocks": null, - "prefix_list_ids": null, - "protocol": "tcp", - "security_group_id": "sg-05ad2646d8cc5f4a3", - "security_group_rule_id": "sgr-03dd89774c14c810d", - "self": false, - "source_security_group_id": "sg-062ee908d87078647", - "timeouts": null, - "to_port": 3000, - "type": "ingress" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDB9LCJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", - "dependencies": [ - "data.aws_availability_zones.available", - "module.alb.aws_security_group.this", - "module.ecs_service.aws_security_group.this", - "module.ecs_service.data.aws_subnet.this", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": "egress_all", - "schema_version": 2, - "attributes": { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "", - "from_port": 0, - "id": "sgrule-3369719713", - "ipv6_cidr_blocks": null, - "prefix_list_ids": null, - "protocol": "-1", - "security_group_id": "sg-05ad2646d8cc5f4a3", - "security_group_rule_id": "sgr-0558fbc5f4d13fc94", - "self": false, - "source_security_group_id": null, - "timeouts": null, - "to_port": 0, - "type": "egress" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDB9LCJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", - "dependencies": [ - "data.aws_availability_zones.available", - "module.alb.aws_security_group.this", - "module.ecs_service.aws_security_group.this", - "module.ecs_service.data.aws_subnet.this", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ecs_service.module.container_definition[\"chat-app\"]", - "mode": "data", - "type": "aws_region", - "name": "current", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "description": "Europe (Ireland)", - "endpoint": "ec2.eu-west-1.amazonaws.com", - "id": "eu-west-1", - "name": "eu-west-1" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ecs_service.module.container_definition[\"chat-app\"]", - "mode": "managed", - "type": "aws_cloudwatch_log_group", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:logs:eu-west-1:355614969320:log-group:/aws/ecs/chat-app-demo/chat-app", - "id": "/aws/ecs/chat-app-demo/chat-app", - "kms_key_id": "", - "log_group_class": "STANDARD", - "name": "/aws/ecs/chat-app-demo/chat-app", - "name_prefix": "", - "retention_in_days": 14, - "skip_destroy": false, - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "create_before_destroy": true - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_default_network_acl", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:network-acl/acl-031a5e6f57caa75df", - "default_network_acl_id": "acl-031a5e6f57caa75df", - "egress": [ - { - "action": "allow", - "cidr_block": "", - "from_port": 0, - "icmp_code": 0, - "icmp_type": 0, - "ipv6_cidr_block": "::/0", - "protocol": "-1", - "rule_no": 101, - "to_port": 0 - }, - { - "action": "allow", - "cidr_block": "0.0.0.0/0", - "from_port": 0, - "icmp_code": 0, - "icmp_type": 0, - "ipv6_cidr_block": "", - "protocol": "-1", - "rule_no": 100, - "to_port": 0 - } - ], - "id": "acl-031a5e6f57caa75df", - "ingress": [ - { - "action": "allow", - "cidr_block": "", - "from_port": 0, - "icmp_code": 0, - "icmp_type": 0, - "ipv6_cidr_block": "::/0", - "protocol": "-1", - "rule_no": 101, - "to_port": 0 - }, - { - "action": "allow", - "cidr_block": "0.0.0.0/0", - "from_port": 0, - "icmp_code": 0, - "icmp_type": 0, - "ipv6_cidr_block": "", - "protocol": "-1", - "rule_no": 100, - "to_port": 0 - } - ], - "owner_id": "355614969320", - "subnet_ids": [ - "subnet-020b69a138405c937", - "subnet-03484242e7e025e98", - "subnet-08a36304b08dcd4df", - "subnet-08c4d0f2a7397c568", - "subnet-0b0690ac033109c33", - "subnet-0d743b4c62e3de6de" - ], - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.vpc.aws_vpc.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_default_route_table", - "name": "default", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:route-table/rtb-0c6af805470c20114", - "default_route_table_id": "rtb-0c6af805470c20114", - "id": "rtb-0c6af805470c20114", - "owner_id": "355614969320", - "propagating_vgws": [], - "route": [], - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": { - "create": "5m", - "update": "5m" - }, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsInVwZGF0ZSI6MzAwMDAwMDAwMDAwfX0=", - "dependencies": [ - "module.vpc.aws_vpc.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_default_security_group", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:security-group/sg-015ea6038f4f7ff71", - "description": "default VPC security group", - "egress": [], - "id": "sg-015ea6038f4f7ff71", - "ingress": [], - "name": "default", - "name_prefix": "", - "owner_id": "355614969320", - "revoke_rules_on_delete": false, - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", - "dependencies": [ - "module.vpc.aws_vpc.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_eip", - "name": "nat", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "address": null, - "allocation_id": "eipalloc-0700859ba46362518", - "associate_with_private_ip": null, - "association_id": "eipassoc-0d5484b1fb009232c", - "carrier_ip": "", - "customer_owned_ip": "", - "customer_owned_ipv4_pool": "", - "domain": "vpc", - "id": "eipalloc-0700859ba46362518", - "instance": "", - "network_border_group": "eu-west-1", - "network_interface": "eni-088e951a4444f5c79", - "private_dns": "ip-10-0-48-112.eu-west-1.compute.internal", - "private_ip": "10.0.48.112", - "public_dns": "ec2-52-212-180-110.eu-west-1.compute.amazonaws.com", - "public_ip": "52.212.180.110", - "public_ipv4_pool": "amazon", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc": true - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxODAwMDAwMDAwMDAsInJlYWQiOjkwMDAwMDAwMDAwMCwidXBkYXRlIjozMDAwMDAwMDAwMDB9fQ==", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_internet_gateway.this", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_internet_gateway", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:internet-gateway/igw-0c25b6348ee8d15d3", - "id": "igw-0c25b6348ee8d15d3", - "owner_id": "355614969320", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_nat_gateway", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "allocation_id": "eipalloc-0700859ba46362518", - "association_id": "eipassoc-0d5484b1fb009232c", - "connectivity_type": "public", - "id": "nat-0c9c27876496073dd", - "network_interface_id": "eni-088e951a4444f5c79", - "private_ip": "10.0.48.112", - "public_ip": "52.212.180.110", - "secondary_allocation_ids": [], - "secondary_private_ip_address_count": 0, - "secondary_private_ip_addresses": [], - "subnet_id": "subnet-08c4d0f2a7397c568", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTgwMDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMDB9fQ==", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_eip.nat", - "module.vpc.aws_internet_gateway.this", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_route", - "name": "private_nat_gateway", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "carrier_gateway_id": "", - "core_network_arn": "", - "destination_cidr_block": "0.0.0.0/0", - "destination_ipv6_cidr_block": "", - "destination_prefix_list_id": "", - "egress_only_gateway_id": "", - "gateway_id": "", - "id": "r-rtb-096758eeb295c77291080289494", - "instance_id": "", - "instance_owner_id": "", - "local_gateway_id": "", - "nat_gateway_id": "nat-0c9c27876496073dd", - "network_interface_id": "", - "origin": "CreateRoute", - "route_table_id": "rtb-096758eeb295c7729", - "state": "active", - "timeouts": { - "create": "5m", - "delete": null, - "update": null - }, - "transit_gateway_id": "", - "vpc_endpoint_id": "", - "vpc_peering_connection_id": "" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_eip.nat", - "module.vpc.aws_internet_gateway.this", - "module.vpc.aws_nat_gateway.this", - "module.vpc.aws_route_table.private", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_route", - "name": "public_internet_gateway", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "carrier_gateway_id": "", - "core_network_arn": "", - "destination_cidr_block": "0.0.0.0/0", - "destination_ipv6_cidr_block": "", - "destination_prefix_list_id": "", - "egress_only_gateway_id": "", - "gateway_id": "igw-0c25b6348ee8d15d3", - "id": "r-rtb-088d8f5a34faa90f21080289494", - "instance_id": "", - "instance_owner_id": "", - "local_gateway_id": "", - "nat_gateway_id": "", - "network_interface_id": "", - "origin": "CreateRoute", - "route_table_id": "rtb-088d8f5a34faa90f2", - "state": "active", - "timeouts": { - "create": "5m", - "delete": null, - "update": null - }, - "transit_gateway_id": "", - "vpc_endpoint_id": "", - "vpc_peering_connection_id": "" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_internet_gateway.this", - "module.vpc.aws_route_table.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_route_table", - "name": "private", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:route-table/rtb-096758eeb295c7729", - "id": "rtb-096758eeb295c7729", - "owner_id": "355614969320", - "propagating_vgws": [], - "route": [ - { - "carrier_gateway_id": "", - "cidr_block": "0.0.0.0/0", - "core_network_arn": "", - "destination_prefix_list_id": "", - "egress_only_gateway_id": "", - "gateway_id": "", - "ipv6_cidr_block": "", - "local_gateway_id": "", - "nat_gateway_id": "nat-0c9c27876496073dd", - "network_interface_id": "", - "transit_gateway_id": "", - "vpc_endpoint_id": "", - "vpc_peering_connection_id": "" - } - ], - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_route_table", - "name": "public", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:route-table/rtb-088d8f5a34faa90f2", - "id": "rtb-088d8f5a34faa90f2", - "owner_id": "355614969320", - "propagating_vgws": [], - "route": [ - { - "carrier_gateway_id": "", - "cidr_block": "0.0.0.0/0", - "core_network_arn": "", - "destination_prefix_list_id": "", - "egress_only_gateway_id": "", - "gateway_id": "igw-0c25b6348ee8d15d3", - "ipv6_cidr_block": "", - "local_gateway_id": "", - "nat_gateway_id": "", - "network_interface_id": "", - "transit_gateway_id": "", - "vpc_endpoint_id": "", - "vpc_peering_connection_id": "" - } - ], - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_route_table_association", - "name": "private", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-063f976189b95e1f7", - "route_table_id": "rtb-096758eeb295c7729", - "subnet_id": "subnet-0d743b4c62e3de6de", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.private", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-07ef47be5f28a0355", - "route_table_id": "rtb-096758eeb295c7729", - "subnet_id": "subnet-08a36304b08dcd4df", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.private", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-04779d9d6d3b3f1bb", - "route_table_id": "rtb-096758eeb295c7729", - "subnet_id": "subnet-03484242e7e025e98", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.private", - "module.vpc.aws_subnet.private", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_route_table_association", - "name": "public", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-0975294f8cf600a9f", - "route_table_id": "rtb-088d8f5a34faa90f2", - "subnet_id": "subnet-08c4d0f2a7397c568", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.public", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-0872428bcf4df75a6", - "route_table_id": "rtb-088d8f5a34faa90f2", - "subnet_id": "subnet-020b69a138405c937", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.public", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-087a8d2cc04d7ee02", - "route_table_id": "rtb-088d8f5a34faa90f2", - "subnet_id": "subnet-0b0690ac033109c33", - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_route_table.public", - "module.vpc.aws_subnet.public", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_subnet", - "name": "private", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-0d743b4c62e3de6de", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1a", - "availability_zone_id": "euw1-az1", - "cidr_block": "10.0.0.0/20", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-0d743b4c62e3de6de", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ], - "create_before_destroy": true - }, - { - "index_key": 1, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-08a36304b08dcd4df", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1b", - "availability_zone_id": "euw1-az2", - "cidr_block": "10.0.16.0/20", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-08a36304b08dcd4df", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ], - "create_before_destroy": true - }, - { - "index_key": 2, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-03484242e7e025e98", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1c", - "availability_zone_id": "euw1-az3", - "cidr_block": "10.0.32.0/20", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-03484242e7e025e98", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ], - "create_before_destroy": true - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_subnet", - "name": "public", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-08c4d0f2a7397c568", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1a", - "availability_zone_id": "euw1-az1", - "cidr_block": "10.0.48.0/24", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-08c4d0f2a7397c568", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-020b69a138405c937", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1b", - "availability_zone_id": "euw1-az2", - "cidr_block": "10.0.49.0/24", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-020b69a138405c937", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-0b0690ac033109c33", - "assign_ipv6_address_on_creation": false, - "availability_zone": "eu-west-1c", - "availability_zone_id": "euw1-az3", - "cidr_block": "10.0.50.0/24", - "customer_owned_ipv4_pool": "", - "enable_dns64": false, - "enable_lni_at_device_index": 0, - "enable_resource_name_dns_a_record_on_launch": false, - "enable_resource_name_dns_aaaa_record_on_launch": false, - "id": "subnet-0b0690ac033109c33", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "ipv6_native": false, - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "355614969320", - "private_dns_hostname_type_on_launch": "ip-name", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "timeouts": null, - "vpc_id": "vpc-036c1349ddd4a46ce" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "data.aws_availability_zones.available", - "module.vpc.aws_vpc.this", - "module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_vpc", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:eu-west-1:355614969320:vpc/vpc-036c1349ddd4a46ce", - "assign_generated_ipv6_cidr_block": false, - "cidr_block": "10.0.0.0/16", - "default_network_acl_id": "acl-031a5e6f57caa75df", - "default_route_table_id": "rtb-0c6af805470c20114", - "default_security_group_id": "sg-015ea6038f4f7ff71", - "dhcp_options_id": "dopt-a93124cb", - "enable_dns_hostnames": true, - "enable_dns_support": true, - "enable_network_address_usage_metrics": false, - "id": "vpc-036c1349ddd4a46ce", - "instance_tenancy": "default", - "ipv4_ipam_pool_id": null, - "ipv4_netmask_length": null, - "ipv6_association_id": "", - "ipv6_cidr_block": "", - "ipv6_cidr_block_network_border_group": "", - "ipv6_ipam_pool_id": "", - "ipv6_netmask_length": 0, - "main_route_table_id": "rtb-0c6af805470c20114", - "owner_id": "355614969320", - "tags": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - }, - "tags_all": { - "Example": "chat-app-demo", - "Name": "chat-app-demo", - "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" - } - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", - "create_before_destroy": true - } - ] - } - ], - "check_results": null -} diff --git a/2-simple-example/iac/.terraform.lock.hcl b/demo/iac/.terraform.lock.hcl similarity index 100% rename from 2-simple-example/iac/.terraform.lock.hcl rename to demo/iac/.terraform.lock.hcl diff --git a/demo/iac/.terraform.tfstate.lock.info b/demo/iac/.terraform.tfstate.lock.info new file mode 100644 index 0000000..53cb3f8 --- /dev/null +++ b/demo/iac/.terraform.tfstate.lock.info @@ -0,0 +1 @@ +{"ID":"1156b298-a473-5fa6-a198-84eabc580877","Operation":"OperationTypeApply","Info":"","Who":"ric@batfink","Version":"1.6.2","Created":"2024-04-15T20:40:09.835286786Z","Path":"terraform.tfstate"} \ No newline at end of file diff --git a/2-simple-example/iac/data.tf b/demo/iac/data.tf similarity index 100% rename from 2-simple-example/iac/data.tf rename to demo/iac/data.tf diff --git a/2-simple-example/iac/ecs.tf b/demo/iac/ecs.tf similarity index 99% rename from 2-simple-example/iac/ecs.tf rename to demo/iac/ecs.tf index a58c71a..7f69bd0 100644 --- a/2-simple-example/iac/ecs.tf +++ b/demo/iac/ecs.tf @@ -34,7 +34,7 @@ module "ecs_service" { name = local.name cluster_arn = module.ecs_cluster.arn - desired_count = 3 + desired_count = 1 cpu = 1024 memory = 4096 diff --git a/2-simple-example/iac/locals.tf b/demo/iac/locals.tf similarity index 100% rename from 2-simple-example/iac/locals.tf rename to demo/iac/locals.tf diff --git a/2-simple-example/iac/main.tf b/demo/iac/main.tf similarity index 100% rename from 2-simple-example/iac/main.tf rename to demo/iac/main.tf diff --git a/2-simple-example/iac/modules/cluster/README.md b/demo/iac/modules/cluster/README.md similarity index 100% rename from 2-simple-example/iac/modules/cluster/README.md rename to demo/iac/modules/cluster/README.md diff --git a/2-simple-example/iac/modules/cluster/main.tf b/demo/iac/modules/cluster/main.tf similarity index 100% rename from 2-simple-example/iac/modules/cluster/main.tf rename to demo/iac/modules/cluster/main.tf diff --git a/2-simple-example/iac/modules/cluster/outputs.tf b/demo/iac/modules/cluster/outputs.tf similarity index 100% rename from 2-simple-example/iac/modules/cluster/outputs.tf rename to demo/iac/modules/cluster/outputs.tf diff --git a/2-simple-example/iac/modules/cluster/variables.tf b/demo/iac/modules/cluster/variables.tf similarity index 100% rename from 2-simple-example/iac/modules/cluster/variables.tf rename to demo/iac/modules/cluster/variables.tf diff --git a/2-simple-example/iac/modules/cluster/versions.tf b/demo/iac/modules/cluster/versions.tf similarity index 100% rename from 2-simple-example/iac/modules/cluster/versions.tf rename to demo/iac/modules/cluster/versions.tf diff --git a/2-simple-example/iac/modules/container-definition/README.md b/demo/iac/modules/container-definition/README.md similarity index 100% rename from 2-simple-example/iac/modules/container-definition/README.md rename to demo/iac/modules/container-definition/README.md diff --git a/2-simple-example/iac/modules/container-definition/main.tf b/demo/iac/modules/container-definition/main.tf similarity index 100% rename from 2-simple-example/iac/modules/container-definition/main.tf rename to demo/iac/modules/container-definition/main.tf diff --git a/2-simple-example/iac/modules/container-definition/outputs.tf b/demo/iac/modules/container-definition/outputs.tf similarity index 100% rename from 2-simple-example/iac/modules/container-definition/outputs.tf rename to demo/iac/modules/container-definition/outputs.tf diff --git a/2-simple-example/iac/modules/container-definition/variables.tf b/demo/iac/modules/container-definition/variables.tf similarity index 100% rename from 2-simple-example/iac/modules/container-definition/variables.tf rename to demo/iac/modules/container-definition/variables.tf diff --git a/2-simple-example/iac/modules/container-definition/versions.tf b/demo/iac/modules/container-definition/versions.tf similarity index 100% rename from 2-simple-example/iac/modules/container-definition/versions.tf rename to demo/iac/modules/container-definition/versions.tf diff --git a/2-simple-example/iac/modules/service/README.md b/demo/iac/modules/service/README.md similarity index 100% rename from 2-simple-example/iac/modules/service/README.md rename to demo/iac/modules/service/README.md diff --git a/2-simple-example/iac/modules/service/main.tf b/demo/iac/modules/service/main.tf similarity index 100% rename from 2-simple-example/iac/modules/service/main.tf rename to demo/iac/modules/service/main.tf diff --git a/2-simple-example/iac/modules/service/outputs.tf b/demo/iac/modules/service/outputs.tf similarity index 100% rename from 2-simple-example/iac/modules/service/outputs.tf rename to demo/iac/modules/service/outputs.tf diff --git a/2-simple-example/iac/modules/service/variables.tf b/demo/iac/modules/service/variables.tf similarity index 100% rename from 2-simple-example/iac/modules/service/variables.tf rename to demo/iac/modules/service/variables.tf diff --git a/2-simple-example/iac/modules/service/versions.tf b/demo/iac/modules/service/versions.tf similarity index 100% rename from 2-simple-example/iac/modules/service/versions.tf rename to demo/iac/modules/service/versions.tf diff --git a/2-simple-example/iac/outputs.tf b/demo/iac/outputs.tf similarity index 100% rename from 2-simple-example/iac/outputs.tf rename to demo/iac/outputs.tf diff --git a/2-simple-example/iac/route53.tf b/demo/iac/route53.tf similarity index 100% rename from 2-simple-example/iac/route53.tf rename to demo/iac/route53.tf diff --git a/demo/iac/terraform.tfstate b/demo/iac/terraform.tfstate new file mode 100644 index 0000000..2bff77c --- /dev/null +++ b/demo/iac/terraform.tfstate @@ -0,0 +1,1573 @@ +{ + "version": 4, + "terraform_version": "1.6.2", + "serial": 274, + "lineage": "eee76b09-c66c-0cf5-be4a-cdd9e6b807e9", + "outputs": {}, + "resources": [ + { + "mode": "data", + "type": "aws_availability_zones", + "name": "available", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "all_availability_zones": null, + "exclude_names": null, + "exclude_zone_ids": null, + "filter": null, + "group_names": [ + "eu-west-1" + ], + "id": "eu-west-1", + "names": [ + "eu-west-1a", + "eu-west-1b", + "eu-west-1c" + ], + "state": null, + "timeouts": null, + "zone_ids": [ + "euw1-az1", + "euw1-az2", + "euw1-az3" + ] + }, + "sensitive_attributes": [] + } + ] + }, + { + "mode": "managed", + "type": "aws_ecs_service", + "name": "service", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "alarms": [], + "capacity_provider_strategy": [], + "cluster": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", + "deployment_circuit_breaker": [ + { + "enable": false, + "rollback": false + } + ], + "deployment_controller": [ + { + "type": "ECS" + } + ], + "deployment_maximum_percent": 200, + "deployment_minimum_healthy_percent": 100, + "desired_count": 1, + "enable_ecs_managed_tags": false, + "enable_execute_command": false, + "force_new_deployment": null, + "health_check_grace_period_seconds": 0, + "iam_role": "/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS", + "id": "arn:aws:ecs:eu-west-1:355614969320:service/chat-app-demo/valkey", + "launch_type": "FARGATE", + "load_balancer": [], + "name": "valkey", + "network_configuration": [ + { + "assign_public_ip": false, + "security_groups": [ + "sg-0e041494928dc0a6b" + ], + "subnets": [ + "subnet-03484242e7e025e98", + "subnet-08a36304b08dcd4df", + "subnet-0d743b4c62e3de6de" + ] + } + ], + "ordered_placement_strategy": [], + "placement_constraints": [], + "platform_version": "LATEST", + "propagate_tags": "NONE", + "scheduling_strategy": "REPLICA", + "service_connect_configuration": [ + { + "enabled": true, + "log_configuration": [], + "namespace": "chat-app-demo", + "service": [ + { + "client_alias": [ + { + "dns_name": "valkey", + "port": 6379 + } + ], + "discovery_name": "valkey", + "ingress_port_override": 0, + "port_name": "valkey", + "timeout": [], + "tls": [] + } + ] + } + ], + "service_registries": [], + "tags": {}, + "tags_all": {}, + "task_definition": "service:3", + "timeouts": null, + "triggers": {}, + "wait_for_steady_state": false + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19", + "dependencies": [ + "aws_ecs_task_definition.task", + "aws_security_group.sg", + "data.aws_availability_zones.available", + "module.ecs_cluster.aws_cloudwatch_log_group.this", + "module.ecs_cluster.aws_ecs_cluster.this", + "module.vpc.aws_subnet.private", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_ecs_task_definition", + "name": "task", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ecs:eu-west-1:355614969320:task-definition/service:4", + "arn_without_revision": "arn:aws:ecs:eu-west-1:355614969320:task-definition/service", + "container_definitions": "[{\"cpu\":512,\"environment\":[],\"essential\":true,\"image\":\"valkey/valkey:7.2.4-rc1-alpine\",\"memory\":1024,\"mountPoints\":[],\"name\":\"valkey\",\"portMappings\":[{\"containerPort\":6379,\"hostPort\":6379,\"name\":\"valkey\",\"protocol\":\"tcp\"}],\"systemControls\":[],\"volumesFrom\":[]}]", + "cpu": "512", + "ephemeral_storage": [], + "execution_role_arn": "", + "family": "service", + "id": "service", + "inference_accelerator": [], + "ipc_mode": "", + "memory": "1024", + "network_mode": "awsvpc", + "pid_mode": "", + "placement_constraints": [], + "proxy_configuration": [], + "requires_compatibilities": [ + "EC2", + "FARGATE" + ], + "revision": 4, + "runtime_platform": [], + "skip_destroy": false, + "tags": {}, + "tags_all": {}, + "task_role_arn": "", + "track_latest": false, + "volume": [] + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" + } + ] + }, + { + "mode": "managed", + "type": "aws_security_group", + "name": "sg", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:355614969320:security-group/sg-0e041494928dc0a6b", + "description": "Managed by Terraform", + "egress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 0, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "-1", + "security_groups": [], + "self": false, + "to_port": 0 + } + ], + "id": "sg-0e041494928dc0a6b", + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "Port 80", + "from_port": 6379, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 6379 + }, + { + "cidr_blocks": [], + "description": "", + "from_port": 0, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "-1", + "security_groups": [], + "self": true, + "to_port": 0 + } + ], + "name": "ecs", + "name_prefix": "", + "owner_id": "355614969320", + "revoke_rules_on_delete": false, + "tags": {}, + "tags_all": {}, + "timeouts": null, + "vpc_id": "vpc-036c1349ddd4a46ce" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", + "dependencies": [ + "module.vpc.aws_vpc.this" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_service_discovery_http_namespace", + "name": "this", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:servicediscovery:eu-west-1:355614969320:namespace/ns-7exezy2cesetek5e", + "description": "CloudMap namespace for chat-app-demo", + "http_name": "chat-app-demo", + "id": "ns-7exezy2cesetek5e", + "name": "chat-app-demo", + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + } + }, + "sensitive_attributes": [], + "private": "bnVsbA==" + } + ] + }, + { + "module": "module.alb", + "mode": "managed", + "type": "aws_lb_target_group", + "name": "this", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": "ex_ecs", + "schema_version": 0, + "attributes": { + "arn": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:targetgroup/tf-20240415175838841400000009/035dee14007ac0e1", + "arn_suffix": "targetgroup/tf-20240415175838841400000009/035dee14007ac0e1", + "connection_termination": null, + "deregistration_delay": "5", + "health_check": [ + { + "enabled": true, + "healthy_threshold": 5, + "interval": 30, + "matcher": "200", + "path": "/", + "port": "traffic-port", + "protocol": "HTTP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], + "id": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:targetgroup/tf-20240415175838841400000009/035dee14007ac0e1", + "ip_address_type": "ipv4", + "lambda_multi_value_headers_enabled": false, + "load_balancer_arns": [ + "arn:aws:elasticloadbalancing:eu-west-1:355614969320:loadbalancer/app/chat-app-demo/9cf8ea90daa21fc1" + ], + "load_balancing_algorithm_type": "round_robin", + "load_balancing_anomaly_mitigation": "off", + "load_balancing_cross_zone_enabled": "true", + "name": "tf-20240415175838841400000009", + "name_prefix": "tf-", + "port": 80, + "preserve_client_ip": null, + "protocol": "HTTP", + "protocol_version": "HTTP1", + "proxy_protocol_v2": false, + "slow_start": 0, + "stickiness": [ + { + "cookie_duration": 86400, + "cookie_name": "", + "enabled": false, + "type": "lb_cookie" + } + ], + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", + "terraform-aws-modules": "alb" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", + "terraform-aws-modules": "alb" + }, + "target_failover": [ + { + "on_deregistration": null, + "on_unhealthy": null + } + ], + "target_health_state": [ + { + "enable_unhealthy_connection_termination": null + } + ], + "target_type": "ip", + "vpc_id": "vpc-036c1349ddd4a46ce" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.alb", + "mode": "managed", + "type": "aws_security_group", + "name": "this", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:355614969320:security-group/sg-062ee908d87078647", + "description": "Security group for chat-app-demo application load balancer", + "egress": [ + { + "cidr_blocks": [ + "10.0.0.0/16" + ], + "description": "", + "from_port": 0, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "-1", + "security_groups": [], + "self": false, + "to_port": 0 + } + ], + "id": "sg-062ee908d87078647", + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 80, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 80 + } + ], + "name": "chat-app-demo-2024041517583920720000000a", + "name_prefix": "chat-app-demo-", + "owner_id": "355614969320", + "revoke_rules_on_delete": false, + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", + "terraform-aws-modules": "alb" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", + "terraform-aws-modules": "alb" + }, + "timeouts": null, + "vpc_id": "vpc-036c1349ddd4a46ce" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", + "dependencies": [ + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.ecs_cluster", + "mode": "managed", + "type": "aws_cloudwatch_log_group", + "name": "this", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:logs:eu-west-1:355614969320:log-group:/aws/ecs/chat-app-demo", + "id": "/aws/ecs/chat-app-demo", + "kms_key_id": "", + "log_group_class": "STANDARD", + "name": "/aws/ecs/chat-app-demo", + "name_prefix": "", + "retention_in_days": 90, + "skip_destroy": false, + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + } + }, + "sensitive_attributes": [], + "private": "bnVsbA==" + } + ] + }, + { + "module": "module.ecs_cluster", + "mode": "managed", + "type": "aws_ecs_cluster", + "name": "this", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", + "configuration": [ + { + "execute_command_configuration": [ + { + "kms_key_id": "", + "log_configuration": [], + "logging": "DEFAULT" + } + ] + } + ], + "id": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", + "name": "chat-app-demo", + "service_connect_defaults": [], + "setting": [ + { + "name": "containerInsights", + "value": "enabled" + } + ], + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + } + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.ecs_cluster.aws_cloudwatch_log_group.this" + ] + } + ] + }, + { + "module": "module.ecs_service", + "mode": "data", + "type": "aws_caller_identity", + "name": "current", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "account_id": "355614969320", + "arn": "arn:aws:iam::355614969320:user/rharvey", + "id": "355614969320", + "user_id": "AIDAIICBK3Q64EOQBD5HM" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.ecs_service", + "mode": "data", + "type": "aws_ecs_task_definition", + "name": "this", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo:11", + "arn_without_revision": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo", + "execution_role_arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826752300000004", + "family": "chat-app-demo", + "id": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo:11", + "network_mode": "awsvpc", + "revision": 11, + "status": "ACTIVE", + "task_definition": "chat-app-demo", + "task_role_arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826751700000003" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.ecs_service", + "mode": "data", + "type": "aws_iam_policy_document", + "name": "task_exec_assume", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "id": "2291109037", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"ECSTaskExecutionAssumeRole\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ecs-tasks.amazonaws.com\"\n }\n }\n ]\n}", + "override_json": null, + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": [ + { + "actions": [ + "sts:AssumeRole" + ], + "condition": [], + "effect": "Allow", + "not_actions": [], + "not_principals": [], + "not_resources": [], + "principals": [ + { + "identifiers": [ + "ecs-tasks.amazonaws.com" + ], + "type": "Service" + } + ], + "resources": [], + "sid": "ECSTaskExecutionAssumeRole" + } + ], + "version": "2012-10-17" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.ecs_service", + "mode": "data", + "type": "aws_iam_policy_document", + "name": "tasks_assume", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "id": "780565365", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"ECSTasksAssumeRole\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ecs-tasks.amazonaws.com\"\n },\n \"Condition\": {\n \"ArnLike\": {\n \"aws:SourceArn\": \"arn:aws:ecs:eu-west-1:355614969320:*\"\n },\n \"StringEquals\": {\n \"aws:SourceAccount\": \"355614969320\"\n }\n }\n }\n ]\n}", + "override_json": null, + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": [ + { + "actions": [ + "sts:AssumeRole" + ], + "condition": [ + { + "test": "ArnLike", + "values": [ + "arn:aws:ecs:eu-west-1:355614969320:*" + ], + "variable": "aws:SourceArn" + }, + { + "test": "StringEquals", + "values": [ + "355614969320" + ], + "variable": "aws:SourceAccount" + } + ], + "effect": "Allow", + "not_actions": [], + "not_principals": [], + "not_resources": [], + "principals": [ + { + "identifiers": [ + "ecs-tasks.amazonaws.com" + ], + "type": "Service" + } + ], + "resources": [], + "sid": "ECSTasksAssumeRole" + } + ], + "version": "2012-10-17" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.ecs_service", + "mode": "data", + "type": "aws_partition", + "name": "current", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "dns_suffix": "amazonaws.com", + "id": "aws", + "partition": "aws", + "reverse_dns_prefix": "com.amazonaws" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.ecs_service", + "mode": "data", + "type": "aws_region", + "name": "current", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "description": "Europe (Ireland)", + "endpoint": "ec2.eu-west-1.amazonaws.com", + "id": "eu-west-1", + "name": "eu-west-1" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.ecs_service", + "mode": "data", + "type": "aws_subnet", + "name": "this", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-0d743b4c62e3de6de", + "assign_ipv6_address_on_creation": false, + "availability_zone": "eu-west-1a", + "availability_zone_id": "euw1-az1", + "available_ip_address_count": 4091, + "cidr_block": "10.0.0.0/20", + "customer_owned_ipv4_pool": "", + "default_for_az": false, + "enable_dns64": false, + "enable_lni_at_device_index": 0, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "filter": null, + "id": "subnet-0d743b4c62e3de6de", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": false, + "outpost_arn": "", + "owner_id": "355614969320", + "private_dns_hostname_type_on_launch": "ip-name", + "state": "available", + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "timeouts": null, + "vpc_id": "vpc-036c1349ddd4a46ce" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.ecs_service", + "mode": "managed", + "type": "aws_ecs_service", + "name": "this", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "alarms": [], + "capacity_provider_strategy": [], + "cluster": "arn:aws:ecs:eu-west-1:355614969320:cluster/chat-app-demo", + "deployment_circuit_breaker": [ + { + "enable": false, + "rollback": false + } + ], + "deployment_controller": [ + { + "type": "ECS" + } + ], + "deployment_maximum_percent": 200, + "deployment_minimum_healthy_percent": 66, + "desired_count": 1, + "enable_ecs_managed_tags": true, + "enable_execute_command": true, + "force_new_deployment": true, + "health_check_grace_period_seconds": 0, + "iam_role": "/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS", + "id": "arn:aws:ecs:eu-west-1:355614969320:service/chat-app-demo/chat-app-demo", + "launch_type": "FARGATE", + "load_balancer": [ + { + "container_name": "chat-app", + "container_port": 3000, + "elb_name": "", + "target_group_arn": "arn:aws:elasticloadbalancing:eu-west-1:355614969320:targetgroup/tf-20240415175838841400000009/035dee14007ac0e1" + } + ], + "name": "chat-app-demo", + "network_configuration": [ + { + "assign_public_ip": false, + "security_groups": [ + "sg-05ad2646d8cc5f4a3" + ], + "subnets": [ + "subnet-03484242e7e025e98", + "subnet-08a36304b08dcd4df", + "subnet-0d743b4c62e3de6de" + ] + } + ], + "ordered_placement_strategy": [], + "placement_constraints": [], + "platform_version": "LATEST", + "propagate_tags": "NONE", + "scheduling_strategy": "REPLICA", + "service_connect_configuration": [ + { + "enabled": true, + "log_configuration": [], + "namespace": "arn:aws:servicediscovery:eu-west-1:355614969320:namespace/ns-7exezy2cesetek5e", + "service": [ + { + "client_alias": [ + { + "dns_name": "chat-app", + "port": 3000 + } + ], + "discovery_name": "chat-app", + "ingress_port_override": 0, + "port_name": "chat-app", + "timeout": [], + "tls": [] + } + ] + } + ], + "service_registries": [], + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", + "ServiceTag": "Tag on service level" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs", + "ServiceTag": "Tag on service level" + }, + "task_definition": "chat-app-demo:11", + "timeouts": { + "create": null, + "delete": null, + "update": null + }, + "triggers": {}, + "wait_for_steady_state": false + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19", + "dependencies": [ + "aws_service_discovery_http_namespace.this", + "data.aws_availability_zones.available", + "module.alb.aws_lb_target_group.this", + "module.ecs_cluster.aws_cloudwatch_log_group.this", + "module.ecs_cluster.aws_ecs_cluster.this", + "module.ecs_service.aws_ecs_task_definition.this", + "module.ecs_service.aws_iam_policy.service", + "module.ecs_service.aws_iam_role.service", + "module.ecs_service.aws_iam_role.task_exec", + "module.ecs_service.aws_iam_role.tasks", + "module.ecs_service.aws_iam_role_policy_attachment.service", + "module.ecs_service.aws_security_group.this", + "module.ecs_service.data.aws_caller_identity.current", + "module.ecs_service.data.aws_ecs_task_definition.this", + "module.ecs_service.data.aws_iam_policy_document.service", + "module.ecs_service.data.aws_iam_policy_document.service_assume", + "module.ecs_service.data.aws_iam_policy_document.task_exec_assume", + "module.ecs_service.data.aws_iam_policy_document.tasks_assume", + "module.ecs_service.data.aws_partition.current", + "module.ecs_service.data.aws_region.current", + "module.ecs_service.data.aws_subnet.this", + "module.ecs_service.module.container_definition.aws_cloudwatch_log_group.this", + "module.ecs_service.module.container_definition.data.aws_region.current", + "module.vpc.aws_subnet.private", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.ecs_service", + "mode": "managed", + "type": "aws_ecs_task_definition", + "name": "this", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo:11", + "arn_without_revision": "arn:aws:ecs:eu-west-1:355614969320:task-definition/chat-app-demo", + "container_definitions": "[{\"cpu\":512,\"environment\":[{\"name\":\"REDIS_ENDPOINT\",\"value\":\"valkey\"}],\"essential\":true,\"image\":\"richarvey/chat-app:latest\",\"interactive\":false,\"linuxParameters\":{\"initProcessEnabled\":true},\"logConfiguration\":{\"logDriver\":\"awslogs\",\"options\":{\"awslogs-group\":\"/aws/ecs/chat-app-demo/chat-app\",\"awslogs-region\":\"eu-west-1\",\"awslogs-stream-prefix\":\"ecs\"}},\"memory\":1024,\"memoryReservation\":100,\"mountPoints\":[],\"name\":\"chat-app\",\"portMappings\":[{\"containerPort\":3000,\"hostPort\":3000,\"name\":\"chat-app\",\"protocol\":\"tcp\"}],\"privileged\":false,\"pseudoTerminal\":false,\"readonlyRootFilesystem\":true,\"startTimeout\":30,\"stopTimeout\":120,\"systemControls\":[],\"user\":\"0\",\"volumesFrom\":[]}]", + "cpu": "1024", + "ephemeral_storage": [], + "execution_role_arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826752300000004", + "family": "chat-app-demo", + "id": "chat-app-demo", + "inference_accelerator": [], + "ipc_mode": "", + "memory": "4096", + "network_mode": "awsvpc", + "pid_mode": "", + "placement_constraints": [], + "proxy_configuration": [], + "requires_compatibilities": [ + "FARGATE" + ], + "revision": 11, + "runtime_platform": [ + { + "cpu_architecture": "X86_64", + "operating_system_family": "LINUX" + } + ], + "skip_destroy": false, + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "task_role_arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826751700000003", + "track_latest": false, + "volume": [] + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", + "dependencies": [ + "module.ecs_service.aws_iam_role.task_exec", + "module.ecs_service.aws_iam_role.tasks", + "module.ecs_service.data.aws_caller_identity.current", + "module.ecs_service.data.aws_iam_policy_document.task_exec_assume", + "module.ecs_service.data.aws_iam_policy_document.tasks_assume", + "module.ecs_service.data.aws_partition.current", + "module.ecs_service.data.aws_region.current", + "module.ecs_service.module.container_definition.aws_cloudwatch_log_group.this", + "module.ecs_service.module.container_definition.data.aws_region.current" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.ecs_service", + "mode": "managed", + "type": "aws_iam_role", + "name": "task_exec", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826752300000004", + "assume_role_policy": "{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"ecs-tasks.amazonaws.com\"},\"Sid\":\"ECSTaskExecutionAssumeRole\"}],\"Version\":\"2012-10-17\"}", + "create_date": "2024-04-15T17:58:27Z", + "description": "Task execution role for chat-app-demo", + "force_detach_policies": true, + "id": "chat-app-demo-20240415175826752300000004", + "inline_policy": [], + "managed_policy_arns": [ + "arn:aws:iam::355614969320:policy/chat-app-demo-20240415175826751600000002" + ], + "max_session_duration": 3600, + "name": "chat-app-demo-20240415175826752300000004", + "name_prefix": "chat-app-demo-", + "path": "/", + "permissions_boundary": "", + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "unique_id": "AROAVFTCNZXUE6COZ2VQP" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.ecs_service.data.aws_iam_policy_document.task_exec_assume" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.ecs_service", + "mode": "managed", + "type": "aws_iam_role", + "name": "tasks", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:iam::355614969320:role/chat-app-demo-20240415175826751700000003", + "assume_role_policy": "{\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Condition\":{\"ArnLike\":{\"aws:SourceArn\":\"arn:aws:ecs:eu-west-1:355614969320:*\"},\"StringEquals\":{\"aws:SourceAccount\":\"355614969320\"}},\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"ecs-tasks.amazonaws.com\"},\"Sid\":\"ECSTasksAssumeRole\"}],\"Version\":\"2012-10-17\"}", + "create_date": "2024-04-15T17:58:27Z", + "description": "", + "force_detach_policies": true, + "id": "chat-app-demo-20240415175826751700000003", + "inline_policy": [ + { + "name": "chat-app-demo-20240415175827755900000005", + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"ssmmessages:OpenDataChannel\",\"ssmmessages:OpenControlChannel\",\"ssmmessages:CreateDataChannel\",\"ssmmessages:CreateControlChannel\"],\"Effect\":\"Allow\",\"Resource\":\"*\",\"Sid\":\"ECSExec\"}]}" + } + ], + "managed_policy_arns": [], + "max_session_duration": 3600, + "name": "chat-app-demo-20240415175826751700000003", + "name_prefix": "chat-app-demo-", + "path": "/", + "permissions_boundary": "", + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "unique_id": "AROAVFTCNZXUKB5TCDIJT" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.ecs_service.data.aws_caller_identity.current", + "module.ecs_service.data.aws_iam_policy_document.tasks_assume", + "module.ecs_service.data.aws_partition.current", + "module.ecs_service.data.aws_region.current" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.ecs_service", + "mode": "managed", + "type": "aws_security_group", + "name": "this", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:355614969320:security-group/sg-05ad2646d8cc5f4a3", + "description": "Managed by Terraform", + "egress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 0, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "-1", + "security_groups": [], + "self": false, + "to_port": 0 + } + ], + "id": "sg-05ad2646d8cc5f4a3", + "ingress": [ + { + "cidr_blocks": [], + "description": "Service port", + "from_port": 3000, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [ + "sg-062ee908d87078647" + ], + "self": false, + "to_port": 3000 + } + ], + "name": "chat-app-demo-2024041517583976900000000b", + "name_prefix": "chat-app-demo-", + "owner_id": "355614969320", + "revoke_rules_on_delete": false, + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "timeouts": null, + "vpc_id": "vpc-036c1349ddd4a46ce" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", + "dependencies": [ + "data.aws_availability_zones.available", + "module.ecs_service.data.aws_subnet.this", + "module.vpc.aws_subnet.private", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.ecs_service.module.container_definition[\"chat-app\"]", + "mode": "data", + "type": "aws_region", + "name": "current", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "description": "Europe (Ireland)", + "endpoint": "ec2.eu-west-1.amazonaws.com", + "id": "eu-west-1", + "name": "eu-west-1" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.ecs_service.module.container_definition[\"chat-app\"]", + "mode": "managed", + "type": "aws_cloudwatch_log_group", + "name": "this", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:logs:eu-west-1:355614969320:log-group:/aws/ecs/chat-app-demo/chat-app", + "id": "/aws/ecs/chat-app-demo/chat-app", + "kms_key_id": "", + "log_group_class": "STANDARD", + "name": "/aws/ecs/chat-app-demo/chat-app", + "name_prefix": "", + "retention_in_days": 14, + "skip_destroy": false, + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + } + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "create_before_destroy": true + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_internet_gateway", + "name": "this", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:355614969320:internet-gateway/igw-0c25b6348ee8d15d3", + "id": "igw-0c25b6348ee8d15d3", + "owner_id": "355614969320", + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "timeouts": null, + "vpc_id": "vpc-036c1349ddd4a46ce" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19", + "dependencies": [ + "data.aws_availability_zones.available", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_subnet", + "name": "private", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-0d743b4c62e3de6de", + "assign_ipv6_address_on_creation": false, + "availability_zone": "eu-west-1a", + "availability_zone_id": "euw1-az1", + "cidr_block": "10.0.0.0/20", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_lni_at_device_index": 0, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-0d743b4c62e3de6de", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": false, + "outpost_arn": "", + "owner_id": "355614969320", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "timeouts": null, + "vpc_id": "vpc-036c1349ddd4a46ce" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "data.aws_availability_zones.available", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ], + "create_before_destroy": true + }, + { + "index_key": 1, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-08a36304b08dcd4df", + "assign_ipv6_address_on_creation": false, + "availability_zone": "eu-west-1b", + "availability_zone_id": "euw1-az2", + "cidr_block": "10.0.16.0/20", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_lni_at_device_index": 0, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-08a36304b08dcd4df", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": false, + "outpost_arn": "", + "owner_id": "355614969320", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "timeouts": null, + "vpc_id": "vpc-036c1349ddd4a46ce" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "data.aws_availability_zones.available", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ], + "create_before_destroy": true + }, + { + "index_key": 2, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-03484242e7e025e98", + "assign_ipv6_address_on_creation": false, + "availability_zone": "eu-west-1c", + "availability_zone_id": "euw1-az3", + "cidr_block": "10.0.32.0/20", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_lni_at_device_index": 0, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-03484242e7e025e98", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": false, + "outpost_arn": "", + "owner_id": "355614969320", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "timeouts": null, + "vpc_id": "vpc-036c1349ddd4a46ce" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "data.aws_availability_zones.available", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_subnet", + "name": "public", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-08c4d0f2a7397c568", + "assign_ipv6_address_on_creation": false, + "availability_zone": "eu-west-1a", + "availability_zone_id": "euw1-az1", + "cidr_block": "10.0.48.0/24", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_lni_at_device_index": 0, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-08c4d0f2a7397c568", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": false, + "outpost_arn": "", + "owner_id": "355614969320", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "timeouts": null, + "vpc_id": "vpc-036c1349ddd4a46ce" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "data.aws_availability_zones.available", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 1, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-020b69a138405c937", + "assign_ipv6_address_on_creation": false, + "availability_zone": "eu-west-1b", + "availability_zone_id": "euw1-az2", + "cidr_block": "10.0.49.0/24", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_lni_at_device_index": 0, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-020b69a138405c937", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": false, + "outpost_arn": "", + "owner_id": "355614969320", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "timeouts": null, + "vpc_id": "vpc-036c1349ddd4a46ce" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "data.aws_availability_zones.available", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 2, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:355614969320:subnet/subnet-0b0690ac033109c33", + "assign_ipv6_address_on_creation": false, + "availability_zone": "eu-west-1c", + "availability_zone_id": "euw1-az3", + "cidr_block": "10.0.50.0/24", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_lni_at_device_index": 0, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-0b0690ac033109c33", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": false, + "outpost_arn": "", + "owner_id": "355614969320", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "timeouts": null, + "vpc_id": "vpc-036c1349ddd4a46ce" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "data.aws_availability_zones.available", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_vpc", + "name": "this", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:eu-west-1:355614969320:vpc/vpc-036c1349ddd4a46ce", + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "10.0.0.0/16", + "default_network_acl_id": "acl-031a5e6f57caa75df", + "default_route_table_id": "rtb-0c6af805470c20114", + "default_security_group_id": "sg-015ea6038f4f7ff71", + "dhcp_options_id": "dopt-a93124cb", + "enable_dns_hostnames": true, + "enable_dns_support": true, + "enable_network_address_usage_metrics": false, + "id": "vpc-036c1349ddd4a46ce", + "instance_tenancy": "default", + "ipv4_ipam_pool_id": null, + "ipv4_netmask_length": null, + "ipv6_association_id": "", + "ipv6_cidr_block": "", + "ipv6_cidr_block_network_border_group": "", + "ipv6_ipam_pool_id": "", + "ipv6_netmask_length": 0, + "main_route_table_id": "rtb-0c6af805470c20114", + "owner_id": "355614969320", + "tags": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + }, + "tags_all": { + "Example": "chat-app-demo", + "Name": "chat-app-demo", + "Repository": "https://github.com/terraform-aws-modules/terraform-aws-ecs" + } + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", + "create_before_destroy": true + } + ] + } + ], + "check_results": null +} diff --git a/2-simple-example/iac/terraform.tfstate.backup b/demo/iac/terraform.tfstate.backup similarity index 98% rename from 2-simple-example/iac/terraform.tfstate.backup rename to demo/iac/terraform.tfstate.backup index a200806..53eceb8 100644 --- a/2-simple-example/iac/terraform.tfstate.backup +++ b/demo/iac/terraform.tfstate.backup @@ -1,7 +1,7 @@ { "version": 4, "terraform_version": "1.6.2", - "serial": 238, + "serial": 241, "lineage": "eee76b09-c66c-0cf5-be4a-cdd9e6b807e9", "outputs": { "cluster_arn": { @@ -766,6 +766,53 @@ } ] }, + { + "mode": "managed", + "type": "aws_route53_record", + "name": "chat", + "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 2, + "attributes": { + "alias": [ + { + "evaluate_target_health": true, + "name": "chat-app-demo-2046813119.eu-west-1.elb.amazonaws.com", + "zone_id": "Z32O12XQLNTSW2" + } + ], + "allow_overwrite": null, + "cidr_routing_policy": [], + "failover_routing_policy": [], + "fqdn": "chat.ngd.io", + "geolocation_routing_policy": [], + "geoproximity_routing_policy": [], + "health_check_id": "", + "id": "Z2TWGHEC8YQMWW_chat.ngd.io_A", + "latency_routing_policy": [], + "multivalue_answer_routing_policy": false, + "name": "chat.ngd.io", + "records": [], + "set_identifier": "", + "ttl": 0, + "type": "A", + "weighted_routing_policy": [], + "zone_id": "Z2TWGHEC8YQMWW" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "data.aws_availability_zones.available", + "module.alb.aws_lb.this", + "module.alb.aws_security_group.this", + "module.vpc.aws_subnet.public", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, { "mode": "managed", "type": "aws_security_group", @@ -1387,14 +1434,6 @@ } ] }, - { - "module": "module.ecs_cluster", - "mode": "managed", - "type": "aws_ecs_capacity_provider", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [] - }, { "module": "module.ecs_cluster", "mode": "managed", @@ -1531,22 +1570,6 @@ } ] }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_iam_policy_document", - "name": "service", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [] - }, - { - "module": "module.ecs_service", - "mode": "data", - "type": "aws_iam_policy_document", - "name": "service_assume", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [] - }, { "module": "module.ecs_service", "mode": "data", @@ -2013,14 +2036,6 @@ } ] }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_appautoscaling_scheduled_action", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [] - }, { "module": "module.ecs_service", "mode": "managed", @@ -2086,14 +2101,6 @@ } ] }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_ecs_service", - "name": "ignore_task_definition", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [] - }, { "module": "module.ecs_service", "mode": "managed", @@ -2301,30 +2308,6 @@ } ] }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_ecs_task_set", - "name": "ignore_task_definition", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_ecs_task_set", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [] - }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_iam_policy", - "name": "service", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [] - }, { "module": "module.ecs_service", "mode": "managed", @@ -2363,14 +2346,6 @@ } ] }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_iam_role", - "name": "service", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [] - }, { "module": "module.ecs_service", "mode": "managed", @@ -2501,14 +2476,6 @@ } ] }, - { - "module": "module.ecs_service", - "mode": "managed", - "type": "aws_iam_role_policy_attachment", - "name": "service", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [] - }, { "module": "module.ecs_service", "mode": "managed", @@ -3725,14 +3692,6 @@ "create_before_destroy": true } ] - }, - { - "module": "module.vpc", - "mode": "managed", - "type": "aws_vpc_ipv4_cidr_block_association", - "name": "this", - "provider": "provider[\"registry.opentofu.org/hashicorp/aws\"]", - "instances": [] } ], "check_results": null diff --git a/2-simple-example/iac/variables.tf b/demo/iac/variables.tf similarity index 100% rename from 2-simple-example/iac/variables.tf rename to demo/iac/variables.tf diff --git a/2-simple-example/iac/versions.tf b/demo/iac/versions.tf similarity index 100% rename from 2-simple-example/iac/versions.tf rename to demo/iac/versions.tf diff --git a/2-simple-example/iac/vpc.tf b/demo/iac/vpc.tf similarity index 100% rename from 2-simple-example/iac/vpc.tf rename to demo/iac/vpc.tf