Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add additional steps for debugging (SCRUM-52) #23

Merged
merged 1 commit into from
Jul 7, 2024

Conversation

sh1un
Copy link
Member

@sh1un sh1un commented Jul 7, 2024

No description provided.

Copy link

github-actions bot commented Jul 7, 2024

Terraform Apply Results 🌟

Preview environment has been deployed. You can now test your changes.

Show Actual Apply

�[0m�[1mmodule.send_email_lambda.data.aws_iam_policy_document.assume_role[0]: Reading...�[0m�[0m
�[0m�[1mmodule.docker_image.data.aws_caller_identity.this: Reading...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.data.aws_partition.current: Reading...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.data.aws_caller_identity.current: Reading...�[0m�[0m
�[0m�[1mdata.aws_caller_identity.this: Reading...�[0m�[0m
�[0m�[1mmodule.docker_image.data.aws_region.current: Reading...�[0m�[0m
�[0m�[1mdata.aws_route53_zone.awseducate_systems: Reading...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.data.aws_partition.current: Read complete after 0s [id=aws]�[0m
�[0m�[1mmodule.docker_image.data.aws_region.current: Read complete after 0s [id=us-west-1]�[0m
�[0m�[1mmodule.send_email_lambda.data.aws_iam_policy_document.assume_role[0]: Read complete after 0s [id=2690255455]�[0m
�[0m�[1mdata.aws_ecr_authorization_token.token: Reading...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.data.aws_region.current: Reading...�[0m�[0m
�[0m�[1mdata.aws_acm_certificate.issued: Reading...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.data.aws_region.current: Read complete after 0s [id=us-west-1]�[0m
�[0m�[1mdata.aws_caller_identity.this: Read complete after 0s [id=070576557102]�[0m
�[0m�[1mmodule.send_email_lambda.data.aws_iam_policy_document.additional_inline[0]: Reading...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.data.aws_iam_policy_document.additional_inline[0]: Read complete after 0s [id=821629503]�[0m
�[0m�[1mmodule.docker_image.data.aws_caller_identity.this: Read complete after 0s [id=070576557102]�[0m
�[0m�[1mmodule.send_email_lambda.data.aws_caller_identity.current: Read complete after 0s [id=070576557102]�[0m
�[0m�[1mdata.aws_route53_zone.awseducate_systems: Read complete after 0s [id=Z00402303DMA4KDX72AUO]�[0m
�[0m�[1mdata.aws_ecr_authorization_token.token: Read complete after 0s [id=us-west-1]�[0m
�[0m�[1mdata.aws_acm_certificate.issued: Read complete after 1s [id=arn:aws:acm:us-west-1:070576557102:certificate/4a82a359-3de0-4a85-a96a-ae13d5d01325]�[0m

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  �[32m+�[0m create�[0m
 �[36m<=�[0m read (data resources)�[0m

Terraform will perform the following actions:

�[1m  # aws_dynamodb_table.email�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_dynamodb_table" "email" {
      �[32m+�[0m�[0m arn              = (known after apply)
      �[32m+�[0m�[0m billing_mode     = "PAY_PER_REQUEST"
      �[32m+�[0m�[0m hash_key         = "run_id"
      �[32m+�[0m�[0m id               = (known after apply)
      �[32m+�[0m�[0m name             = "email"
      �[32m+�[0m�[0m range_key        = "email_id"
      �[32m+�[0m�[0m read_capacity    = (known after apply)
      �[32m+�[0m�[0m stream_arn       = (known after apply)
      �[32m+�[0m�[0m stream_label     = (known after apply)
      �[32m+�[0m�[0m stream_view_type = (known after apply)
      �[32m+�[0m�[0m tags             = {
          �[32m+�[0m�[0m "Creator" = "Richie"
          �[32m+�[0m�[0m "Name"    = "email"
        }
      �[32m+�[0m�[0m tags_all         = {
          �[32m+�[0m�[0m "Creator"     = "Richie"
          �[32m+�[0m�[0m "Environment" = "preview"
          �[32m+�[0m�[0m "Name"        = "email"
          �[32m+�[0m�[0m "Project"     = "AWS Educate TPET"
          �[32m+�[0m�[0m "Terraform"   = "true"
        }
      �[32m+�[0m�[0m write_capacity   = (known after apply)

      �[32m+�[0m�[0m attribute {
          �[32m+�[0m�[0m name = "created_at"
          �[32m+�[0m�[0m type = "S"
        }
      �[32m+�[0m�[0m attribute {
          �[32m+�[0m�[0m name = "email_id"
          �[32m+�[0m�[0m type = "S"
        }
      �[32m+�[0m�[0m attribute {
          �[32m+�[0m�[0m name = "run_id"
          �[32m+�[0m�[0m type = "S"
        }
      �[32m+�[0m�[0m attribute {
          �[32m+�[0m�[0m name = "status"
          �[32m+�[0m�[0m type = "S"
        }

      �[32m+�[0m�[0m local_secondary_index {
          �[32m+�[0m�[0m name               = "create_at_lsi"
          �[32m+�[0m�[0m non_key_attributes = []
          �[32m+�[0m�[0m projection_type    = "ALL"
          �[32m+�[0m�[0m range_key          = "created_at"
        }
      �[32m+�[0m�[0m local_secondary_index {
          �[32m+�[0m�[0m name               = "status_lsi"
          �[32m+�[0m�[0m non_key_attributes = []
          �[32m+�[0m�[0m projection_type    = "ALL"
          �[32m+�[0m�[0m range_key          = "status"
        }
    }

�[1m  # aws_route53_record.api_gateway_custom_domain_record�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_route53_record" "api_gateway_custom_domain_record" {
      �[32m+�[0m�[0m allow_overwrite = (known after apply)
      �[32m+�[0m�[0m fqdn            = (known after apply)
      �[32m+�[0m�[0m id              = (known after apply)
      �[32m+�[0m�[0m name            = "preview-email-service-internal-api-tpet.awseducate.systems"
      �[32m+�[0m�[0m type            = "A"
      �[32m+�[0m�[0m zone_id         = "Z00402303DMA4KDX72AUO"

      �[32m+�[0m�[0m alias {
          �[32m+�[0m�[0m evaluate_target_health = false
          �[32m+�[0m�[0m name                   = (known after apply)
          �[32m+�[0m�[0m zone_id                = (known after apply)
        }
    }

�[1m  # random_string.this�[0m will be created
�[0m  �[32m+�[0m�[0m resource "random_string" "this" {
      �[32m+�[0m�[0m id          = (known after apply)
      �[32m+�[0m�[0m length      = 4
      �[32m+�[0m�[0m lower       = true
      �[32m+�[0m�[0m min_lower   = 0
      �[32m+�[0m�[0m min_numeric = 0
      �[32m+�[0m�[0m min_special = 0
      �[32m+�[0m�[0m min_upper   = 0
      �[32m+�[0m�[0m number      = true
      �[32m+�[0m�[0m numeric     = true
      �[32m+�[0m�[0m result      = (known after apply)
      �[32m+�[0m�[0m special     = false
      �[32m+�[0m�[0m upper       = false
    }

�[1m  # module.api_gateway.aws_apigatewayv2_api.this[0]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_apigatewayv2_api" "this" {
      �[32m+�[0m�[0m api_endpoint                 = (known after apply)
      �[32m+�[0m�[0m api_key_selection_expression = "$request.header.x-api-key"
      �[32m+�[0m�[0m arn                          = (known after apply)
      �[32m+�[0m�[0m description                  = "Email service api gateway to lambda container image"
      �[32m+�[0m�[0m disable_execute_api_endpoint = true
      �[32m+�[0m�[0m execution_arn                = (known after apply)
      �[32m+�[0m�[0m fail_on_warnings             = false
      �[32m+�[0m�[0m id                           = (known after apply)
      �[32m+�[0m�[0m name                         = "preview-email_service"
      �[32m+�[0m�[0m protocol_type                = "HTTP"
      �[32m+�[0m�[0m route_selection_expression   = "$request.method $request.path"
      �[32m+�[0m�[0m tags                         = {
          �[32m+�[0m�[0m "Service"               = "email_service"
          �[32m+�[0m�[0m "terraform-aws-modules" = "apigateway-v2"
        }
      �[32m+�[0m�[0m tags_all                     = {
          �[32m+�[0m�[0m "Environment"           = "preview"
          �[32m+�[0m�[0m "Project"               = "AWS Educate TPET"
          �[32m+�[0m�[0m "Service"               = "email_service"
          �[32m+�[0m�[0m "Terraform"             = "true"
          �[32m+�[0m�[0m "terraform-aws-modules" = "apigateway-v2"
        }

      �[32m+�[0m�[0m cors_configuration {
          �[32m+�[0m�[0m allow_headers = [
              �[32m+�[0m�[0m "authorization",
              �[32m+�[0m�[0m "content-type",
              �[32m+�[0m�[0m "x-amz-date",
              �[32m+�[0m�[0m "x-amz-security-token",
              �[32m+�[0m�[0m "x-amz-user-agent",
              �[32m+�[0m�[0m "x-api-key",
            ]
          �[32m+�[0m�[0m allow_methods = [
              �[32m+�[0m�[0m "*",
            ]
          �[32m+�[0m�[0m allow_origins = [
              �[32m+�[0m�[0m "*",
            ]
        }
    }

�[1m  # module.api_gateway.aws_apigatewayv2_api_mapping.this[0]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_apigatewayv2_api_mapping" "this" {
      �[32m+�[0m�[0m api_id          = (known after apply)
      �[32m+�[0m�[0m api_mapping_key = "preview"
      �[32m+�[0m�[0m domain_name     = (known after apply)
      �[32m+�[0m�[0m id              = (known after apply)
      �[32m+�[0m�[0m stage           = (known after apply)
    }

�[1m  # module.api_gateway.aws_apigatewayv2_domain_name.this[0]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_apigatewayv2_domain_name" "this" {
      �[32m+�[0m�[0m api_mapping_selection_expression = (known after apply)
      �[32m+�[0m�[0m arn                              = (known after apply)
      �[32m+�[0m�[0m domain_name                      = "preview-email-service-internal-api-tpet.awseducate.systems"
      �[32m+�[0m�[0m id                               = (known after apply)
      �[32m+�[0m�[0m tags                             = {
          �[32m+�[0m�[0m "Service" = "email_service"
        }
      �[32m+�[0m�[0m tags_all                         = {
          �[32m+�[0m�[0m "Environment" = "preview"
          �[32m+�[0m�[0m "Project"     = "AWS Educate TPET"
          �[32m+�[0m�[0m "Service"     = "email_service"
          �[32m+�[0m�[0m "Terraform"   = "true"
        }

      �[32m+�[0m�[0m domain_name_configuration {
          �[32m+�[0m�[0m certificate_arn                        = "arn:aws:acm:us-west-1:070576557102:certificate/4a82a359-3de0-4a85-a96a-ae13d5d01325"
          �[32m+�[0m�[0m endpoint_type                          = "REGIONAL"
          �[32m+�[0m�[0m hosted_zone_id                         = (known after apply)
          �[32m+�[0m�[0m ownership_verification_certificate_arn = (known after apply)
          �[32m+�[0m�[0m security_policy                        = "TLS_1_2"
          �[32m+�[0m�[0m target_domain_name                     = (known after apply)
        }
    }

�[1m  # module.api_gateway.aws_apigatewayv2_integration.this["$default"]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_apigatewayv2_integration" "this" {
      �[32m+�[0m�[0m api_id                                    = (known after apply)
      �[32m+�[0m�[0m connection_type                           = "INTERNET"
      �[32m+�[0m�[0m id                                        = (known after apply)
      �[32m+�[0m�[0m integration_response_selection_expression = (known after apply)
      �[32m+�[0m�[0m integration_type                          = "AWS_PROXY"
      �[32m+�[0m�[0m integration_uri                           = (known after apply)
      �[32m+�[0m�[0m payload_format_version                    = "1.0"
      �[32m+�[0m�[0m timeout_milliseconds                      = (known after apply)
    }

�[1m  # module.api_gateway.aws_apigatewayv2_integration.this["POST /send-email"]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_apigatewayv2_integration" "this" {
      �[32m+�[0m�[0m api_id                                    = (known after apply)
      �[32m+�[0m�[0m connection_type                           = "INTERNET"
      �[32m+�[0m�[0m id                                        = (known after apply)
      �[32m+�[0m�[0m integration_response_selection_expression = (known after apply)
      �[32m+�[0m�[0m integration_type                          = "AWS_PROXY"
      �[32m+�[0m�[0m integration_uri                           = (known after apply)
      �[32m+�[0m�[0m payload_format_version                    = "1.0"
      �[32m+�[0m�[0m timeout_milliseconds                      = 29000
    }

�[1m  # module.api_gateway.aws_apigatewayv2_route.this["$default"]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_apigatewayv2_route" "this" {
      �[32m+�[0m�[0m api_id             = (known after apply)
      �[32m+�[0m�[0m api_key_required   = false
      �[32m+�[0m�[0m authorization_type = "NONE"
      �[32m+�[0m�[0m id                 = (known after apply)
      �[32m+�[0m�[0m route_key          = "$default"
      �[32m+�[0m�[0m target             = (known after apply)
    }

�[1m  # module.api_gateway.aws_apigatewayv2_route.this["POST /send-email"]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_apigatewayv2_route" "this" {
      �[32m+�[0m�[0m api_id             = (known after apply)
      �[32m+�[0m�[0m api_key_required   = false
      �[32m+�[0m�[0m authorization_type = "NONE"
      �[32m+�[0m�[0m id                 = (known after apply)
      �[32m+�[0m�[0m route_key          = "POST /send-email"
      �[32m+�[0m�[0m target             = (known after apply)
    }

�[1m  # module.api_gateway.aws_apigatewayv2_stage.this[0]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_apigatewayv2_stage" "this" {
      �[32m+�[0m�[0m api_id        = (known after apply)
      �[32m+�[0m�[0m arn           = (known after apply)
      �[32m+�[0m�[0m auto_deploy   = true
      �[32m+�[0m�[0m deployment_id = (known after apply)
      �[32m+�[0m�[0m execution_arn = (known after apply)
      �[32m+�[0m�[0m id            = (known after apply)
      �[32m+�[0m�[0m invoke_url    = (known after apply)
      �[32m+�[0m�[0m name          = "preview"
      �[32m+�[0m�[0m tags          = {
          �[32m+�[0m�[0m "Service" = "email_service"
        }
      �[32m+�[0m�[0m tags_all      = {
          �[32m+�[0m�[0m "Environment" = "preview"
          �[32m+�[0m�[0m "Project"     = "AWS Educate TPET"
          �[32m+�[0m�[0m "Service"     = "email_service"
          �[32m+�[0m�[0m "Terraform"   = "true"
        }

      �[32m+�[0m�[0m access_log_settings {
          �[32m+�[0m�[0m destination_arn = (known after apply)
          �[32m+�[0m�[0m format          = jsonencode(
                {
                  �[32m+�[0m�[0m context = {
                      �[32m+�[0m�[0m domainName              = "$context.domainName"
                      �[32m+�[0m�[0m error                   = {
                          �[32m+�[0m�[0m message      = "$context.error.message"
                          �[32m+�[0m�[0m responseType = "$context.error.responseType"
                        }
                      �[32m+�[0m�[0m identity                = {
                          �[32m+�[0m�[0m sourceIP = "$context.identity.sourceIp"
                        }
                      �[32m+�[0m�[0m integration             = {
                          �[32m+�[0m�[0m error             = "$context.integration.error"
                          �[32m+�[0m�[0m integrationStatus = "$context.integration.integrationStatus"
                        }
                      �[32m+�[0m�[0m integrationErrorMessage = "$context.integrationErrorMessage"
                      �[32m+�[0m�[0m protocol                = "$context.protocol"
                      �[32m+�[0m�[0m requestId               = "$context.requestId"
                      �[32m+�[0m�[0m requestTime             = "$context.requestTime"
                      �[32m+�[0m�[0m responseLength          = "$context.responseLength"
                      �[32m+�[0m�[0m routeKey                = "$context.routeKey"
                      �[32m+�[0m�[0m stage                   = "$context.stage"
                      �[32m+�[0m�[0m status                  = "$context.status"
                    }
                }
            )
        }

      �[32m+�[0m�[0m default_route_settings {
          �[32m+�[0m�[0m data_trace_enabled       = false
          �[32m+�[0m�[0m detailed_metrics_enabled = true
          �[32m+�[0m�[0m logging_level            = (known after apply)
          �[32m+�[0m�[0m throttling_burst_limit   = 100
          �[32m+�[0m�[0m throttling_rate_limit    = 100
        }

      �[32m+�[0m�[0m route_settings {
          �[32m+�[0m�[0m data_trace_enabled       = false
          �[32m+�[0m�[0m detailed_metrics_enabled = true
          �[32m+�[0m�[0m logging_level            = (known after apply)
          �[32m+�[0m�[0m route_key                = "$default"
          �[32m+�[0m�[0m throttling_burst_limit   = 100
          �[32m+�[0m�[0m throttling_rate_limit    = 100
        }
      �[32m+�[0m�[0m route_settings {
          �[32m+�[0m�[0m data_trace_enabled       = false
          �[32m+�[0m�[0m detailed_metrics_enabled = true
          �[32m+�[0m�[0m logging_level            = (known after apply)
          �[32m+�[0m�[0m route_key                = "POST /send-email"
          �[32m+�[0m�[0m throttling_burst_limit   = 40
          �[32m+�[0m�[0m throttling_rate_limit    = 80
        }
    }

�[1m  # module.api_gateway.aws_cloudwatch_log_group.this["this"]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_cloudwatch_log_group" "this" {
      �[32m+�[0m�[0m arn               = (known after apply)
      �[32m+�[0m�[0m id                = (known after apply)
      �[32m+�[0m�[0m log_group_class   = (known after apply)
      �[32m+�[0m�[0m name              = "/aws/apigateway/preview-email_service/preview"
      �[32m+�[0m�[0m name_prefix       = (known after apply)
      �[32m+�[0m�[0m retention_in_days = 7
      �[32m+�[0m�[0m skip_destroy      = false
      �[32m+�[0m�[0m tags              = {
          �[32m+�[0m�[0m "Service" = "email_service"
        }
      �[32m+�[0m�[0m tags_all          = {
          �[32m+�[0m�[0m "Environment" = "preview"
          �[32m+�[0m�[0m "Project"     = "AWS Educate TPET"
          �[32m+�[0m�[0m "Service"     = "email_service"
          �[32m+�[0m�[0m "Terraform"   = "true"
        }
    }

�[1m  # module.docker_image.aws_ecr_lifecycle_policy.this[0]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_ecr_lifecycle_policy" "this" {
      �[32m+�[0m�[0m id          = (known after apply)
      �[32m+�[0m�[0m policy      = jsonencode(
            {
              �[32m+�[0m�[0m rules = [
                  �[32m+�[0m�[0m {
                      �[32m+�[0m�[0m action       = {
                          �[32m+�[0m�[0m type = "expire"
                        }
                      �[32m+�[0m�[0m description  = "Keep only the last 10 images"
                      �[32m+�[0m�[0m rulePriority = 1
                      �[32m+�[0m�[0m selection    = {
                          �[32m+�[0m�[0m countNumber = 10
                          �[32m+�[0m�[0m countType   = "imageCountMoreThan"
                          �[32m+�[0m�[0m tagStatus   = "any"
                        }
                    },
                ]
            }
        )
      �[32m+�[0m�[0m registry_id = (known after apply)
      �[32m+�[0m�[0m repository  = (known after apply)
    }

�[1m  # module.docker_image.aws_ecr_repository.this[0]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_ecr_repository" "this" {
      �[32m+�[0m�[0m arn                  = (known after apply)
      �[32m+�[0m�[0m force_delete         = true
      �[32m+�[0m�[0m id                   = (known after apply)
      �[32m+�[0m�[0m image_tag_mutability = "MUTABLE"
      �[32m+�[0m�[0m name                 = (known after apply)
      �[32m+�[0m�[0m registry_id          = (known after apply)
      �[32m+�[0m�[0m repository_url       = (known after apply)
      �[32m+�[0m�[0m tags_all             = {
          �[32m+�[0m�[0m "Environment" = "preview"
          �[32m+�[0m�[0m "Project"     = "AWS Educate TPET"
          �[32m+�[0m�[0m "Terraform"   = "true"
        }

      �[32m+�[0m�[0m image_scanning_configuration {
          �[32m+�[0m�[0m scan_on_push = false
        }
    }

�[1m  # module.docker_image.docker_image.this�[0m will be created
�[0m  �[32m+�[0m�[0m resource "docker_image" "this" {
      �[32m+�[0m�[0m force_remove = false
      �[32m+�[0m�[0m id           = (known after apply)
      �[32m+�[0m�[0m image_id     = (known after apply)
      �[32m+�[0m�[0m keep_locally = false
      �[32m+�[0m�[0m name         = (known after apply)
      �[32m+�[0m�[0m repo_digest  = (known after apply)
      �[32m+�[0m�[0m triggers     = {
          �[32m+�[0m�[0m "dir_sha" = "aaccd972a5e2791f08b966ef5fec997999986d70"
        }

      �[32m+�[0m�[0m build {
          �[32m+�[0m�[0m cache_from     = []
          �[32m+�[0m�[0m context        = "./../send_email/"
          �[32m+�[0m�[0m dockerfile     = "Dockerfile"
          �[32m+�[0m�[0m extra_hosts    = []
          �[32m+�[0m�[0m remove         = true
          �[32m+�[0m�[0m security_opt   = []
          �[32m+�[0m�[0m tag            = []
            �[90m# (11 unchanged attributes hidden)�[0m�[0m
        }
    }

�[1m  # module.docker_image.docker_registry_image.this�[0m will be created
�[0m  �[32m+�[0m�[0m resource "docker_registry_image" "this" {
      �[32m+�[0m�[0m id                   = (known after apply)
      �[32m+�[0m�[0m insecure_skip_verify = false
      �[32m+�[0m�[0m keep_remotely        = true
      �[32m+�[0m�[0m name                 = (known after apply)
      �[32m+�[0m�[0m sha256_digest        = (known after apply)
      �[32m+�[0m�[0m triggers             = {
          �[32m+�[0m�[0m "dir_sha" = "aaccd972a5e2791f08b966ef5fec997999986d70"
        }
    }

�[1m  # module.send_email_lambda.data.aws_iam_policy_document.logs[0]�[0m will be read during apply
  # (config refers to values not yet known)
�[0m �[36m<=�[0m�[0m data "aws_iam_policy_document" "logs" {
      �[32m+�[0m�[0m id            = (known after apply)
      �[32m+�[0m�[0m json          = (known after apply)
      �[32m+�[0m�[0m minified_json = (known after apply)

      �[32m+�[0m�[0m statement {
          �[32m+�[0m�[0m actions   = [
              �[32m+�[0m�[0m "logs:CreateLogGroup",
              �[32m+�[0m�[0m "logs:CreateLogStream",
              �[32m+�[0m�[0m "logs:PutLogEvents",
            ]
          �[32m+�[0m�[0m effect    = "Allow"
          �[32m+�[0m�[0m resources = (known after apply)
        }
    }

�[1m  # module.send_email_lambda.aws_cloudwatch_log_group.lambda[0]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_cloudwatch_log_group" "lambda" {
      �[32m+�[0m�[0m arn               = (known after apply)
      �[32m+�[0m�[0m id                = (known after apply)
      �[32m+�[0m�[0m log_group_class   = (known after apply)
      �[32m+�[0m�[0m name              = (known after apply)
      �[32m+�[0m�[0m name_prefix       = (known after apply)
      �[32m+�[0m�[0m retention_in_days = 0
      �[32m+�[0m�[0m skip_destroy      = false
      �[32m+�[0m�[0m tags              = {
          �[32m+�[0m�[0m "Environment" = "preview"
          �[32m+�[0m�[0m "Service"     = "email_service"
          �[32m+�[0m�[0m "Terraform"   = "true"
        }
      �[32m+�[0m�[0m tags_all          = {
          �[32m+�[0m�[0m "Environment" = "preview"
          �[32m+�[0m�[0m "Project"     = "AWS Educate TPET"
          �[32m+�[0m�[0m "Service"     = "email_service"
          �[32m+�[0m�[0m "Terraform"   = "true"
        }
    }

�[1m  # module.send_email_lambda.aws_iam_policy.additional_inline[0]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_iam_policy" "additional_inline" {
      �[32m+�[0m�[0m arn              = (known after apply)
      �[32m+�[0m�[0m attachment_count = (known after apply)
      �[32m+�[0m�[0m id               = (known after apply)
      �[32m+�[0m�[0m name             = (known after apply)
      �[32m+�[0m�[0m name_prefix      = (known after apply)
      �[32m+�[0m�[0m path             = "/"
      �[32m+�[0m�[0m policy           = jsonencode(
            {
              �[32m+�[0m�[0m Statement = [
                  �[32m+�[0m�[0m {
                      �[32m+�[0m�[0m Action   = [
                          �[32m+�[0m�[0m "dynamodb:UpdateItem",
                          �[32m+�[0m�[0m "dynamodb:Scan",
                          �[32m+�[0m�[0m "dynamodb:Query",
                          �[32m+�[0m�[0m "dynamodb:PutItem",
                          �[32m+�[0m�[0m "dynamodb:GetItem",
                          �[32m+�[0m�[0m "dynamodb:DeleteItem",
                          �[32m+�[0m�[0m "dynamodb:BatchWriteItem",
                          �[32m+�[0m�[0m "dynamodb:BatchGetItem",
                        ]
                      �[32m+�[0m�[0m Effect   = "Allow"
                      �[32m+�[0m�[0m Resource = "arn:aws:dynamodb:us-west-1:070576557102:table/email"
                      �[32m+�[0m�[0m Sid      = "dynamodbcrud"
                    },
                  �[32m+�[0m�[0m {
                      �[32m+�[0m�[0m Action   = [
                          �[32m+�[0m�[0m "ses:SendRawEmail",
                          �[32m+�[0m�[0m "ses:SendEmail",
                        ]
                      �[32m+�[0m�[0m Effect   = "Allow"
                      �[32m+�[0m�[0m Resource = "arn:aws:ses:ap-northeast-1:070576557102:identity/awseducate.cloudambassador@gmail.com"
                      �[32m+�[0m�[0m Sid      = "sessendemail"
                    },
                ]
              �[32m+�[0m�[0m Version   = "2012-10-17"
            }
        )
      �[32m+�[0m�[0m policy_id        = (known after apply)
      �[32m+�[0m�[0m tags             = {
          �[32m+�[0m�[0m "Environment" = "preview"
          �[32m+�[0m�[0m "Service"     = "email_service"
          �[32m+�[0m�[0m "Terraform"   = "true"
        }
      �[32m+�[0m�[0m tags_all         = {
          �[32m+�[0m�[0m "Environment" = "preview"
          �[32m+�[0m�[0m "Project"     = "AWS Educate TPET"
          �[32m+�[0m�[0m "Service"     = "email_service"
          �[32m+�[0m�[0m "Terraform"   = "true"
        }
    }

�[1m  # module.send_email_lambda.aws_iam_policy.logs[0]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_iam_policy" "logs" {
      �[32m+�[0m�[0m arn              = (known after apply)
      �[32m+�[0m�[0m attachment_count = (known after apply)
      �[32m+�[0m�[0m id               = (known after apply)
      �[32m+�[0m�[0m name             = (known after apply)
      �[32m+�[0m�[0m name_prefix      = (known after apply)
      �[32m+�[0m�[0m path             = "/"
      �[32m+�[0m�[0m policy           = (known after apply)
      �[32m+�[0m�[0m policy_id        = (known after apply)
      �[32m+�[0m�[0m tags             = {
          �[32m+�[0m�[0m "Environment" = "preview"
          �[32m+�[0m�[0m "Service"     = "email_service"
          �[32m+�[0m�[0m "Terraform"   = "true"
        }
      �[32m+�[0m�[0m tags_all         = {
          �[32m+�[0m�[0m "Environment" = "preview"
          �[32m+�[0m�[0m "Project"     = "AWS Educate TPET"
          �[32m+�[0m�[0m "Service"     = "email_service"
          �[32m+�[0m�[0m "Terraform"   = "true"
        }
    }

�[1m  # module.send_email_lambda.aws_iam_role.lambda[0]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_iam_role" "lambda" {
      �[32m+�[0m�[0m arn                   = (known after apply)
      �[32m+�[0m�[0m assume_role_policy    = jsonencode(
            {
              �[32m+�[0m�[0m Statement = [
                  �[32m+�[0m�[0m {
                      �[32m+�[0m�[0m Action    = "sts:AssumeRole"
                      �[32m+�[0m�[0m Effect    = "Allow"
                      �[32m+�[0m�[0m Principal = {
                          �[32m+�[0m�[0m Service = "lambda.amazonaws.com"
                        }
                    },
                ]
              �[32m+�[0m�[0m Version   = "2012-10-17"
            }
        )
      �[32m+�[0m�[0m create_date           = (known after apply)
      �[32m+�[0m�[0m force_detach_policies = true
      �[32m+�[0m�[0m id                    = (known after apply)
      �[32m+�[0m�[0m managed_policy_arns   = (known after apply)
      �[32m+�[0m�[0m max_session_duration  = 3600
      �[32m+�[0m�[0m name                  = (known after apply)
      �[32m+�[0m�[0m name_prefix           = (known after apply)
      �[32m+�[0m�[0m path                  = "/"
      �[32m+�[0m�[0m tags                  = {
          �[32m+�[0m�[0m "Environment" = "preview"
          �[32m+�[0m�[0m "Service"     = "email_service"
          �[32m+�[0m�[0m "Terraform"   = "true"
        }
      �[32m+�[0m�[0m tags_all              = {
          �[32m+�[0m�[0m "Environment" = "preview"
          �[32m+�[0m�[0m "Project"     = "AWS Educate TPET"
          �[32m+�[0m�[0m "Service"     = "email_service"
          �[32m+�[0m�[0m "Terraform"   = "true"
        }
      �[32m+�[0m�[0m unique_id             = (known after apply)
    }

�[1m  # module.send_email_lambda.aws_iam_role_policy_attachment.additional_inline[0]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_iam_role_policy_attachment" "additional_inline" {
      �[32m+�[0m�[0m id         = (known after apply)
      �[32m+�[0m�[0m policy_arn = (known after apply)
      �[32m+�[0m�[0m role       = (known after apply)
    }

�[1m  # module.send_email_lambda.aws_iam_role_policy_attachment.logs[0]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_iam_role_policy_attachment" "logs" {
      �[32m+�[0m�[0m id         = (known after apply)
      �[32m+�[0m�[0m policy_arn = (known after apply)
      �[32m+�[0m�[0m role       = (known after apply)
    }

�[1m  # module.send_email_lambda.aws_lambda_function.this[0]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_lambda_function" "this" {
      �[32m+�[0m�[0m architectures                  = [
          �[32m+�[0m�[0m "x86_64",
        ]
      �[32m+�[0m�[0m arn                            = (known after apply)
      �[32m+�[0m�[0m code_sha256                    = (known after apply)
      �[32m+�[0m�[0m description                    = "AWS Educate TPET email-service in preview: POST /send-email"
      �[32m+�[0m�[0m function_name                  = (known after apply)
      �[32m+�[0m�[0m id                             = (known after apply)
      �[32m+�[0m�[0m image_uri                      = (known after apply)
      �[32m+�[0m�[0m invoke_arn                     = (known after apply)
      �[32m+�[0m�[0m last_modified                  = (known after apply)
      �[32m+�[0m�[0m memory_size                    = 128
      �[32m+�[0m�[0m package_type                   = "Image"
      �[32m+�[0m�[0m publish                        = true
      �[32m+�[0m�[0m qualified_arn                  = (known after apply)
      �[32m+�[0m�[0m qualified_invoke_arn           = (known after apply)
      �[32m+�[0m�[0m reserved_concurrent_executions = -1
      �[32m+�[0m�[0m role                           = (known after apply)
      �[32m+�[0m�[0m signing_job_arn                = (known after apply)
      �[32m+�[0m�[0m signing_profile_version_arn    = (known after apply)
      �[32m+�[0m�[0m skip_destroy                   = false
      �[32m+�[0m�[0m source_code_hash               = (known after apply)
      �[32m+�[0m�[0m source_code_size               = (known after apply)
      �[32m+�[0m�[0m tags                           = {
          �[32m+�[0m�[0m "Environment"           = "preview"
          �[32m+�[0m�[0m "Service"               = "email_service"
          �[32m+�[0m�[0m "Terraform"             = "true"
          �[32m+�[0m�[0m "terraform-aws-modules" = "lambda"
        }
      �[32m+�[0m�[0m tags_all                       = {
          �[32m+�[0m�[0m "Environment"           = "preview"
          �[32m+�[0m�[0m "Project"               = "AWS Educate TPET"
          �[32m+�[0m�[0m "Service"               = "email_service"
          �[32m+�[0m�[0m "Terraform"             = "true"
          �[32m+�[0m�[0m "terraform-aws-modules" = "lambda"
        }
      �[32m+�[0m�[0m timeout                        = 300
      �[32m+�[0m�[0m version                        = (known after apply)

      �[32m+�[0m�[0m environment {
          �[32m+�[0m�[0m variables = {
              �[32m+�[0m�[0m "BUCKET_NAME"    = "preview-aws-educate-tpet-storage"
              �[32m+�[0m�[0m "DYNAMODB_TABLE" = "email"
              �[32m+�[0m�[0m "ENVIRONMENT"    = "preview"
              �[32m+�[0m�[0m "SERVICE"        = "email_service"
            }
        }

      �[32m+�[0m�[0m ephemeral_storage {
          �[32m+�[0m�[0m size = 512
        }

      �[32m+�[0m�[0m logging_config {
          �[32m+�[0m�[0m log_format = "Text"
          �[32m+�[0m�[0m log_group  = (known after apply)
        }
    }

�[1m  # module.send_email_lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromAPIGateway"]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_lambda_permission" "current_version_triggers" {
      �[32m+�[0m�[0m action              = "lambda:InvokeFunction"
      �[32m+�[0m�[0m function_name       = (known after apply)
      �[32m+�[0m�[0m id                  = (known after apply)
      �[32m+�[0m�[0m principal           = "apigateway.amazonaws.com"
      �[32m+�[0m�[0m qualifier           = (known after apply)
      �[32m+�[0m�[0m source_arn          = (known after apply)
      �[32m+�[0m�[0m statement_id        = (known after apply)
      �[32m+�[0m�[0m statement_id_prefix = "AllowExecutionFromAPIGateway"
    }

�[1m  # module.send_email_lambda.aws_lambda_permission.unqualified_alias_triggers["AllowExecutionFromAPIGateway"]�[0m will be created
�[0m  �[32m+�[0m�[0m resource "aws_lambda_permission" "unqualified_alias_triggers" {
      �[32m+�[0m�[0m action              = "lambda:InvokeFunction"
      �[32m+�[0m�[0m function_name       = (known after apply)
      �[32m+�[0m�[0m id                  = (known after apply)
      �[32m+�[0m�[0m principal           = "apigateway.amazonaws.com"
      �[32m+�[0m�[0m source_arn          = (known after apply)
      �[32m+�[0m�[0m statement_id        = (known after apply)
      �[32m+�[0m�[0m statement_id_prefix = "AllowExecutionFromAPIGateway"
    }

�[1mPlan:�[0m 25 to add, 0 to change, 0 to destroy.
�[0m�[0m�[1mrandom_string.this: Creating...�[0m�[0m
�[0m�[1mrandom_string.this: Creation complete after 0s [id=ujvo]�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_api.this[0]: Creating...�[0m�[0m
�[0m�[1mmodule.docker_image.aws_ecr_repository.this[0]: Creating...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.aws_iam_policy.additional_inline[0]: Creating...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.aws_iam_role.lambda[0]: Creating...�[0m�[0m
�[0m�[1mmodule.api_gateway.aws_cloudwatch_log_group.this["this"]: Creating...�[0m�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_domain_name.this[0]: Creating...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.aws_cloudwatch_log_group.lambda[0]: Creating...�[0m�[0m
�[0m�[1maws_dynamodb_table.email: Creating...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.aws_iam_policy.additional_inline[0]: Creation complete after 0s [id=arn:aws:iam::070576557102:policy/preview-email_service-send_email-ujvo-inline]�[0m
�[0m�[1mmodule.send_email_lambda.aws_iam_role.lambda[0]: Creation complete after 0s [id=preview-email_service-send_email-ujvo]�[0m
�[0m�[1mmodule.send_email_lambda.aws_iam_role_policy_attachment.additional_inline[0]: Creating...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.aws_iam_role_policy_attachment.additional_inline[0]: Creation complete after 0s [id=preview-email_service-send_email-ujvo-20240707124834320900000001]�[0m
�[0m�[1mmodule.send_email_lambda.aws_cloudwatch_log_group.lambda[0]: Creation complete after 1s [id=/aws/lambda/preview-email_service-send_email-ujvo]�[0m
�[0m�[1mmodule.send_email_lambda.data.aws_iam_policy_document.logs[0]: Reading...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.data.aws_iam_policy_document.logs[0]: Read complete after 0s [id=3326641184]�[0m
�[0m�[1mmodule.send_email_lambda.aws_iam_policy.logs[0]: Creating...�[0m�[0m
�[0m�[1mmodule.api_gateway.aws_cloudwatch_log_group.this["this"]: Creation complete after 1s [id=/aws/apigateway/preview-email_service/preview]�[0m
�[0m�[1mmodule.docker_image.aws_ecr_repository.this[0]: Creation complete after 1s [id=preview-email_service-send_email-ujvo]�[0m
�[0m�[1mmodule.docker_image.aws_ecr_lifecycle_policy.this[0]: Creating...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.aws_iam_policy.logs[0]: Creation complete after 0s [id=arn:aws:iam::070576557102:policy/preview-email_service-send_email-ujvo-logs]�[0m
�[0m�[1mmodule.docker_image.docker_image.this: Creating...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.aws_iam_role_policy_attachment.logs[0]: Creating...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.aws_iam_role_policy_attachment.logs[0]: Creation complete after 0s [id=preview-email_service-send_email-ujvo-20240707124834752600000002]�[0m
�[0m�[1mmodule.docker_image.aws_ecr_lifecycle_policy.this[0]: Creation complete after 0s [id=preview-email_service-send_email-ujvo]�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_api.this[0]: Creation complete after 1s [id=q6w94gdbw6]�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_domain_name.this[0]: Creation complete after 1s [id=preview-email-service-internal-api-tpet.awseducate.systems]�[0m
�[0m�[1maws_route53_record.api_gateway_custom_domain_record: Creating...�[0m�[0m
�[0m�[1maws_dynamodb_table.email: Still creating... [10s elapsed]�[0m�[0m
�[0m�[1mmodule.docker_image.docker_image.this: Still creating... [10s elapsed]�[0m�[0m
�[0m�[1maws_route53_record.api_gateway_custom_domain_record: Still creating... [10s elapsed]�[0m�[0m
�[0m�[1maws_dynamodb_table.email: Creation complete after 14s [id=email]�[0m
�[0m�[1mmodule.docker_image.docker_image.this: Still creating... [20s elapsed]�[0m�[0m
�[0m�[1mmodule.docker_image.docker_image.this: Creation complete after 20s [id=sha256:af31cab2c4441f533e37090bd05c230d98ca9859340fa6ba032b6f99b7e8beb2070576557102.dkr.ecr.us-west-1.amazonaws.com/preview-email_service-send_email-ujvo]�[0m
�[0m�[1maws_route53_record.api_gateway_custom_domain_record: Still creating... [20s elapsed]�[0m�[0m
�[0m�[1mmodule.docker_image.docker_registry_image.this: Creating...�[0m�[0m
�[0m�[1maws_route53_record.api_gateway_custom_domain_record: Still creating... [30s elapsed]�[0m�[0m
�[0m�[1mmodule.docker_image.docker_registry_image.this: Still creating... [10s elapsed]�[0m�[0m
�[0m�[1maws_route53_record.api_gateway_custom_domain_record: Still creating... [40s elapsed]�[0m�[0m
�[0m�[1mmodule.docker_image.docker_registry_image.this: Still creating... [20s elapsed]�[0m�[0m
�[0m�[1mmodule.docker_image.docker_registry_image.this: Creation complete after 20s [id=sha256:287eb13733aef221e92622ebcb0887f3afd16404294fe00847a7f23a48d551a5]�[0m
�[0m�[1mmodule.send_email_lambda.aws_lambda_function.this[0]: Creating...�[0m�[0m
�[0m�[1maws_route53_record.api_gateway_custom_domain_record: Still creating... [50s elapsed]�[0m�[0m
�[0m�[1mmodule.send_email_lambda.aws_lambda_function.this[0]: Still creating... [10s elapsed]�[0m�[0m
�[0m�[1maws_route53_record.api_gateway_custom_domain_record: Creation complete after 56s [id=Z00402303DMA4KDX72AUO_preview-email-service-internal-api-tpet.awseducate.systems_A]�[0m
�[0m�[1mmodule.send_email_lambda.aws_lambda_function.this[0]: Still creating... [20s elapsed]�[0m�[0m
�[0m�[1mmodule.send_email_lambda.aws_lambda_function.this[0]: Creation complete after 30s [id=preview-email_service-send_email-ujvo]�[0m
�[0m�[1mmodule.send_email_lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromAPIGateway"]: Creating...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.aws_lambda_permission.unqualified_alias_triggers["AllowExecutionFromAPIGateway"]: Creating...�[0m�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_integration.this["POST /send-email"]: Creating...�[0m�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_integration.this["$default"]: Creating...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.aws_lambda_permission.unqualified_alias_triggers["AllowExecutionFromAPIGateway"]: Creation complete after 0s [id=AllowExecutionFromAPIGateway20240707124947232100000003]�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_integration.this["$default"]: Creation complete after 1s [id=zm36lwq]�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_integration.this["POST /send-email"]: Creation complete after 1s [id=sdgasn4]�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_route.this["POST /send-email"]: Creating...�[0m�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_route.this["$default"]: Creating...�[0m�[0m
�[0m�[1mmodule.send_email_lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromAPIGateway"]: Creation complete after 1s [id=AllowExecutionFromAPIGateway20240707124947232500000004]�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_route.this["$default"]: Creation complete after 0s [id=u8um3z9]�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_route.this["POST /send-email"]: Creation complete after 0s [id=4t2ugej]�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_stage.this[0]: Creating...�[0m�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_stage.this[0]: Creation complete after 1s [id=preview]�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_api_mapping.this[0]: Creating...�[0m�[0m
�[0m�[1mmodule.api_gateway.aws_apigatewayv2_api_mapping.this[0]: Creation complete after 0s [id=e3582f]�[0m
�[0m�[1m�[32m
Apply complete! Resources: 25 added, 0 changed, 0 destroyed.
�[0m

Pushed by: @sh1un, Action: pull_request

@sh1un sh1un merged commit 9588a73 into dev Jul 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant