sidpalas / devops-directive-terraform-course

Companion repo for complete Terraform course
1.04k stars 1.67k forks source link

Add workflow step to run terratest test #5

Closed sidpalas closed 3 years ago

github-actions[bot] commented 3 years ago

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖failure

Show Plan ```terraform ```

Pusher: @sidpalas, Action: pull_request

github-actions[bot] commented 3 years ago

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan ```terraform Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # module.web_app.aws_db_instance.db_instance will be created + resource "aws_db_instance" "db_instance" { + address = (known after apply) + allocated_storage = 20 + apply_immediately = (known after apply) + arn = (known after apply) + auto_minor_version_upgrade = true + availability_zone = (known after apply) + backup_retention_period = (known after apply) + backup_window = (known after apply) + ca_cert_identifier = (known after apply) + character_set_name = (known after apply) + copy_tags_to_snapshot = false + db_subnet_group_name = (known after apply) + delete_automated_backups = true + endpoint = (known after apply) + engine = "postgres" + engine_version = "12.5" + hosted_zone_id = (known after apply) + id = (known after apply) + identifier = (known after apply) + identifier_prefix = (known after apply) + instance_class = "db.t2.micro" + kms_key_id = (known after apply) + latest_restorable_time = (known after apply) + license_model = (known after apply) + maintenance_window = (known after apply) + monitoring_interval = 0 + monitoring_role_arn = (known after apply) + multi_az = (known after apply) + name = "stagingmydb" + option_group_name = (known after apply) + parameter_group_name = (known after apply) + password = (sensitive value) + performance_insights_enabled = false + performance_insights_kms_key_id = (known after apply) + performance_insights_retention_period = (known after apply) + port = (known after apply) + publicly_accessible = false + replicas = (known after apply) + resource_id = (known after apply) + skip_final_snapshot = true + snapshot_identifier = (known after apply) + status = (known after apply) + storage_type = "standard" + tags_all = (known after apply) + timezone = (known after apply) + username = "foo" + vpc_security_group_ids = (known after apply) } # module.web_app.aws_instance.instance_1 will be created + resource "aws_instance" "instance_1" { + ami = "ami-011899242bb902164" + arn = (known after apply) + associate_public_ip_address = (known after apply) + availability_zone = (known after apply) + cpu_core_count = (known after apply) + cpu_threads_per_core = (known after apply) + get_password_data = false + host_id = (known after apply) + id = (known after apply) + instance_initiated_shutdown_behavior = (known after apply) + instance_state = (known after apply) + instance_type = "t2.micro" + ipv6_address_count = (known after apply) + ipv6_addresses = (known after apply) + key_name = (known after apply) + outpost_arn = (known after apply) + password_data = (known after apply) + placement_group = (known after apply) + primary_network_interface_id = (known after apply) + private_dns = (known after apply) + private_ip = (known after apply) + public_dns = (known after apply) + public_ip = (known after apply) + secondary_private_ips = (known after apply) + security_groups = [ + "web-app-staging-instance-security-group", ] + source_dest_check = true + subnet_id = (known after apply) + tags_all = (known after apply) + tenancy = (known after apply) + user_data = "cb3215a2bd9ad7f4b68bf4f25bc41f0a3945634d" + vpc_security_group_ids = (known after apply) + capacity_reservation_specification { + capacity_reservation_preference = (known after apply) + capacity_reservation_target { + capacity_reservation_id = (known after apply) } } + ebs_block_device { + delete_on_termination = (known after apply) + device_name = (known after apply) + encrypted = (known after apply) + iops = (known after apply) + kms_key_id = (known after apply) + snapshot_id = (known after apply) + tags = (known after apply) + throughput = (known after apply) + volume_id = (known after apply) + volume_size = (known after apply) + volume_type = (known after apply) } + enclave_options { + enabled = (known after apply) } + ephemeral_block_device { + device_name = (known after apply) + no_device = (known after apply) + virtual_name = (known after apply) } + metadata_options { + http_endpoint = (known after apply) + http_put_response_hop_limit = (known after apply) + http_tokens = (known after apply) } + network_interface { + delete_on_termination = (known after apply) + device_index = (known after apply) + network_interface_id = (known after apply) } + root_block_device { + delete_on_termination = (known after apply) + device_name = (known after apply) + encrypted = (known after apply) + iops = (known after apply) + kms_key_id = (known after apply) + tags = (known after apply) + throughput = (known after apply) + volume_id = (known after apply) + volume_size = (known after apply) + volume_type = (known after apply) } } # module.web_app.aws_instance.instance_2 will be created + resource "aws_instance" "instance_2" { + ami = "ami-011899242bb902164" + arn = (known after apply) + associate_public_ip_address = (known after apply) + availability_zone = (known after apply) + cpu_core_count = (known after apply) + cpu_threads_per_core = (known after apply) + get_password_data = false + host_id = (known after apply) + id = (known after apply) + instance_initiated_shutdown_behavior = (known after apply) + instance_state = (known after apply) + instance_type = "t2.micro" + ipv6_address_count = (known after apply) + ipv6_addresses = (known after apply) + key_name = (known after apply) + outpost_arn = (known after apply) + password_data = (known after apply) + placement_group = (known after apply) + primary_network_interface_id = (known after apply) + private_dns = (known after apply) + private_ip = (known after apply) + public_dns = (known after apply) + public_ip = (known after apply) + secondary_private_ips = (known after apply) + security_groups = [ + "web-app-staging-instance-security-group", ] + source_dest_check = true + subnet_id = (known after apply) + tags_all = (known after apply) + tenancy = (known after apply) + user_data = "b2440114b29cb6a9f1c1ab7f2839bdf66a623bed" + vpc_security_group_ids = (known after apply) + capacity_reservation_specification { + capacity_reservation_preference = (known after apply) + capacity_reservation_target { + capacity_reservation_id = (known after apply) } } + ebs_block_device { + delete_on_termination = (known after apply) + device_name = (known after apply) + encrypted = (known after apply) + iops = (known after apply) + kms_key_id = (known after apply) + snapshot_id = (known after apply) + tags = (known after apply) + throughput = (known after apply) + volume_id = (known after apply) + volume_size = (known after apply) + volume_type = (known after apply) } + enclave_options { + enabled = (known after apply) } + ephemeral_block_device { + device_name = (known after apply) + no_device = (known after apply) + virtual_name = (known after apply) } + metadata_options { + http_endpoint = (known after apply) + http_put_response_hop_limit = (known after apply) + http_tokens = (known after apply) } + network_interface { + delete_on_termination = (known after apply) + device_index = (known after apply) + network_interface_id = (known after apply) } + root_block_device { + delete_on_termination = (known after apply) + device_name = (known after apply) + encrypted = (known after apply) + iops = (known after apply) + kms_key_id = (known after apply) + tags = (known after apply) + throughput = (known after apply) + volume_id = (known after apply) + volume_size = (known after apply) + volume_type = (known after apply) } } # module.web_app.aws_lb.load_balancer will be created + resource "aws_lb" "load_balancer" { + arn = (known after apply) + arn_suffix = (known after apply) + dns_name = (known after apply) + drop_invalid_header_fields = false + enable_deletion_protection = false + enable_http2 = true + id = (known after apply) + idle_timeout = 60 + internal = (known after apply) + ip_address_type = (known after apply) + load_balancer_type = "application" + name = "web-app-staging-web-app-lb" + security_groups = (known after apply) + subnets = [ + "subnet-71d6712d", ] + tags_all = (known after apply) + vpc_id = (known after apply) + zone_id = (known after apply) + subnet_mapping { + allocation_id = (known after apply) + ipv6_address = (known after apply) + outpost_id = (known after apply) + private_ipv4_address = (known after apply) + subnet_id = (known after apply) } } # module.web_app.aws_lb_listener.http will be created + resource "aws_lb_listener" "http" { + arn = (known after apply) + id = (known after apply) + load_balancer_arn = (known after apply) + port = 80 + protocol = "HTTP" + ssl_policy = (known after apply) + tags_all = (known after apply) + default_action { + order = (known after apply) + type = "fixed-response" + fixed_response { + content_type = "text/plain" + message_body = "404: page not found" + status_code = "404" } } } # module.web_app.aws_lb_listener_rule.instances will be created + resource "aws_lb_listener_rule" "instances" { + arn = (known after apply) + id = (known after apply) + listener_arn = (known after apply) + priority = 100 + tags_all = (known after apply) + action { + order = (known after apply) + target_group_arn = (known after apply) + type = "forward" } + condition { + path_pattern { + values = [ + "*", ] } } } # module.web_app.aws_lb_target_group.instances will be created + resource "aws_lb_target_group" "instances" { + arn = (known after apply) + arn_suffix = (known after apply) + deregistration_delay = 300 + id = (known after apply) + lambda_multi_value_headers_enabled = false + load_balancing_algorithm_type = (known after apply) + name = "web-app-staging-tg" + port = 8080 + preserve_client_ip = (known after apply) + protocol = "HTTP" + protocol_version = (known after apply) + proxy_protocol_v2 = false + slow_start = 0 + tags_all = (known after apply) + target_type = "instance" + vpc_id = "vpc-15917f6f" + health_check { + enabled = true + healthy_threshold = 2 + interval = 15 + matcher = "200" + path = "/" + port = "traffic-port" + protocol = "HTTP" + timeout = 3 + unhealthy_threshold = 2 } + stickiness { + cookie_duration = (known after apply) + cookie_name = (known after apply) + enabled = (known after apply) + type = (known after apply) } } # module.web_app.aws_lb_target_group_attachment.instance_1 will be created + resource "aws_lb_target_group_attachment" "instance_1" { + id = (known after apply) + port = 8080 + target_group_arn = (known after apply) + target_id = (known after apply) } # module.web_app.aws_lb_target_group_attachment.instance_2 will be created + resource "aws_lb_target_group_attachment" "instance_2" { + id = (known after apply) + port = 8080 + target_group_arn = (known after apply) + target_id = (known after apply) } # module.web_app.aws_route53_record.root will be created + resource "aws_route53_record" "root" { + allow_overwrite = (known after apply) + fqdn = (known after apply) + id = (known after apply) + name = "staging.mysuperawesomesite.com" + type = "A" + zone_id = "Z06653071RGIV5YDZLK5C" + alias { + evaluate_target_health = true + name = (known after apply) + zone_id = (known after apply) } } # module.web_app.aws_s3_bucket.bucket will be created + resource "aws_s3_bucket" "bucket" { + acceleration_status = (known after apply) + acl = "private" + arn = (known after apply) + bucket = "devops-directive-web-app-data-staging" + bucket_domain_name = (known after apply) + bucket_regional_domain_name = (known after apply) + force_destroy = true + hosted_zone_id = (known after apply) + id = (known after apply) + region = (known after apply) + request_payer = (known after apply) + tags_all = (known after apply) + website_domain = (known after apply) + website_endpoint = (known after apply) + server_side_encryption_configuration { + rule { + apply_server_side_encryption_by_default { + sse_algorithm = "AES256" } } } + versioning { + enabled = true + mfa_delete = false } } # module.web_app.aws_security_group.alb will be created + resource "aws_security_group" "alb" { + arn = (known after apply) + description = "Managed by Terraform" + egress = (known after apply) + id = (known after apply) + ingress = (known after apply) + name = "web-app-staging-alb-security-group" + name_prefix = (known after apply) + owner_id = (known after apply) + revoke_rules_on_delete = false + tags_all = (known after apply) + vpc_id = (known after apply) } # module.web_app.aws_security_group.instances will be created + resource "aws_security_group" "instances" { + arn = (known after apply) + description = "Managed by Terraform" + egress = (known after apply) + id = (known after apply) + ingress = (known after apply) + name = "web-app-staging-instance-security-group" + name_prefix = (known after apply) + owner_id = (known after apply) + revoke_rules_on_delete = false + tags_all = (known after apply) + vpc_id = (known after apply) } # module.web_app.aws_security_group_rule.allow_alb_all_outbound will be created + resource "aws_security_group_rule" "allow_alb_all_outbound" { + cidr_blocks = [ + "0.0.0.0/0", ] + from_port = 0 + id = (known after apply) + protocol = "-1" + security_group_id = (known after apply) + self = false + source_security_group_id = (known after apply) + to_port = 0 + type = "egress" } # module.web_app.aws_security_group_rule.allow_alb_http_inbound will be created + resource "aws_security_group_rule" "allow_alb_http_inbound" { + cidr_blocks = [ + "0.0.0.0/0", ] + from_port = 80 + id = (known after apply) + protocol = "tcp" + security_group_id = (known after apply) + self = false + source_security_group_id = (known after apply) + to_port = 80 + type = "ingress" } # module.web_app.aws_security_group_rule.allow_http_inbound will be created + resource "aws_security_group_rule" "allow_http_inbound" { + cidr_blocks = [ + "0.0.0.0/0", ] + from_port = 8080 + id = (known after apply) + protocol = "tcp" + security_group_id = (known after apply) + self = false + source_security_group_id = (known after apply) + to_port = 8080 + type = "ingress" } Plan: 16 to add, 0 to change, 0 to destroy. ───────────────────────────────────────────────────────────────────────────── Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you run "terraform apply" now. ```

Pusher: @sidpalas, Action: pull_request

github-actions[bot] commented 3 years ago

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan ```terraform Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # module.web_app.aws_db_instance.db_instance will be created + resource "aws_db_instance" "db_instance" { + address = (known after apply) + allocated_storage = 20 + apply_immediately = (known after apply) + arn = (known after apply) + auto_minor_version_upgrade = true + availability_zone = (known after apply) + backup_retention_period = (known after apply) + backup_window = (known after apply) + ca_cert_identifier = (known after apply) + character_set_name = (known after apply) + copy_tags_to_snapshot = false + db_subnet_group_name = (known after apply) + delete_automated_backups = true + endpoint = (known after apply) + engine = "postgres" + engine_version = "12.5" + hosted_zone_id = (known after apply) + id = (known after apply) + identifier = (known after apply) + identifier_prefix = (known after apply) + instance_class = "db.t2.micro" + kms_key_id = (known after apply) + latest_restorable_time = (known after apply) + license_model = (known after apply) + maintenance_window = (known after apply) + monitoring_interval = 0 + monitoring_role_arn = (known after apply) + multi_az = (known after apply) + name = "stagingmydb" + option_group_name = (known after apply) + parameter_group_name = (known after apply) + password = (sensitive value) + performance_insights_enabled = false + performance_insights_kms_key_id = (known after apply) + performance_insights_retention_period = (known after apply) + port = (known after apply) + publicly_accessible = false + replicas = (known after apply) + resource_id = (known after apply) + skip_final_snapshot = true + snapshot_identifier = (known after apply) + status = (known after apply) + storage_type = "standard" + tags_all = (known after apply) + timezone = (known after apply) + username = "foo" + vpc_security_group_ids = (known after apply) } # module.web_app.aws_instance.instance_1 will be created + resource "aws_instance" "instance_1" { + ami = "ami-011899242bb902164" + arn = (known after apply) + associate_public_ip_address = (known after apply) + availability_zone = (known after apply) + cpu_core_count = (known after apply) + cpu_threads_per_core = (known after apply) + get_password_data = false + host_id = (known after apply) + id = (known after apply) + instance_initiated_shutdown_behavior = (known after apply) + instance_state = (known after apply) + instance_type = "t2.micro" + ipv6_address_count = (known after apply) + ipv6_addresses = (known after apply) + key_name = (known after apply) + outpost_arn = (known after apply) + password_data = (known after apply) + placement_group = (known after apply) + primary_network_interface_id = (known after apply) + private_dns = (known after apply) + private_ip = (known after apply) + public_dns = (known after apply) + public_ip = (known after apply) + secondary_private_ips = (known after apply) + security_groups = [ + "web-app-staging-instance-security-group", ] + source_dest_check = true + subnet_id = (known after apply) + tags_all = (known after apply) + tenancy = (known after apply) + user_data = "cb3215a2bd9ad7f4b68bf4f25bc41f0a3945634d" + vpc_security_group_ids = (known after apply) + capacity_reservation_specification { + capacity_reservation_preference = (known after apply) + capacity_reservation_target { + capacity_reservation_id = (known after apply) } } + ebs_block_device { + delete_on_termination = (known after apply) + device_name = (known after apply) + encrypted = (known after apply) + iops = (known after apply) + kms_key_id = (known after apply) + snapshot_id = (known after apply) + tags = (known after apply) + throughput = (known after apply) + volume_id = (known after apply) + volume_size = (known after apply) + volume_type = (known after apply) } + enclave_options { + enabled = (known after apply) } + ephemeral_block_device { + device_name = (known after apply) + no_device = (known after apply) + virtual_name = (known after apply) } + metadata_options { + http_endpoint = (known after apply) + http_put_response_hop_limit = (known after apply) + http_tokens = (known after apply) } + network_interface { + delete_on_termination = (known after apply) + device_index = (known after apply) + network_interface_id = (known after apply) } + root_block_device { + delete_on_termination = (known after apply) + device_name = (known after apply) + encrypted = (known after apply) + iops = (known after apply) + kms_key_id = (known after apply) + tags = (known after apply) + throughput = (known after apply) + volume_id = (known after apply) + volume_size = (known after apply) + volume_type = (known after apply) } } # module.web_app.aws_instance.instance_2 will be created + resource "aws_instance" "instance_2" { + ami = "ami-011899242bb902164" + arn = (known after apply) + associate_public_ip_address = (known after apply) + availability_zone = (known after apply) + cpu_core_count = (known after apply) + cpu_threads_per_core = (known after apply) + get_password_data = false + host_id = (known after apply) + id = (known after apply) + instance_initiated_shutdown_behavior = (known after apply) + instance_state = (known after apply) + instance_type = "t2.micro" + ipv6_address_count = (known after apply) + ipv6_addresses = (known after apply) + key_name = (known after apply) + outpost_arn = (known after apply) + password_data = (known after apply) + placement_group = (known after apply) + primary_network_interface_id = (known after apply) + private_dns = (known after apply) + private_ip = (known after apply) + public_dns = (known after apply) + public_ip = (known after apply) + secondary_private_ips = (known after apply) + security_groups = [ + "web-app-staging-instance-security-group", ] + source_dest_check = true + subnet_id = (known after apply) + tags_all = (known after apply) + tenancy = (known after apply) + user_data = "b2440114b29cb6a9f1c1ab7f2839bdf66a623bed" + vpc_security_group_ids = (known after apply) + capacity_reservation_specification { + capacity_reservation_preference = (known after apply) + capacity_reservation_target { + capacity_reservation_id = (known after apply) } } + ebs_block_device { + delete_on_termination = (known after apply) + device_name = (known after apply) + encrypted = (known after apply) + iops = (known after apply) + kms_key_id = (known after apply) + snapshot_id = (known after apply) + tags = (known after apply) + throughput = (known after apply) + volume_id = (known after apply) + volume_size = (known after apply) + volume_type = (known after apply) } + enclave_options { + enabled = (known after apply) } + ephemeral_block_device { + device_name = (known after apply) + no_device = (known after apply) + virtual_name = (known after apply) } + metadata_options { + http_endpoint = (known after apply) + http_put_response_hop_limit = (known after apply) + http_tokens = (known after apply) } + network_interface { + delete_on_termination = (known after apply) + device_index = (known after apply) + network_interface_id = (known after apply) } + root_block_device { + delete_on_termination = (known after apply) + device_name = (known after apply) + encrypted = (known after apply) + iops = (known after apply) + kms_key_id = (known after apply) + tags = (known after apply) + throughput = (known after apply) + volume_id = (known after apply) + volume_size = (known after apply) + volume_type = (known after apply) } } # module.web_app.aws_lb.load_balancer will be created + resource "aws_lb" "load_balancer" { + arn = (known after apply) + arn_suffix = (known after apply) + dns_name = (known after apply) + drop_invalid_header_fields = false + enable_deletion_protection = false + enable_http2 = true + id = (known after apply) + idle_timeout = 60 + internal = (known after apply) + ip_address_type = (known after apply) + load_balancer_type = "application" + name = "web-app-staging-web-app-lb" + security_groups = (known after apply) + subnets = [ + "subnet-71d6712d", ] + tags_all = (known after apply) + vpc_id = (known after apply) + zone_id = (known after apply) + subnet_mapping { + allocation_id = (known after apply) + ipv6_address = (known after apply) + outpost_id = (known after apply) + private_ipv4_address = (known after apply) + subnet_id = (known after apply) } } # module.web_app.aws_lb_listener.http will be created + resource "aws_lb_listener" "http" { + arn = (known after apply) + id = (known after apply) + load_balancer_arn = (known after apply) + port = 80 + protocol = "HTTP" + ssl_policy = (known after apply) + tags_all = (known after apply) + default_action { + order = (known after apply) + type = "fixed-response" + fixed_response { + content_type = "text/plain" + message_body = "404: page not found" + status_code = "404" } } } # module.web_app.aws_lb_listener_rule.instances will be created + resource "aws_lb_listener_rule" "instances" { + arn = (known after apply) + id = (known after apply) + listener_arn = (known after apply) + priority = 100 + tags_all = (known after apply) + action { + order = (known after apply) + target_group_arn = (known after apply) + type = "forward" } + condition { + path_pattern { + values = [ + "*", ] } } } # module.web_app.aws_lb_target_group.instances will be created + resource "aws_lb_target_group" "instances" { + arn = (known after apply) + arn_suffix = (known after apply) + deregistration_delay = 300 + id = (known after apply) + lambda_multi_value_headers_enabled = false + load_balancing_algorithm_type = (known after apply) + name = "web-app-staging-tg" + port = 8080 + preserve_client_ip = (known after apply) + protocol = "HTTP" + protocol_version = (known after apply) + proxy_protocol_v2 = false + slow_start = 0 + tags_all = (known after apply) + target_type = "instance" + vpc_id = "vpc-15917f6f" + health_check { + enabled = true + healthy_threshold = 2 + interval = 15 + matcher = "200" + path = "/" + port = "traffic-port" + protocol = "HTTP" + timeout = 3 + unhealthy_threshold = 2 } + stickiness { + cookie_duration = (known after apply) + cookie_name = (known after apply) + enabled = (known after apply) + type = (known after apply) } } # module.web_app.aws_lb_target_group_attachment.instance_1 will be created + resource "aws_lb_target_group_attachment" "instance_1" { + id = (known after apply) + port = 8080 + target_group_arn = (known after apply) + target_id = (known after apply) } # module.web_app.aws_lb_target_group_attachment.instance_2 will be created + resource "aws_lb_target_group_attachment" "instance_2" { + id = (known after apply) + port = 8080 + target_group_arn = (known after apply) + target_id = (known after apply) } # module.web_app.aws_route53_record.root will be created + resource "aws_route53_record" "root" { + allow_overwrite = (known after apply) + fqdn = (known after apply) + id = (known after apply) + name = "staging.mysuperawesomesite.com" + type = "A" + zone_id = "Z06653071RGIV5YDZLK5C" + alias { + evaluate_target_health = true + name = (known after apply) + zone_id = (known after apply) } } # module.web_app.aws_s3_bucket.bucket will be created + resource "aws_s3_bucket" "bucket" { + acceleration_status = (known after apply) + acl = "private" + arn = (known after apply) + bucket = "devops-directive-web-app-data-staging" + bucket_domain_name = (known after apply) + bucket_regional_domain_name = (known after apply) + force_destroy = true + hosted_zone_id = (known after apply) + id = (known after apply) + region = (known after apply) + request_payer = (known after apply) + tags_all = (known after apply) + website_domain = (known after apply) + website_endpoint = (known after apply) + server_side_encryption_configuration { + rule { + apply_server_side_encryption_by_default { + sse_algorithm = "AES256" } } } + versioning { + enabled = true + mfa_delete = false } } # module.web_app.aws_security_group.alb will be created + resource "aws_security_group" "alb" { + arn = (known after apply) + description = "Managed by Terraform" + egress = (known after apply) + id = (known after apply) + ingress = (known after apply) + name = "web-app-staging-alb-security-group" + name_prefix = (known after apply) + owner_id = (known after apply) + revoke_rules_on_delete = false + tags_all = (known after apply) + vpc_id = (known after apply) } # module.web_app.aws_security_group.instances will be created + resource "aws_security_group" "instances" { + arn = (known after apply) + description = "Managed by Terraform" + egress = (known after apply) + id = (known after apply) + ingress = (known after apply) + name = "web-app-staging-instance-security-group" + name_prefix = (known after apply) + owner_id = (known after apply) + revoke_rules_on_delete = false + tags_all = (known after apply) + vpc_id = (known after apply) } # module.web_app.aws_security_group_rule.allow_alb_all_outbound will be created + resource "aws_security_group_rule" "allow_alb_all_outbound" { + cidr_blocks = [ + "0.0.0.0/0", ] + from_port = 0 + id = (known after apply) + protocol = "-1" + security_group_id = (known after apply) + self = false + source_security_group_id = (known after apply) + to_port = 0 + type = "egress" } # module.web_app.aws_security_group_rule.allow_alb_http_inbound will be created + resource "aws_security_group_rule" "allow_alb_http_inbound" { + cidr_blocks = [ + "0.0.0.0/0", ] + from_port = 80 + id = (known after apply) + protocol = "tcp" + security_group_id = (known after apply) + self = false + source_security_group_id = (known after apply) + to_port = 80 + type = "ingress" } # module.web_app.aws_security_group_rule.allow_http_inbound will be created + resource "aws_security_group_rule" "allow_http_inbound" { + cidr_blocks = [ + "0.0.0.0/0", ] + from_port = 8080 + id = (known after apply) + protocol = "tcp" + security_group_id = (known after apply) + self = false + source_security_group_id = (known after apply) + to_port = 8080 + type = "ingress" } Plan: 16 to add, 0 to change, 0 to destroy. ───────────────────────────────────────────────────────────────────────────── Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you run "terraform apply" now. Releasing state lock. This may take a few moments... ```

Pusher: @sidpalas, Action: pull_request

github-actions[bot] commented 3 years ago

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan ```terraform Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # module.web_app.aws_db_instance.db_instance will be created + resource "aws_db_instance" "db_instance" { + address = (known after apply) + allocated_storage = 20 + apply_immediately = (known after apply) + arn = (known after apply) + auto_minor_version_upgrade = true + availability_zone = (known after apply) + backup_retention_period = (known after apply) + backup_window = (known after apply) + ca_cert_identifier = (known after apply) + character_set_name = (known after apply) + copy_tags_to_snapshot = false + db_subnet_group_name = (known after apply) + delete_automated_backups = true + endpoint = (known after apply) + engine = "postgres" + engine_version = "12.5" + hosted_zone_id = (known after apply) + id = (known after apply) + identifier = (known after apply) + identifier_prefix = (known after apply) + instance_class = "db.t2.micro" + kms_key_id = (known after apply) + latest_restorable_time = (known after apply) + license_model = (known after apply) + maintenance_window = (known after apply) + monitoring_interval = 0 + monitoring_role_arn = (known after apply) + multi_az = (known after apply) + name = "stagingmydb" + option_group_name = (known after apply) + parameter_group_name = (known after apply) + password = (sensitive value) + performance_insights_enabled = false + performance_insights_kms_key_id = (known after apply) + performance_insights_retention_period = (known after apply) + port = (known after apply) + publicly_accessible = false + replicas = (known after apply) + resource_id = (known after apply) + skip_final_snapshot = true + snapshot_identifier = (known after apply) + status = (known after apply) + storage_type = "standard" + tags_all = (known after apply) + timezone = (known after apply) + username = "foo" + vpc_security_group_ids = (known after apply) } # module.web_app.aws_instance.instance_1 will be created + resource "aws_instance" "instance_1" { + ami = "ami-011899242bb902164" + arn = (known after apply) + associate_public_ip_address = (known after apply) + availability_zone = (known after apply) + cpu_core_count = (known after apply) + cpu_threads_per_core = (known after apply) + get_password_data = false + host_id = (known after apply) + id = (known after apply) + instance_initiated_shutdown_behavior = (known after apply) + instance_state = (known after apply) + instance_type = "t2.micro" + ipv6_address_count = (known after apply) + ipv6_addresses = (known after apply) + key_name = (known after apply) + outpost_arn = (known after apply) + password_data = (known after apply) + placement_group = (known after apply) + primary_network_interface_id = (known after apply) + private_dns = (known after apply) + private_ip = (known after apply) + public_dns = (known after apply) + public_ip = (known after apply) + secondary_private_ips = (known after apply) + security_groups = [ + "web-app-staging-instance-security-group", ] + source_dest_check = true + subnet_id = (known after apply) + tags_all = (known after apply) + tenancy = (known after apply) + user_data = "cb3215a2bd9ad7f4b68bf4f25bc41f0a3945634d" + vpc_security_group_ids = (known after apply) + capacity_reservation_specification { + capacity_reservation_preference = (known after apply) + capacity_reservation_target { + capacity_reservation_id = (known after apply) } } + ebs_block_device { + delete_on_termination = (known after apply) + device_name = (known after apply) + encrypted = (known after apply) + iops = (known after apply) + kms_key_id = (known after apply) + snapshot_id = (known after apply) + tags = (known after apply) + throughput = (known after apply) + volume_id = (known after apply) + volume_size = (known after apply) + volume_type = (known after apply) } + enclave_options { + enabled = (known after apply) } + ephemeral_block_device { + device_name = (known after apply) + no_device = (known after apply) + virtual_name = (known after apply) } + metadata_options { + http_endpoint = (known after apply) + http_put_response_hop_limit = (known after apply) + http_tokens = (known after apply) } + network_interface { + delete_on_termination = (known after apply) + device_index = (known after apply) + network_interface_id = (known after apply) } + root_block_device { + delete_on_termination = (known after apply) + device_name = (known after apply) + encrypted = (known after apply) + iops = (known after apply) + kms_key_id = (known after apply) + tags = (known after apply) + throughput = (known after apply) + volume_id = (known after apply) + volume_size = (known after apply) + volume_type = (known after apply) } } # module.web_app.aws_instance.instance_2 will be created + resource "aws_instance" "instance_2" { + ami = "ami-011899242bb902164" + arn = (known after apply) + associate_public_ip_address = (known after apply) + availability_zone = (known after apply) + cpu_core_count = (known after apply) + cpu_threads_per_core = (known after apply) + get_password_data = false + host_id = (known after apply) + id = (known after apply) + instance_initiated_shutdown_behavior = (known after apply) + instance_state = (known after apply) + instance_type = "t2.micro" + ipv6_address_count = (known after apply) + ipv6_addresses = (known after apply) + key_name = (known after apply) + outpost_arn = (known after apply) + password_data = (known after apply) + placement_group = (known after apply) + primary_network_interface_id = (known after apply) + private_dns = (known after apply) + private_ip = (known after apply) + public_dns = (known after apply) + public_ip = (known after apply) + secondary_private_ips = (known after apply) + security_groups = [ + "web-app-staging-instance-security-group", ] + source_dest_check = true + subnet_id = (known after apply) + tags_all = (known after apply) + tenancy = (known after apply) + user_data = "b2440114b29cb6a9f1c1ab7f2839bdf66a623bed" + vpc_security_group_ids = (known after apply) + capacity_reservation_specification { + capacity_reservation_preference = (known after apply) + capacity_reservation_target { + capacity_reservation_id = (known after apply) } } + ebs_block_device { + delete_on_termination = (known after apply) + device_name = (known after apply) + encrypted = (known after apply) + iops = (known after apply) + kms_key_id = (known after apply) + snapshot_id = (known after apply) + tags = (known after apply) + throughput = (known after apply) + volume_id = (known after apply) + volume_size = (known after apply) + volume_type = (known after apply) } + enclave_options { + enabled = (known after apply) } + ephemeral_block_device { + device_name = (known after apply) + no_device = (known after apply) + virtual_name = (known after apply) } + metadata_options { + http_endpoint = (known after apply) + http_put_response_hop_limit = (known after apply) + http_tokens = (known after apply) } + network_interface { + delete_on_termination = (known after apply) + device_index = (known after apply) + network_interface_id = (known after apply) } + root_block_device { + delete_on_termination = (known after apply) + device_name = (known after apply) + encrypted = (known after apply) + iops = (known after apply) + kms_key_id = (known after apply) + tags = (known after apply) + throughput = (known after apply) + volume_id = (known after apply) + volume_size = (known after apply) + volume_type = (known after apply) } } # module.web_app.aws_lb.load_balancer will be created + resource "aws_lb" "load_balancer" { + arn = (known after apply) + arn_suffix = (known after apply) + dns_name = (known after apply) + drop_invalid_header_fields = false + enable_deletion_protection = false + enable_http2 = true + id = (known after apply) + idle_timeout = 60 + internal = (known after apply) + ip_address_type = (known after apply) + load_balancer_type = "application" + name = "web-app-staging-web-app-lb" + security_groups = (known after apply) + subnets = [ + "subnet-71d6712d", ] + tags_all = (known after apply) + vpc_id = (known after apply) + zone_id = (known after apply) + subnet_mapping { + allocation_id = (known after apply) + ipv6_address = (known after apply) + outpost_id = (known after apply) + private_ipv4_address = (known after apply) + subnet_id = (known after apply) } } # module.web_app.aws_lb_listener.http will be created + resource "aws_lb_listener" "http" { + arn = (known after apply) + id = (known after apply) + load_balancer_arn = (known after apply) + port = 80 + protocol = "HTTP" + ssl_policy = (known after apply) + tags_all = (known after apply) + default_action { + order = (known after apply) + type = "fixed-response" + fixed_response { + content_type = "text/plain" + message_body = "404: page not found" + status_code = "404" } } } # module.web_app.aws_lb_listener_rule.instances will be created + resource "aws_lb_listener_rule" "instances" { + arn = (known after apply) + id = (known after apply) + listener_arn = (known after apply) + priority = 100 + tags_all = (known after apply) + action { + order = (known after apply) + target_group_arn = (known after apply) + type = "forward" } + condition { + path_pattern { + values = [ + "*", ] } } } # module.web_app.aws_lb_target_group.instances will be created + resource "aws_lb_target_group" "instances" { + arn = (known after apply) + arn_suffix = (known after apply) + deregistration_delay = 300 + id = (known after apply) + lambda_multi_value_headers_enabled = false + load_balancing_algorithm_type = (known after apply) + name = "web-app-staging-tg" + port = 8080 + preserve_client_ip = (known after apply) + protocol = "HTTP" + protocol_version = (known after apply) + proxy_protocol_v2 = false + slow_start = 0 + tags_all = (known after apply) + target_type = "instance" + vpc_id = "vpc-15917f6f" + health_check { + enabled = true + healthy_threshold = 2 + interval = 15 + matcher = "200" + path = "/" + port = "traffic-port" + protocol = "HTTP" + timeout = 3 + unhealthy_threshold = 2 } + stickiness { + cookie_duration = (known after apply) + cookie_name = (known after apply) + enabled = (known after apply) + type = (known after apply) } } # module.web_app.aws_lb_target_group_attachment.instance_1 will be created + resource "aws_lb_target_group_attachment" "instance_1" { + id = (known after apply) + port = 8080 + target_group_arn = (known after apply) + target_id = (known after apply) } # module.web_app.aws_lb_target_group_attachment.instance_2 will be created + resource "aws_lb_target_group_attachment" "instance_2" { + id = (known after apply) + port = 8080 + target_group_arn = (known after apply) + target_id = (known after apply) } # module.web_app.aws_route53_record.root will be created + resource "aws_route53_record" "root" { + allow_overwrite = (known after apply) + fqdn = (known after apply) + id = (known after apply) + name = "staging.mysuperawesomesite.com" + type = "A" + zone_id = "Z06653071RGIV5YDZLK5C" + alias { + evaluate_target_health = true + name = (known after apply) + zone_id = (known after apply) } } # module.web_app.aws_s3_bucket.bucket will be created + resource "aws_s3_bucket" "bucket" { + acceleration_status = (known after apply) + acl = "private" + arn = (known after apply) + bucket = "devops-directive-web-app-data-staging" + bucket_domain_name = (known after apply) + bucket_regional_domain_name = (known after apply) + force_destroy = true + hosted_zone_id = (known after apply) + id = (known after apply) + region = (known after apply) + request_payer = (known after apply) + tags_all = (known after apply) + website_domain = (known after apply) + website_endpoint = (known after apply) + server_side_encryption_configuration { + rule { + apply_server_side_encryption_by_default { + sse_algorithm = "AES256" } } } + versioning { + enabled = true + mfa_delete = false } } # module.web_app.aws_security_group.alb will be created + resource "aws_security_group" "alb" { + arn = (known after apply) + description = "Managed by Terraform" + egress = (known after apply) + id = (known after apply) + ingress = (known after apply) + name = "web-app-staging-alb-security-group" + name_prefix = (known after apply) + owner_id = (known after apply) + revoke_rules_on_delete = false + tags_all = (known after apply) + vpc_id = (known after apply) } # module.web_app.aws_security_group.instances will be created + resource "aws_security_group" "instances" { + arn = (known after apply) + description = "Managed by Terraform" + egress = (known after apply) + id = (known after apply) + ingress = (known after apply) + name = "web-app-staging-instance-security-group" + name_prefix = (known after apply) + owner_id = (known after apply) + revoke_rules_on_delete = false + tags_all = (known after apply) + vpc_id = (known after apply) } # module.web_app.aws_security_group_rule.allow_alb_all_outbound will be created + resource "aws_security_group_rule" "allow_alb_all_outbound" { + cidr_blocks = [ + "0.0.0.0/0", ] + from_port = 0 + id = (known after apply) + protocol = "-1" + security_group_id = (known after apply) + self = false + source_security_group_id = (known after apply) + to_port = 0 + type = "egress" } # module.web_app.aws_security_group_rule.allow_alb_http_inbound will be created + resource "aws_security_group_rule" "allow_alb_http_inbound" { + cidr_blocks = [ + "0.0.0.0/0", ] + from_port = 80 + id = (known after apply) + protocol = "tcp" + security_group_id = (known after apply) + self = false + source_security_group_id = (known after apply) + to_port = 80 + type = "ingress" } # module.web_app.aws_security_group_rule.allow_http_inbound will be created + resource "aws_security_group_rule" "allow_http_inbound" { + cidr_blocks = [ + "0.0.0.0/0", ] + from_port = 8080 + id = (known after apply) + protocol = "tcp" + security_group_id = (known after apply) + self = false + source_security_group_id = (known after apply) + to_port = 8080 + type = "ingress" } Plan: 16 to add, 0 to change, 0 to destroy. ───────────────────────────────────────────────────────────────────────────── Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you run "terraform apply" now. ```

Pusher: @sidpalas, Action: pull_request

github-actions[bot] commented 3 years ago

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan ```terraform ```

Pusher: @sidpalas, Action: pull_request

sidpalas commented 3 years ago

Fixes #3