mongulu-cm / mtchoun-mouh

Notification platform for passport delivrance for Cameroon consulate at Marseille(France)
https://mtchoun-mouh.mongulu.cm/
GNU General Public License v3.0
4 stars 2 forks source link

refactor(#106): use textractor to simplify code #186

Closed billmetangmo closed 2 months ago

billmetangmo commented 2 months ago

106

infracost[bot] commented 2 months ago

💰 Infracost report

Monthly estimate generated

This comment will be updated when code changes.

github-actions[bot] commented 2 months ago

💰 Infracost report

Monthly estimate generated

This comment will be updated when code changes.

billmetangmo commented 2 months ago

:x: Plan Failed

CI link

Error: error configuring Terraform AWS Provider: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid.
    status code: 403, request id: e2ffb78b-5e0d-407d-ae82-a45f691b17f7

   with provider["registry.terraform.io/hashicorp/aws"],
   on config.tf line 10, in provider "aws":
   10: provider "aws" {

Operation failed: failed running terraform plan (exit 1)
billmetangmo commented 2 months ago

:x: Plan Failed

CI link

Error: error configuring Terraform AWS Provider: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid.
    status code: 403, request id: c9ddc2e5-9342-4d0f-a793-ab40eff5191c

   with provider["registry.terraform.io/hashicorp/aws"],
   on config.tf line 10, in provider "aws":
   10: provider "aws" {

Operation failed: failed running terraform plan (exit 1)
billmetangmo commented 2 months ago

:x: Plan Failed

CI link

Error: error configuring Terraform AWS Provider: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid.
    status code: 403, request id: afcdba18-6c40-4af6-b47e-7d68d67857f7

   with provider["registry.terraform.io/hashicorp/aws"],
   on config.tf line 10, in provider "aws":
   10: provider "aws" {

Operation failed: failed running terraform plan (exit 1)
billmetangmo commented 2 months ago

Plan Result

CI link

Plan: 26 to add, 0 to change, 0 to destroy.
Change Result (Click me) ```hcl # aws_api_gateway_deployment.test will be created + resource "aws_api_gateway_deployment" "test" { + created_date = (known after apply) + execution_arn = (known after apply) + id = (known after apply) + invoke_url = (known after apply) + rest_api_id = (known after apply) + stage_name = "mtchoun-mouh-refactor-use-textractor-dev" } # aws_api_gateway_integration.integration will be created + resource "aws_api_gateway_integration" "integration" { + cache_namespace = (known after apply) + connection_type = "INTERNET" + http_method = "POST" + id = (known after apply) + integration_http_method = "POST" + passthrough_behavior = (known after apply) + resource_id = (known after apply) + rest_api_id = (known after apply) + timeout_milliseconds = 29000 + type = "AWS_PROXY" + uri = (known after apply) } # aws_api_gateway_method.method will be created + resource "aws_api_gateway_method" "method" { + api_key_required = false + authorization = "NONE" + http_method = "POST" + id = (known after apply) + resource_id = (known after apply) + rest_api_id = (known after apply) } # aws_api_gateway_method_response.method_response_200 will be created + resource "aws_api_gateway_method_response" "method_response_200" { + http_method = "POST" + id = (known after apply) + resource_id = (known after apply) + response_parameters = { + "method.response.header.Access-Control-Allow-Headers" = true + "method.response.header.Access-Control-Allow-Methods" = false + "method.response.header.Access-Control-Allow-Origin" = true } + rest_api_id = (known after apply) + status_code = "200" } # aws_api_gateway_resource.resource will be created + resource "aws_api_gateway_resource" "resource" { + id = (known after apply) + parent_id = (known after apply) + path = (known after apply) + path_part = "register" + rest_api_id = (known after apply) } # aws_api_gateway_rest_api.api will be created + resource "aws_api_gateway_rest_api" "api" { + api_key_source = (known after apply) + arn = (known after apply) + binary_media_types = (known after apply) + created_date = (known after apply) + description = "Allow to register user for sending notifications later" + disable_execute_api_endpoint = (known after apply) + execution_arn = (known after apply) + id = (known after apply) + minimum_compression_size = -1 + name = "mtchoun-mouh-refactor-use-textractor-user registration" + policy = (known after apply) + root_resource_id = (known after apply) + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + endpoint_configuration { + types = [ + "REGIONAL", ] + vpc_endpoint_ids = (known after apply) } } # aws_cloudwatch_event_rule.scheduler will be created + resource "aws_cloudwatch_event_rule" "scheduler" { + arn = (known after apply) + description = "extract image - verify passport is out - send notifications" + event_bus_name = "default" + id = (known after apply) + is_enabled = true + name = "mtchoun-mouh-refactor-use-textractor-trigger_user_scan" + name_prefix = (known after apply) + schedule_expression = "cron(0 8 ? * MON-FRI *)" + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } } # aws_cloudwatch_event_target.target will be created + resource "aws_cloudwatch_event_target" "target" { + arn = (known after apply) + event_bus_name = "default" + id = (known after apply) + rule = "mtchoun-mouh-refactor-use-textractor-trigger_user_scan" + target_id = "lambda" } # aws_dynamodb_table.Link_table will be created + resource "aws_dynamodb_table" "Link_table" { + arn = (known after apply) + billing_mode = "PROVISIONED" + hash_key = "link" + id = (known after apply) + name = "mtchoun-mouh-refactor-use-textractor-Link_table" + read_capacity = 1 + stream_arn = (known after apply) + stream_label = (known after apply) + stream_view_type = (known after apply) + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + write_capacity = 1 + attribute { + name = "link" + type = "S" } + point_in_time_recovery { + enabled = false } + server_side_encryption (known after apply) } # aws_dynamodb_table.Register will be created + resource "aws_dynamodb_table" "Register" { + arn = (known after apply) + billing_mode = "PROVISIONED" + hash_key = "Name" + id = (known after apply) + name = "mtchoun-mouh-refactor-use-textractor-Register" + read_capacity = 1 + stream_arn = (known after apply) + stream_label = (known after apply) + stream_view_type = (known after apply) + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + write_capacity = 1 + attribute { + name = "Name" + type = "S" } + point_in_time_recovery { + enabled = false } + server_side_encryption (known after apply) } # aws_dynamodb_table.Users will be created + resource "aws_dynamodb_table" "Users" { + arn = (known after apply) + billing_mode = "PROVISIONED" + hash_key = "UserName" + id = (known after apply) + name = "mtchoun-mouh-refactor-use-textractor-Users" + read_capacity = 1 + stream_arn = (known after apply) + stream_label = (known after apply) + stream_view_type = (known after apply) + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + write_capacity = 1 + attribute { + name = "UserName" + type = "S" } + point_in_time_recovery { + enabled = false } + server_side_encryption (known after apply) } # aws_lambda_function.lambda will be created + resource "aws_lambda_function" "lambda" { + arn = (known after apply) + filename = "api/lambda.zip" + function_name = "mtchoun-mouh-refactor-use-textractor-user_registration_consulcam" + handler = "lambda.register_handler" + id = (known after apply) + invoke_arn = (known after apply) + last_modified = (known after apply) + layers = (known after apply) + memory_size = 128 + package_type = "Zip" + publish = false + qualified_arn = (known after apply) + reserved_concurrent_executions = -1 + role = "arn:aws:iam::053932140667:role/website-deployer" + runtime = "python3.8" + signing_job_arn = (known after apply) + signing_profile_version_arn = (known after apply) + source_code_hash = "of7pAxdRTKqmNZNATcBDtGsyqo8r6K8OJ1gB2tNi6qQ=" + source_code_size = (known after apply) + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + timeout = 10 + version = (known after apply) + environment { + variables = { + "API_KEY" = (sensitive value) + "BUCKET_NAME" = "mtchoun-mouh-refactor-use-textractor-djansang" + "ENV" = "mtchoun-mouh-refactor-use-textractor" + "LINKS_TABLE" = "mtchoun-mouh-refactor-use-textractor-Link_table" + "MAINTAINER_MAIL" = (sensitive value) + "REGION" = "eu-central-1" + "REGISTERS_TABLE" = "mtchoun-mouh-refactor-use-textractor-Register" + "SENTRY_DNS" = (sensitive value) + "USERS_TABLE" = "mtchoun-mouh-refactor-use-textractor-Users" } } + tracing_config (known after apply) } # aws_lambda_function.scan will be created + resource "aws_lambda_function" "scan" { + arn = (known after apply) + filename = "api/lambda.zip" + function_name = "mtchoun-mouh-refactor-use-textractor-scan_user_consulcam" + handler = "lambda.scan_handler" + id = (known after apply) + invoke_arn = (known after apply) + last_modified = (known after apply) + memory_size = 128 + package_type = "Zip" + publish = false + qualified_arn = (known after apply) + reserved_concurrent_executions = -1 + role = "arn:aws:iam::053932140667:role/website-deployer" + runtime = "python3.8" + signing_job_arn = (known after apply) + signing_profile_version_arn = (known after apply) + source_code_hash = "of7pAxdRTKqmNZNATcBDtGsyqo8r6K8OJ1gB2tNi6qQ=" + source_code_size = (known after apply) + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + timeout = 900 + version = (known after apply) + environment { + variables = { + "API_KEY" = (sensitive value) + "BUCKET_NAME" = "mtchoun-mouh-refactor-use-textractor-djansang" + "ENV" = "mtchoun-mouh-refactor-use-textractor" + "LINKS_TABLE" = "mtchoun-mouh-refactor-use-textractor-Link_table" + "MAINTAINER_MAIL" = (sensitive value) + "REGION" = "eu-central-1" + "REGISTERS_TABLE" = "mtchoun-mouh-refactor-use-textractor-Register" + "SENTRY_DNS" = (sensitive value) + "USERS_TABLE" = "mtchoun-mouh-refactor-use-textractor-Users" } } + tracing_config (known after apply) } # aws_lambda_layer_version.test_lambda_layer will be created + resource "aws_lambda_layer_version" "test_lambda_layer" { + arn = (known after apply) + compatible_runtimes = [ + "python3.7", + "python3.8", ] + created_date = (known after apply) + filename = "make_lamda_layer/python.zip" + id = (known after apply) + layer_arn = (known after apply) + layer_name = "test_lambda_layer" + signing_job_arn = (known after apply) + signing_profile_version_arn = (known after apply) + source_code_hash = (known after apply) + source_code_size = (known after apply) + version = (known after apply) } # aws_lambda_permission.allow_cloudwatch_to_call_check_foo will be created + resource "aws_lambda_permission" "allow_cloudwatch_to_call_check_foo" { + action = "lambda:InvokeFunction" + function_name = "mtchoun-mouh-refactor-use-textractor-scan_user_consulcam" + id = (known after apply) + principal = "events.amazonaws.com" + source_arn = (known after apply) + statement_id = "AllowExecutionFromCloudWatch" } # aws_lambda_permission.apigw_lambda will be created + resource "aws_lambda_permission" "apigw_lambda" { + action = "lambda:InvokeFunction" + function_name = "mtchoun-mouh-refactor-use-textractor-user_registration_consulcam" + id = (known after apply) + principal = "apigateway.amazonaws.com" + source_arn = (known after apply) + statement_id = "AllowExecutionFromAPIGateway" } # aws_s3_bucket.images will be created + resource "aws_s3_bucket" "images" { + acceleration_status = (known after apply) + acl = "private" + arn = (known after apply) + bucket = "mtchoun-mouh-refactor-use-textractor-djansang" + 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 = { + "Name" = "images" + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "Name" = "images" + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + website_domain = (known after apply) + website_endpoint = (known after apply) + versioning (known after apply) } # aws_s3_bucket.website will be created + resource "aws_s3_bucket" "website" { + acceleration_status = (known after apply) + acl = "private" + arn = (known after apply) + bucket = "mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm" + 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 = { + "Name" = "Website" + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "Name" = "Website" + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + website_domain = (known after apply) + website_endpoint = (known after apply) + cors_rule { + allowed_headers = [ + "*", ] + allowed_methods = [ + "PUT", + "POST", + "GET", ] + allowed_origins = [ + "*", ] } + versioning (known after apply) + website { + error_document = "error.html" + index_document = "index.html" } } # aws_s3_bucket_object.example_file will be created + resource "aws_s3_bucket_object" "example_file" { + acl = "private" + bucket = (known after apply) + bucket_key_enabled = (known after apply) + content_type = "text/html" + etag = (known after apply) + force_destroy = false + id = (known after apply) + key = "index.html" + kms_key_id = (known after apply) + server_side_encryption = (known after apply) + source = "../html/index.html" + storage_class = (known after apply) + tags_all = (known after apply) + version_id = (known after apply) } # aws_s3_bucket_policy.website will be created + resource "aws_s3_bucket_policy" "website" { + bucket = (known after apply) + id = (known after apply) + policy = (known after apply) } # aws_s3_bucket_public_access_block.website will be created + resource "aws_s3_bucket_public_access_block" "website" { + block_public_acls = false + block_public_policy = false + bucket = (known after apply) + id = (known after apply) + ignore_public_acls = false + restrict_public_buckets = false } # local_file.index_page will be created + resource "local_file" "index_page" { + content = (sensitive value) + content_base64sha256 = (known after apply) + content_base64sha512 = (known after apply) + content_md5 = (known after apply) + content_sha1 = (known after apply) + content_sha256 = (known after apply) + content_sha512 = (known after apply) + directory_permission = "0777" + file_permission = "0777" + filename = "../html/index.html" + id = (known after apply) } # module.cors.aws_api_gateway_integration._ will be created + resource "aws_api_gateway_integration" "_" { + cache_namespace = (known after apply) + connection_type = "INTERNET" + content_handling = "CONVERT_TO_TEXT" + http_method = "OPTIONS" + id = (known after apply) + passthrough_behavior = (known after apply) + request_templates = { + "application/json" = jsonencode( { + statusCode = 200 } ) } + resource_id = (known after apply) + rest_api_id = (known after apply) + timeout_milliseconds = 29000 + type = "MOCK" } # module.cors.aws_api_gateway_integration_response._ will be created + resource "aws_api_gateway_integration_response" "_" { + http_method = "OPTIONS" + id = (known after apply) + resource_id = (known after apply) + response_parameters = { + "method.response.header.Access-Control-Allow-Headers" = "'Authorization,Content-Type,X-Amz-Date,X-Amz-Security-Token,X-Api-Key'" + "method.response.header.Access-Control-Allow-Methods" = "'OPTIONS,HEAD,GET,POST,PUT,PATCH,DELETE'" + "method.response.header.Access-Control-Allow-Origin" = "'*'" + "method.response.header.Access-Control-Max-Age" = "'7200'" } + rest_api_id = (known after apply) + status_code = "200" } # module.cors.aws_api_gateway_method._ will be created + resource "aws_api_gateway_method" "_" { + api_key_required = false + authorization = "NONE" + http_method = "OPTIONS" + id = (known after apply) + resource_id = (known after apply) + rest_api_id = (known after apply) } # module.cors.aws_api_gateway_method_response._ will be created + resource "aws_api_gateway_method_response" "_" { + http_method = "OPTIONS" + id = (known after apply) + resource_id = (known after apply) + response_models = { + "application/json" = "Empty" } + response_parameters = { + "method.response.header.Access-Control-Allow-Headers" = true + "method.response.header.Access-Control-Allow-Methods" = true + "method.response.header.Access-Control-Allow-Origin" = true + "method.response.header.Access-Control-Max-Age" = true } + rest_api_id = (known after apply) + status_code = "200" } Plan: 26 to add, 0 to change, 0 to destroy. Changes to Outputs: + register_table = "mtchoun-mouh-refactor-use-textractor-Register" + stage_url = (known after apply) + website_url = (known after apply) ```
billmetangmo commented 2 months ago

:white_check_mark: Apply Succeeded

CI link

Apply complete! Resources: 26 added, 0 changed, 0 destroyed.
Details (Click me) ```hcl Running apply in the remote backend. Output will stream here. Pressing Ctrl-C will cancel the remote apply if it's still pending. If the apply started it will stop streaming the logs, but will not stop the apply running remotely. Preparing the remote apply... To view this run in a browser, visit: https://app.terraform.io/app/tfc-mongulu-cm/mtchoun-mouh-refactor-use-textractor/runs/run-dYC1QLgACXavXv4B Waiting for the plan to start... Terraform v1.9.5 on linux_amd64 Initializing plugins and modules... data.archive_file.lambda_zip: Reading... data.archive_file.lambda_zip: Read complete after 0s [id=9f63f84720c46d30d2530a098ff2453f5ead5088] data.aws_caller_identity.current: Reading... data.aws_iam_role.role: Reading... data.aws_caller_identity.current: Read complete after 0s [id=053932140667] data.aws_iam_role.role: Read complete after 0s [id=website-deployer] Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # aws_api_gateway_deployment.test will be created + resource "aws_api_gateway_deployment" "test" { + created_date = (known after apply) + execution_arn = (known after apply) + id = (known after apply) + invoke_url = (known after apply) + rest_api_id = (known after apply) + stage_name = "mtchoun-mouh-refactor-use-textractor-dev" } # aws_api_gateway_integration.integration will be created + resource "aws_api_gateway_integration" "integration" { + cache_namespace = (known after apply) + connection_type = "INTERNET" + http_method = "POST" + id = (known after apply) + integration_http_method = "POST" + passthrough_behavior = (known after apply) + resource_id = (known after apply) + rest_api_id = (known after apply) + timeout_milliseconds = 29000 + type = "AWS_PROXY" + uri = (known after apply) } # aws_api_gateway_method.method will be created + resource "aws_api_gateway_method" "method" { + api_key_required = false + authorization = "NONE" + http_method = "POST" + id = (known after apply) + resource_id = (known after apply) + rest_api_id = (known after apply) } # aws_api_gateway_method_response.method_response_200 will be created + resource "aws_api_gateway_method_response" "method_response_200" { + http_method = "POST" + id = (known after apply) + resource_id = (known after apply) + response_parameters = { + "method.response.header.Access-Control-Allow-Headers" = true + "method.response.header.Access-Control-Allow-Methods" = false + "method.response.header.Access-Control-Allow-Origin" = true } + rest_api_id = (known after apply) + status_code = "200" } # aws_api_gateway_resource.resource will be created + resource "aws_api_gateway_resource" "resource" { + id = (known after apply) + parent_id = (known after apply) + path = (known after apply) + path_part = "register" + rest_api_id = (known after apply) } # aws_api_gateway_rest_api.api will be created + resource "aws_api_gateway_rest_api" "api" { + api_key_source = (known after apply) + arn = (known after apply) + binary_media_types = (known after apply) + created_date = (known after apply) + description = "Allow to register user for sending notifications later" + disable_execute_api_endpoint = (known after apply) + execution_arn = (known after apply) + id = (known after apply) + minimum_compression_size = -1 + name = "mtchoun-mouh-refactor-use-textractor-user registration" + policy = (known after apply) + root_resource_id = (known after apply) + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + endpoint_configuration { + types = [ + "REGIONAL", ] + vpc_endpoint_ids = (known after apply) } } # aws_cloudwatch_event_rule.scheduler will be created + resource "aws_cloudwatch_event_rule" "scheduler" { + arn = (known after apply) + description = "extract image - verify passport is out - send notifications" + event_bus_name = "default" + id = (known after apply) + is_enabled = true + name = "mtchoun-mouh-refactor-use-textractor-trigger_user_scan" + name_prefix = (known after apply) + schedule_expression = "cron(0 8 ? * MON-FRI *)" + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } } # aws_cloudwatch_event_target.target will be created + resource "aws_cloudwatch_event_target" "target" { + arn = (known after apply) + event_bus_name = "default" + id = (known after apply) + rule = "mtchoun-mouh-refactor-use-textractor-trigger_user_scan" + target_id = "lambda" } # aws_dynamodb_table.Link_table will be created + resource "aws_dynamodb_table" "Link_table" { + arn = (known after apply) + billing_mode = "PROVISIONED" + hash_key = "link" + id = (known after apply) + name = "mtchoun-mouh-refactor-use-textractor-Link_table" + read_capacity = 1 + stream_arn = (known after apply) + stream_label = (known after apply) + stream_view_type = (known after apply) + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + write_capacity = 1 + attribute { + name = "link" + type = "S" } + point_in_time_recovery { + enabled = false } + server_side_encryption (known after apply) } # aws_dynamodb_table.Register will be created + resource "aws_dynamodb_table" "Register" { + arn = (known after apply) + billing_mode = "PROVISIONED" + hash_key = "Name" + id = (known after apply) + name = "mtchoun-mouh-refactor-use-textractor-Register" + read_capacity = 1 + stream_arn = (known after apply) + stream_label = (known after apply) + stream_view_type = (known after apply) + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + write_capacity = 1 + attribute { + name = "Name" + type = "S" } + point_in_time_recovery { + enabled = false } + server_side_encryption (known after apply) } # aws_dynamodb_table.Users will be created + resource "aws_dynamodb_table" "Users" { + arn = (known after apply) + billing_mode = "PROVISIONED" + hash_key = "UserName" + id = (known after apply) + name = "mtchoun-mouh-refactor-use-textractor-Users" + read_capacity = 1 + stream_arn = (known after apply) + stream_label = (known after apply) + stream_view_type = (known after apply) + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + write_capacity = 1 + attribute { + name = "UserName" + type = "S" } + point_in_time_recovery { + enabled = false } + server_side_encryption (known after apply) } # aws_lambda_function.lambda will be created + resource "aws_lambda_function" "lambda" { + arn = (known after apply) + filename = "api/lambda.zip" + function_name = "mtchoun-mouh-refactor-use-textractor-user_registration_consulcam" + handler = "lambda.register_handler" + id = (known after apply) + invoke_arn = (known after apply) + last_modified = (known after apply) + layers = (known after apply) + memory_size = 128 + package_type = "Zip" + publish = false + qualified_arn = (known after apply) + reserved_concurrent_executions = -1 + role = "arn:aws:iam::053932140667:role/website-deployer" + runtime = "python3.8" + signing_job_arn = (known after apply) + signing_profile_version_arn = (known after apply) + source_code_hash = "of7pAxdRTKqmNZNATcBDtGsyqo8r6K8OJ1gB2tNi6qQ=" + source_code_size = (known after apply) + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + timeout = 10 + version = (known after apply) + environment { + variables = { + "API_KEY" = (sensitive value) + "BUCKET_NAME" = "mtchoun-mouh-refactor-use-textractor-djansang" + "ENV" = "mtchoun-mouh-refactor-use-textractor" + "LINKS_TABLE" = "mtchoun-mouh-refactor-use-textractor-Link_table" + "MAINTAINER_MAIL" = (sensitive value) + "REGION" = "eu-central-1" + "REGISTERS_TABLE" = "mtchoun-mouh-refactor-use-textractor-Register" + "SENTRY_DNS" = (sensitive value) + "USERS_TABLE" = "mtchoun-mouh-refactor-use-textractor-Users" } } + tracing_config (known after apply) } # aws_lambda_function.scan will be created + resource "aws_lambda_function" "scan" { + arn = (known after apply) + filename = "api/lambda.zip" + function_name = "mtchoun-mouh-refactor-use-textractor-scan_user_consulcam" + handler = "lambda.scan_handler" + id = (known after apply) + invoke_arn = (known after apply) + last_modified = (known after apply) + memory_size = 128 + package_type = "Zip" + publish = false + qualified_arn = (known after apply) + reserved_concurrent_executions = -1 + role = "arn:aws:iam::053932140667:role/website-deployer" + runtime = "python3.8" + signing_job_arn = (known after apply) + signing_profile_version_arn = (known after apply) + source_code_hash = "of7pAxdRTKqmNZNATcBDtGsyqo8r6K8OJ1gB2tNi6qQ=" + source_code_size = (known after apply) + tags = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + timeout = 900 + version = (known after apply) + environment { + variables = { + "API_KEY" = (sensitive value) + "BUCKET_NAME" = "mtchoun-mouh-refactor-use-textractor-djansang" + "ENV" = "mtchoun-mouh-refactor-use-textractor" + "LINKS_TABLE" = "mtchoun-mouh-refactor-use-textractor-Link_table" + "MAINTAINER_MAIL" = (sensitive value) + "REGION" = "eu-central-1" + "REGISTERS_TABLE" = "mtchoun-mouh-refactor-use-textractor-Register" + "SENTRY_DNS" = (sensitive value) + "USERS_TABLE" = "mtchoun-mouh-refactor-use-textractor-Users" } } + tracing_config (known after apply) } # aws_lambda_layer_version.test_lambda_layer will be created + resource "aws_lambda_layer_version" "test_lambda_layer" { + arn = (known after apply) + compatible_runtimes = [ + "python3.7", + "python3.8", ] + created_date = (known after apply) + filename = "make_lamda_layer/python.zip" + id = (known after apply) + layer_arn = (known after apply) + layer_name = "test_lambda_layer" + signing_job_arn = (known after apply) + signing_profile_version_arn = (known after apply) + source_code_hash = (known after apply) + source_code_size = (known after apply) + version = (known after apply) } # aws_lambda_permission.allow_cloudwatch_to_call_check_foo will be created + resource "aws_lambda_permission" "allow_cloudwatch_to_call_check_foo" { + action = "lambda:InvokeFunction" + function_name = "mtchoun-mouh-refactor-use-textractor-scan_user_consulcam" + id = (known after apply) + principal = "events.amazonaws.com" + source_arn = (known after apply) + statement_id = "AllowExecutionFromCloudWatch" } # aws_lambda_permission.apigw_lambda will be created + resource "aws_lambda_permission" "apigw_lambda" { + action = "lambda:InvokeFunction" + function_name = "mtchoun-mouh-refactor-use-textractor-user_registration_consulcam" + id = (known after apply) + principal = "apigateway.amazonaws.com" + source_arn = (known after apply) + statement_id = "AllowExecutionFromAPIGateway" } # aws_s3_bucket.images will be created + resource "aws_s3_bucket" "images" { + acceleration_status = (known after apply) + acl = "private" + arn = (known after apply) + bucket = "mtchoun-mouh-refactor-use-textractor-djansang" + 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 = { + "Name" = "images" + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "Name" = "images" + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + website_domain = (known after apply) + website_endpoint = (known after apply) + versioning (known after apply) } # aws_s3_bucket.website will be created + resource "aws_s3_bucket" "website" { + acceleration_status = (known after apply) + acl = "private" + arn = (known after apply) + bucket = "mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm" + 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 = { + "Name" = "Website" + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + tags_all = { + "Name" = "Website" + "environment" = "mtchoun-mouh-master" + "project" = "mtchoun-mouh" } + website_domain = (known after apply) + website_endpoint = (known after apply) + cors_rule { + allowed_headers = [ + "*", ] + allowed_methods = [ + "PUT", + "POST", + "GET", ] + allowed_origins = [ + "*", ] } + versioning (known after apply) + website { + error_document = "error.html" + index_document = "index.html" } } # aws_s3_bucket_object.example_file will be created + resource "aws_s3_bucket_object" "example_file" { + acl = "private" + bucket = (known after apply) + bucket_key_enabled = (known after apply) + content_type = "text/html" + etag = (known after apply) + force_destroy = false + id = (known after apply) + key = "index.html" + kms_key_id = (known after apply) + server_side_encryption = (known after apply) + source = "../html/index.html" + storage_class = (known after apply) + tags_all = (known after apply) + version_id = (known after apply) } # aws_s3_bucket_policy.website will be created + resource "aws_s3_bucket_policy" "website" { + bucket = (known after apply) + id = (known after apply) + policy = (known after apply) } # aws_s3_bucket_public_access_block.website will be created + resource "aws_s3_bucket_public_access_block" "website" { + block_public_acls = false + block_public_policy = false + bucket = (known after apply) + id = (known after apply) + ignore_public_acls = false + restrict_public_buckets = false } # local_file.index_page will be created + resource "local_file" "index_page" { + content = (sensitive value) + content_base64sha256 = (known after apply) + content_base64sha512 = (known after apply) + content_md5 = (known after apply) + content_sha1 = (known after apply) + content_sha256 = (known after apply) + content_sha512 = (known after apply) + directory_permission = "0777" + file_permission = "0777" + filename = "../html/index.html" + id = (known after apply) } # module.cors.aws_api_gateway_integration._ will be created + resource "aws_api_gateway_integration" "_" { + cache_namespace = (known after apply) + connection_type = "INTERNET" + content_handling = "CONVERT_TO_TEXT" + http_method = "OPTIONS" + id = (known after apply) + passthrough_behavior = (known after apply) + request_templates = { + "application/json" = jsonencode( { + statusCode = 200 } ) } + resource_id = (known after apply) + rest_api_id = (known after apply) + timeout_milliseconds = 29000 + type = "MOCK" } # module.cors.aws_api_gateway_integration_response._ will be created + resource "aws_api_gateway_integration_response" "_" { + http_method = "OPTIONS" + id = (known after apply) + resource_id = (known after apply) + response_parameters = { + "method.response.header.Access-Control-Allow-Headers" = "'Authorization,Content-Type,X-Amz-Date,X-Amz-Security-Token,X-Api-Key'" + "method.response.header.Access-Control-Allow-Methods" = "'OPTIONS,HEAD,GET,POST,PUT,PATCH,DELETE'" + "method.response.header.Access-Control-Allow-Origin" = "'*'" + "method.response.header.Access-Control-Max-Age" = "'7200'" } + rest_api_id = (known after apply) + status_code = "200" } # module.cors.aws_api_gateway_method._ will be created + resource "aws_api_gateway_method" "_" { + api_key_required = false + authorization = "NONE" + http_method = "OPTIONS" + id = (known after apply) + resource_id = (known after apply) + rest_api_id = (known after apply) } # module.cors.aws_api_gateway_method_response._ will be created + resource "aws_api_gateway_method_response" "_" { + http_method = "OPTIONS" + id = (known after apply) + resource_id = (known after apply) + response_models = { + "application/json" = "Empty" } + response_parameters = { + "method.response.header.Access-Control-Allow-Headers" = true + "method.response.header.Access-Control-Allow-Methods" = true + "method.response.header.Access-Control-Allow-Origin" = true + "method.response.header.Access-Control-Max-Age" = true } + rest_api_id = (known after apply) + status_code = "200" } Plan: 26 to add, 0 to change, 0 to destroy. Changes to Outputs: + register_table = "mtchoun-mouh-refactor-use-textractor-Register" + stage_url = (known after apply) + website_url = (known after apply) ------------------------------------------------------------------------ Cost estimation: Resources: 3 of 5 estimated $1.74096/mo +$1.74096 ------------------------------------------------------------------------ aws_lambda_layer_version.test_lambda_layer: Creating... aws_api_gateway_rest_api.api: Creating... aws_cloudwatch_event_rule.scheduler: Creating... aws_dynamodb_table.Link_table: Creating... aws_dynamodb_table.Users: Creating... aws_lambda_function.scan: Creating... aws_dynamodb_table.Register: Creating... aws_s3_bucket.website: Creating... aws_s3_bucket.images: Creating... aws_cloudwatch_event_rule.scheduler: Creation complete after 2s [id=mtchoun-mouh-refactor-use-textractor-trigger_user_scan] aws_api_gateway_rest_api.api: Creation complete after 2s [id=ihfbm9blp1] aws_api_gateway_resource.resource: Creating... aws_api_gateway_resource.resource: Creation complete after 0s [id=spl6ny] module.cors.aws_api_gateway_method._: Creating... aws_api_gateway_method.method: Creating... module.cors.aws_api_gateway_method._: Creation complete after 1s [id=agm-ihfbm9blp1-spl6ny-OPTIONS] module.cors.aws_api_gateway_method_response._: Creating... module.cors.aws_api_gateway_integration._: Creating... aws_api_gateway_method.method: Creation complete after 1s [id=agm-ihfbm9blp1-spl6ny-POST] aws_api_gateway_method_response.method_response_200: Creating... module.cors.aws_api_gateway_method_response._: Creation complete after 0s [id=agmr-ihfbm9blp1-spl6ny-OPTIONS-200] module.cors.aws_api_gateway_integration._: Creation complete after 0s [id=agi-ihfbm9blp1-spl6ny-OPTIONS] module.cors.aws_api_gateway_integration_response._: Creating... aws_api_gateway_method_response.method_response_200: Creation complete after 0s [id=agmr-ihfbm9blp1-spl6ny-POST-200] module.cors.aws_api_gateway_integration_response._: Creation complete after 1s [id=agir-ihfbm9blp1-spl6ny-OPTIONS-200] aws_dynamodb_table.Register: Creation complete after 7s [id=mtchoun-mouh-refactor-use-textractor-Register] aws_s3_bucket.images: Creation complete after 7s [id=mtchoun-mouh-refactor-use-textractor-djansang] aws_lambda_function.scan: Creation complete after 7s [id=mtchoun-mouh-refactor-use-textractor-scan_user_consulcam] aws_lambda_permission.allow_cloudwatch_to_call_check_foo: Creating... aws_cloudwatch_event_target.target: Creating... aws_lambda_permission.allow_cloudwatch_to_call_check_foo: Creation complete after 1s [id=AllowExecutionFromCloudWatch] aws_s3_bucket.website: Creation complete after 8s [id=mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm] aws_s3_bucket_public_access_block.website: Creating... aws_cloudwatch_event_target.target: Creation complete after 1s [id=mtchoun-mouh-refactor-use-textractor-trigger_user_scan-lambda] aws_s3_bucket_public_access_block.website: Creation complete after 1s [id=mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm] aws_s3_bucket_policy.website: Creating... aws_s3_bucket_policy.website: Creation complete after 1s [id=mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm] aws_dynamodb_table.Link_table: Creation complete after 10s [id=mtchoun-mouh-refactor-use-textractor-Link_table] aws_lambda_layer_version.test_lambda_layer: Still creating... [10s elapsed] aws_dynamodb_table.Users: Still creating... [10s elapsed] aws_dynamodb_table.Users: Creation complete after 11s [id=mtchoun-mouh-refactor-use-textractor-Users] aws_lambda_layer_version.test_lambda_layer: Creation complete after 11s [id=arn:aws:lambda:eu-central-1:053932140667:layer:test_lambda_layer:5] aws_lambda_function.lambda: Creating... aws_lambda_function.lambda: Creation complete after 9s [id=mtchoun-mouh-refactor-use-textractor-user_registration_consulcam] aws_api_gateway_integration.integration: Creating... aws_lambda_permission.apigw_lambda: Creating... aws_api_gateway_integration.integration: Creation complete after 0s [id=agi-ihfbm9blp1-spl6ny-POST] aws_api_gateway_deployment.test: Creating... aws_lambda_permission.apigw_lambda: Creation complete after 0s [id=AllowExecutionFromAPIGateway] aws_api_gateway_deployment.test: Creation complete after 1s [id=dgv6dg] local_file.index_page: Creating... local_file.index_page: Creation complete after 0s [id=572e00d735b8577939cb9ec2de85ffe55d375db6] aws_s3_bucket_object.example_file: Creating... aws_s3_bucket_object.example_file: Creation complete after 1s [id=index.html] Apply complete! Resources: 26 added, 0 changed, 0 destroyed. Outputs: register_table = "mtchoun-mouh-refactor-use-textractor-Register" stage_url = "https://ihfbm9blp1.execute-api.eu-central-1.amazonaws.com/mtchoun-mouh-refactor-use-textractor-dev" website_url = "http://mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm.s3-website.eu-central-1.amazonaws.com" ```
tsafacjo commented 2 months ago

@billmetangmo hahah No one approves his PR. But good job , the code is more modular !

billmetangmo commented 2 months ago

Plan Result

CI link

Plan: 1 to add, 4 to change, 0 to destroy.
Change Result (Click me) ```hcl # aws_lambda_function.lambda will be updated in-place ~ resource "aws_lambda_function" "lambda" { id = "mtchoun-mouh-refactor-use-textractor-user_registration_consulcam" ~ last_modified = "2024-08-30T13:44:44.906+0000" -> (known after apply) ~ source_code_hash = "of7pAxdRTKqmNZNATcBDtGsyqo8r6K8OJ1gB2tNi6qQ=" -> "aG/693OgtesclFbtQG3JpowPoOxVEki6ETbi5wlrhnw=" tags = { "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (23 unchanged attributes hidden) # (2 unchanged blocks hidden) } # aws_lambda_function.scan will be updated in-place ~ resource "aws_lambda_function" "scan" { id = "mtchoun-mouh-refactor-use-textractor-scan_user_consulcam" ~ last_modified = "2024-08-30T13:44:33.940+0000" -> (known after apply) ~ source_code_hash = "of7pAxdRTKqmNZNATcBDtGsyqo8r6K8OJ1gB2tNi6qQ=" -> "aG/693OgtesclFbtQG3JpowPoOxVEki6ETbi5wlrhnw=" tags = { "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (23 unchanged attributes hidden) # (2 unchanged blocks hidden) } # aws_s3_bucket.images will be updated in-place ~ resource "aws_s3_bucket" "images" { id = "mtchoun-mouh-refactor-use-textractor-djansang" tags = { "Name" = "images" "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (11 unchanged attributes hidden) - server_side_encryption_configuration { - rule { - bucket_key_enabled = false -> null - apply_server_side_encryption_by_default { - sse_algorithm = "AES256" -> null # (1 unchanged attribute hidden) } } } # (1 unchanged block hidden) } # aws_s3_bucket.website will be updated in-place ~ resource "aws_s3_bucket" "website" { id = "mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm" tags = { "Name" = "Website" "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (13 unchanged attributes hidden) - server_side_encryption_configuration { - rule { - bucket_key_enabled = false -> null - apply_server_side_encryption_by_default { - sse_algorithm = "AES256" -> null # (1 unchanged attribute hidden) } } } # (3 unchanged blocks hidden) } # local_file.index_page will be created + resource "local_file" "index_page" { + content = (sensitive value) + content_base64sha256 = (known after apply) + content_base64sha512 = (known after apply) + content_md5 = (known after apply) + content_sha1 = (known after apply) + content_sha256 = (known after apply) + content_sha512 = (known after apply) + directory_permission = "0777" + file_permission = "0777" + filename = "../html/index.html" + id = (known after apply) } Plan: 1 to add, 4 to change, 0 to destroy. ```
billmetangmo commented 2 months ago

:white_check_mark: Apply Succeeded

CI link

Apply complete! Resources: 1 added, 4 changed, 0 destroyed.
Details (Click me) ```hcl Running apply in the remote backend. Output will stream here. Pressing Ctrl-C will cancel the remote apply if it's still pending. If the apply started it will stop streaming the logs, but will not stop the apply running remotely. Preparing the remote apply... To view this run in a browser, visit: https://app.terraform.io/app/tfc-mongulu-cm/mtchoun-mouh-refactor-use-textractor/runs/run-ypPLYPjSP4MuxTA3 Waiting for the plan to start... Terraform v1.9.5 on linux_amd64 Initializing plugins and modules... data.archive_file.lambda_zip: Reading... data.archive_file.lambda_zip: Read complete after 0s [id=a302387976ce74579a87a903dcc6149f70895053] data.aws_iam_role.role: Reading... aws_cloudwatch_event_rule.scheduler: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-trigger_user_scan] data.aws_caller_identity.current: Reading... aws_lambda_layer_version.test_lambda_layer: Refreshing state... [id=arn:aws:lambda:eu-central-1:053932140667:layer:test_lambda_layer:5] aws_api_gateway_rest_api.api: Refreshing state... [id=ihfbm9blp1] aws_dynamodb_table.Users: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-Users] aws_dynamodb_table.Register: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-Register] aws_s3_bucket.images: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-djansang] aws_s3_bucket.website: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm] aws_dynamodb_table.Link_table: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-Link_table] data.aws_caller_identity.current: Read complete after 0s [id=053932140667] data.aws_iam_role.role: Read complete after 0s [id=website-deployer] aws_lambda_function.scan: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-scan_user_consulcam] aws_lambda_function.lambda: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-user_registration_consulcam] aws_api_gateway_resource.resource: Refreshing state... [id=spl6ny] aws_api_gateway_method.method: Refreshing state... [id=agm-ihfbm9blp1-spl6ny-POST] module.cors.aws_api_gateway_method._: Refreshing state... [id=agm-ihfbm9blp1-spl6ny-OPTIONS] aws_lambda_permission.allow_cloudwatch_to_call_check_foo: Refreshing state... [id=AllowExecutionFromCloudWatch] aws_cloudwatch_event_target.target: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-trigger_user_scan-lambda] aws_api_gateway_method_response.method_response_200: Refreshing state... [id=agmr-ihfbm9blp1-spl6ny-POST-200] aws_lambda_permission.apigw_lambda: Refreshing state... [id=AllowExecutionFromAPIGateway] aws_api_gateway_integration.integration: Refreshing state... [id=agi-ihfbm9blp1-spl6ny-POST] module.cors.aws_api_gateway_method_response._: Refreshing state... [id=agmr-ihfbm9blp1-spl6ny-OPTIONS-200] module.cors.aws_api_gateway_integration._: Refreshing state... [id=agi-ihfbm9blp1-spl6ny-OPTIONS] aws_api_gateway_deployment.test: Refreshing state... [id=dgv6dg] module.cors.aws_api_gateway_integration_response._: Refreshing state... [id=agir-ihfbm9blp1-spl6ny-OPTIONS-200] local_file.index_page: Refreshing state... [id=572e00d735b8577939cb9ec2de85ffe55d375db6] aws_s3_bucket_public_access_block.website: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm] aws_s3_bucket_object.example_file: Refreshing state... [id=index.html] aws_s3_bucket_policy.website: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm] Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create ~ update in-place Terraform will perform the following actions: # aws_lambda_function.lambda will be updated in-place ~ resource "aws_lambda_function" "lambda" { id = "mtchoun-mouh-refactor-use-textractor-user_registration_consulcam" ~ last_modified = "2024-08-30T13:44:44.906+0000" -> (known after apply) ~ source_code_hash = "of7pAxdRTKqmNZNATcBDtGsyqo8r6K8OJ1gB2tNi6qQ=" -> "aG/693OgtesclFbtQG3JpowPoOxVEki6ETbi5wlrhnw=" tags = { "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (23 unchanged attributes hidden) # (2 unchanged blocks hidden) } # aws_lambda_function.scan will be updated in-place ~ resource "aws_lambda_function" "scan" { id = "mtchoun-mouh-refactor-use-textractor-scan_user_consulcam" ~ last_modified = "2024-08-30T13:44:33.940+0000" -> (known after apply) ~ source_code_hash = "of7pAxdRTKqmNZNATcBDtGsyqo8r6K8OJ1gB2tNi6qQ=" -> "aG/693OgtesclFbtQG3JpowPoOxVEki6ETbi5wlrhnw=" tags = { "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (23 unchanged attributes hidden) # (2 unchanged blocks hidden) } # aws_s3_bucket.images will be updated in-place ~ resource "aws_s3_bucket" "images" { id = "mtchoun-mouh-refactor-use-textractor-djansang" tags = { "Name" = "images" "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (11 unchanged attributes hidden) - server_side_encryption_configuration { - rule { - bucket_key_enabled = false -> null - apply_server_side_encryption_by_default { - sse_algorithm = "AES256" -> null # (1 unchanged attribute hidden) } } } # (1 unchanged block hidden) } # aws_s3_bucket.website will be updated in-place ~ resource "aws_s3_bucket" "website" { id = "mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm" tags = { "Name" = "Website" "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (13 unchanged attributes hidden) - server_side_encryption_configuration { - rule { - bucket_key_enabled = false -> null - apply_server_side_encryption_by_default { - sse_algorithm = "AES256" -> null # (1 unchanged attribute hidden) } } } # (3 unchanged blocks hidden) } # local_file.index_page will be created + resource "local_file" "index_page" { + content = (sensitive value) + content_base64sha256 = (known after apply) + content_base64sha512 = (known after apply) + content_md5 = (known after apply) + content_sha1 = (known after apply) + content_sha256 = (known after apply) + content_sha512 = (known after apply) + directory_permission = "0777" + file_permission = "0777" + filename = "../html/index.html" + id = (known after apply) } Plan: 1 to add, 4 to change, 0 to destroy. ------------------------------------------------------------------------ Cost estimation: Resources: 3 of 5 estimated $1.74096/mo +$0.0 ------------------------------------------------------------------------ aws_lambda_function.lambda: Modifying... [id=mtchoun-mouh-refactor-use-textractor-user_registration_consulcam] aws_s3_bucket.images: Modifying... [id=mtchoun-mouh-refactor-use-textractor-djansang] aws_lambda_function.scan: Modifying... [id=mtchoun-mouh-refactor-use-textractor-scan_user_consulcam] aws_s3_bucket.website: Modifying... [id=mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm] aws_lambda_function.lambda: Modifications complete after 2s [id=mtchoun-mouh-refactor-use-textractor-user_registration_consulcam] local_file.index_page: Creating... local_file.index_page: Creation complete after 0s [id=572e00d735b8577939cb9ec2de85ffe55d375db6] aws_lambda_function.scan: Modifications complete after 3s [id=mtchoun-mouh-refactor-use-textractor-scan_user_consulcam] aws_s3_bucket.images: Modifications complete after 5s [id=mtchoun-mouh-refactor-use-textractor-djansang] aws_s3_bucket.website: Modifications complete after 6s [id=mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm] Apply complete! Resources: 1 added, 4 changed, 0 destroyed. Outputs: register_table = "mtchoun-mouh-refactor-use-textractor-Register" stage_url = "https://ihfbm9blp1.execute-api.eu-central-1.amazonaws.com/mtchoun-mouh-refactor-use-textractor-dev" website_url = "http://mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm.s3-website.eu-central-1.amazonaws.com" ```
billmetangmo commented 2 months ago

Plan Result

CI link

Plan: 1 to add, 4 to change, 0 to destroy.
Change Result (Click me) ```hcl # aws_lambda_function.lambda will be updated in-place ~ resource "aws_lambda_function" "lambda" { id = "mtchoun-mouh-refactor-use-textractor-user_registration_consulcam" tags = { "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (25 unchanged attributes hidden) ~ environment { ~ variables = { ~ "MAINTAINER_MAIL" = (sensitive value) # (8 unchanged elements hidden) } } # (1 unchanged block hidden) } # aws_lambda_function.scan will be updated in-place ~ resource "aws_lambda_function" "scan" { id = "mtchoun-mouh-refactor-use-textractor-scan_user_consulcam" tags = { "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (25 unchanged attributes hidden) ~ environment { ~ variables = { ~ "MAINTAINER_MAIL" = (sensitive value) # (8 unchanged elements hidden) } } # (1 unchanged block hidden) } # aws_s3_bucket.images will be updated in-place ~ resource "aws_s3_bucket" "images" { id = "mtchoun-mouh-refactor-use-textractor-djansang" tags = { "Name" = "images" "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (11 unchanged attributes hidden) - server_side_encryption_configuration { - rule { - bucket_key_enabled = false -> null - apply_server_side_encryption_by_default { - sse_algorithm = "AES256" -> null # (1 unchanged attribute hidden) } } } # (1 unchanged block hidden) } # aws_s3_bucket.website will be updated in-place ~ resource "aws_s3_bucket" "website" { id = "mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm" tags = { "Name" = "Website" "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (13 unchanged attributes hidden) - server_side_encryption_configuration { - rule { - bucket_key_enabled = false -> null - apply_server_side_encryption_by_default { - sse_algorithm = "AES256" -> null # (1 unchanged attribute hidden) } } } # (3 unchanged blocks hidden) } # local_file.index_page will be created + resource "local_file" "index_page" { + content = (sensitive value) + content_base64sha256 = (known after apply) + content_base64sha512 = (known after apply) + content_md5 = (known after apply) + content_sha1 = (known after apply) + content_sha256 = (known after apply) + content_sha512 = (known after apply) + directory_permission = "0777" + file_permission = "0777" + filename = "../html/index.html" + id = (known after apply) } Plan: 1 to add, 4 to change, 0 to destroy. ```
billmetangmo commented 2 months ago

:white_check_mark: Apply Succeeded

CI link

Apply complete! Resources: 1 added, 4 changed, 0 destroyed.
Details (Click me) ```hcl Running apply in the remote backend. Output will stream here. Pressing Ctrl-C will cancel the remote apply if it's still pending. If the apply started it will stop streaming the logs, but will not stop the apply running remotely. Preparing the remote apply... To view this run in a browser, visit: https://app.terraform.io/app/tfc-mongulu-cm/mtchoun-mouh-refactor-use-textractor/runs/run-BGhK4WWPgNmfUGzK Waiting for the plan to start... Terraform v1.9.5 on linux_amd64 Initializing plugins and modules... data.archive_file.lambda_zip: Reading... data.archive_file.lambda_zip: Read complete after 0s [id=a302387976ce74579a87a903dcc6149f70895053] data.aws_iam_role.role: Reading... data.aws_caller_identity.current: Reading... aws_dynamodb_table.Register: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-Register] aws_api_gateway_rest_api.api: Refreshing state... [id=ihfbm9blp1] aws_lambda_layer_version.test_lambda_layer: Refreshing state... [id=arn:aws:lambda:eu-central-1:053932140667:layer:test_lambda_layer:5] aws_dynamodb_table.Users: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-Users] aws_cloudwatch_event_rule.scheduler: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-trigger_user_scan] aws_dynamodb_table.Link_table: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-Link_table] aws_s3_bucket.website: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm] aws_s3_bucket.images: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-djansang] data.aws_caller_identity.current: Read complete after 0s [id=053932140667] data.aws_iam_role.role: Read complete after 0s [id=website-deployer] aws_lambda_function.scan: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-scan_user_consulcam] aws_lambda_function.lambda: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-user_registration_consulcam] aws_api_gateway_resource.resource: Refreshing state... [id=spl6ny] aws_api_gateway_method.method: Refreshing state... [id=agm-ihfbm9blp1-spl6ny-POST] module.cors.aws_api_gateway_method._: Refreshing state... [id=agm-ihfbm9blp1-spl6ny-OPTIONS] aws_lambda_permission.allow_cloudwatch_to_call_check_foo: Refreshing state... [id=AllowExecutionFromCloudWatch] aws_cloudwatch_event_target.target: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-trigger_user_scan-lambda] module.cors.aws_api_gateway_method_response._: Refreshing state... [id=agmr-ihfbm9blp1-spl6ny-OPTIONS-200] module.cors.aws_api_gateway_integration._: Refreshing state... [id=agi-ihfbm9blp1-spl6ny-OPTIONS] aws_api_gateway_method_response.method_response_200: Refreshing state... [id=agmr-ihfbm9blp1-spl6ny-POST-200] aws_lambda_permission.apigw_lambda: Refreshing state... [id=AllowExecutionFromAPIGateway] aws_api_gateway_integration.integration: Refreshing state... [id=agi-ihfbm9blp1-spl6ny-POST] aws_api_gateway_deployment.test: Refreshing state... [id=dgv6dg] module.cors.aws_api_gateway_integration_response._: Refreshing state... [id=agir-ihfbm9blp1-spl6ny-OPTIONS-200] local_file.index_page: Refreshing state... [id=572e00d735b8577939cb9ec2de85ffe55d375db6] aws_s3_bucket_public_access_block.website: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm] aws_s3_bucket_object.example_file: Refreshing state... [id=index.html] aws_s3_bucket_policy.website: Refreshing state... [id=mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm] Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create ~ update in-place Terraform will perform the following actions: # aws_lambda_function.lambda will be updated in-place ~ resource "aws_lambda_function" "lambda" { id = "mtchoun-mouh-refactor-use-textractor-user_registration_consulcam" tags = { "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (25 unchanged attributes hidden) ~ environment { ~ variables = { ~ "MAINTAINER_MAIL" = (sensitive value) # (8 unchanged elements hidden) } } # (1 unchanged block hidden) } # aws_lambda_function.scan will be updated in-place ~ resource "aws_lambda_function" "scan" { id = "mtchoun-mouh-refactor-use-textractor-scan_user_consulcam" tags = { "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (25 unchanged attributes hidden) ~ environment { ~ variables = { ~ "MAINTAINER_MAIL" = (sensitive value) # (8 unchanged elements hidden) } } # (1 unchanged block hidden) } # aws_s3_bucket.images will be updated in-place ~ resource "aws_s3_bucket" "images" { id = "mtchoun-mouh-refactor-use-textractor-djansang" tags = { "Name" = "images" "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (11 unchanged attributes hidden) - server_side_encryption_configuration { - rule { - bucket_key_enabled = false -> null - apply_server_side_encryption_by_default { - sse_algorithm = "AES256" -> null # (1 unchanged attribute hidden) } } } # (1 unchanged block hidden) } # aws_s3_bucket.website will be updated in-place ~ resource "aws_s3_bucket" "website" { id = "mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm" tags = { "Name" = "Website" "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (13 unchanged attributes hidden) - server_side_encryption_configuration { - rule { - bucket_key_enabled = false -> null - apply_server_side_encryption_by_default { - sse_algorithm = "AES256" -> null # (1 unchanged attribute hidden) } } } # (3 unchanged blocks hidden) } # local_file.index_page will be created + resource "local_file" "index_page" { + content = (sensitive value) + content_base64sha256 = (known after apply) + content_base64sha512 = (known after apply) + content_md5 = (known after apply) + content_sha1 = (known after apply) + content_sha256 = (known after apply) + content_sha512 = (known after apply) + directory_permission = "0777" + file_permission = "0777" + filename = "../html/index.html" + id = (known after apply) } Plan: 1 to add, 4 to change, 0 to destroy. ------------------------------------------------------------------------ Cost estimation: Resources: 3 of 5 estimated $1.74096/mo +$0.0 ------------------------------------------------------------------------ aws_lambda_function.scan: Modifying... [id=mtchoun-mouh-refactor-use-textractor-scan_user_consulcam] aws_lambda_function.lambda: Modifying... [id=mtchoun-mouh-refactor-use-textractor-user_registration_consulcam] aws_s3_bucket.images: Modifying... [id=mtchoun-mouh-refactor-use-textractor-djansang] aws_s3_bucket.website: Modifying... [id=mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm] aws_s3_bucket.images: Modifications complete after 5s [id=mtchoun-mouh-refactor-use-textractor-djansang] aws_s3_bucket.website: Modifications complete after 6s [id=mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm] aws_lambda_function.scan: Modifications complete after 7s [id=mtchoun-mouh-refactor-use-textractor-scan_user_consulcam] aws_lambda_function.lambda: Modifications complete after 7s [id=mtchoun-mouh-refactor-use-textractor-user_registration_consulcam] local_file.index_page: Creating... local_file.index_page: Creation complete after 0s [id=8a1d3219eb138360c457b764df18ac2e61bd0bef] Apply complete! Resources: 1 added, 4 changed, 0 destroyed. Outputs: register_table = "mtchoun-mouh-refactor-use-textractor-Register" stage_url = "https://ihfbm9blp1.execute-api.eu-central-1.amazonaws.com/mtchoun-mouh-refactor-use-textractor-dev" website_url = "http://mtchoun-mouh-refactor-use-textractor-mtchoun-mouh.mongulu.cm.s3-website.eu-central-1.amazonaws.com" ```
billmetangmo commented 2 months ago

Plan Result

CI link

Plan: 2 to add, 4 to change, 0 to destroy.
Change Result (Click me) ```hcl # aws_lambda_function.lambda will be updated in-place ~ resource "aws_lambda_function" "lambda" { id = "user_registration_consulcam" ~ last_modified = "2023-08-07T19:40:10.000+0000" -> (known after apply) ~ layers = [] -> (known after apply) ~ source_code_hash = "Alfc5+hIWkPKzz7W6FQbDTns5SJFRvX1qVA0IcYPzLQ=" -> "aG/693OgtesclFbtQG3JpowPoOxVEki6ETbi5wlrhnw=" tags = { "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (16 unchanged attributes hidden) ~ environment { ~ variables = { ~ "MAINTAINER_MAIL" = (sensitive value) # (8 unchanged elements hidden) } } # (1 unchanged block hidden) } # aws_lambda_function.scan will be updated in-place ~ resource "aws_lambda_function" "scan" { id = "scan_user_consulcam" ~ last_modified = "2024-08-29T23:46:22.000+0000" -> (known after apply) ~ source_code_hash = "Jhe7k5MLImZLUspkUA3PeCwJyRBxXG+L/jXk1odHcdY=" -> "aG/693OgtesclFbtQG3JpowPoOxVEki6ETbi5wlrhnw=" tags = { "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (17 unchanged attributes hidden) ~ environment { ~ variables = { ~ "MAINTAINER_MAIL" = (sensitive value) # (8 unchanged elements hidden) } } # (1 unchanged block hidden) } # aws_lambda_layer_version.test_lambda_layer will be created + resource "aws_lambda_layer_version" "test_lambda_layer" { + arn = (known after apply) + compatible_runtimes = [ + "python3.7", + "python3.8", ] + created_date = (known after apply) + filename = "make_lamda_layer/python.zip" + id = (known after apply) + layer_arn = (known after apply) + layer_name = "test_lambda_layer" + signing_job_arn = (known after apply) + signing_profile_version_arn = (known after apply) + source_code_hash = (known after apply) + source_code_size = (known after apply) + version = (known after apply) } # aws_s3_bucket.images will be updated in-place ~ resource "aws_s3_bucket" "images" { id = "djansang" tags = { "Name" = "images" "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (10 unchanged attributes hidden) - server_side_encryption_configuration { - rule { - bucket_key_enabled = false -> null - apply_server_side_encryption_by_default { - sse_algorithm = "AES256" -> null } } } # (1 unchanged block hidden) } # aws_s3_bucket.website will be updated in-place ~ resource "aws_s3_bucket" "website" { id = "mtchoun-mouh.mongulu.cm" tags = { "Name" = "Website" "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (12 unchanged attributes hidden) - server_side_encryption_configuration { - rule { - bucket_key_enabled = false -> null - apply_server_side_encryption_by_default { - sse_algorithm = "AES256" -> null } } } # (3 unchanged blocks hidden) } # local_file.index_page will be created + resource "local_file" "index_page" { + content = (sensitive value) + content_base64sha256 = (known after apply) + content_base64sha512 = (known after apply) + content_md5 = (known after apply) + content_sha1 = (known after apply) + content_sha256 = (known after apply) + content_sha512 = (known after apply) + directory_permission = "0777" + file_permission = "0777" + filename = "../html/index.html" + id = (known after apply) } Plan: 2 to add, 4 to change, 0 to destroy. ```
billmetangmo commented 2 months ago

:white_check_mark: Apply Succeeded

CI link

Apply complete! Resources: 2 added, 4 changed, 0 destroyed.
Details (Click me) ```hcl Running apply in the remote backend. Output will stream here. Pressing Ctrl-C will cancel the remote apply if it's still pending. If the apply started it will stop streaming the logs, but will not stop the apply running remotely. Preparing the remote apply... To view this run in a browser, visit: https://app.terraform.io/app/tfc-mongulu-cm/mtchoun-mouh-master/runs/run-jcZUKSHNrcisaa2Z Waiting for the plan to start... Terraform v1.5.2 on linux_amd64 Initializing plugins and modules... data.archive_file.lambda_zip: Reading... data.archive_file.lambda_zip: Read complete after 0s [id=a302387976ce74579a87a903dcc6149f70895053] data.aws_caller_identity.current: Reading... data.aws_iam_role.role: Reading... aws_cloudwatch_event_rule.scheduler: Refreshing state... [id=trigger_user_scan] aws_dynamodb_table.Link_table: Refreshing state... [id=Link_table] aws_dynamodb_table.Register: Refreshing state... [id=Register] aws_s3_bucket.website: Refreshing state... [id=mtchoun-mouh.mongulu.cm] aws_s3_bucket.images: Refreshing state... [id=djansang] aws_api_gateway_rest_api.api: Refreshing state... [id=gozv19c3jf] aws_dynamodb_table.Users: Refreshing state... [id=Users] data.aws_caller_identity.current: Read complete after 0s [id=053932140667] data.aws_iam_role.role: Read complete after 0s [id=website-deployer] aws_lambda_function.scan: Refreshing state... [id=scan_user_consulcam] aws_lambda_function.lambda: Refreshing state... [id=user_registration_consulcam] aws_api_gateway_resource.resource: Refreshing state... [id=gtenoa] module.cors.aws_api_gateway_method._: Refreshing state... [id=agm-gozv19c3jf-gtenoa-OPTIONS] aws_api_gateway_method.method: Refreshing state... [id=agm-gozv19c3jf-gtenoa-POST] aws_lambda_permission.allow_cloudwatch_to_call_check_foo: Refreshing state... [id=AllowExecutionFromCloudWatch] aws_cloudwatch_event_target.target: Refreshing state... [id=trigger_user_scan-lambda] module.cors.aws_api_gateway_method_response._: Refreshing state... [id=agmr-gozv19c3jf-gtenoa-OPTIONS-200] module.cors.aws_api_gateway_integration._: Refreshing state... [id=agi-gozv19c3jf-gtenoa-OPTIONS] aws_api_gateway_method_response.method_response_200: Refreshing state... [id=agmr-gozv19c3jf-gtenoa-POST-200] aws_lambda_permission.apigw_lambda: Refreshing state... [id=AllowExecutionFromAPIGateway] aws_api_gateway_integration.integration: Refreshing state... [id=agi-gozv19c3jf-gtenoa-POST] module.cors.aws_api_gateway_integration_response._: Refreshing state... [id=agir-gozv19c3jf-gtenoa-OPTIONS-200] aws_api_gateway_deployment.test: Refreshing state... [id=7suq19] local_file.index_page: Refreshing state... [id=3df23f6ccd0c737240f079546f3bd4cefc59b440] aws_s3_bucket_public_access_block.website: Refreshing state... [id=mtchoun-mouh.mongulu.cm] aws_s3_bucket_object.example_file: Refreshing state... [id=index.html] aws_s3_bucket_policy.website: Refreshing state... [id=mtchoun-mouh.mongulu.cm] Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create ~ update in-place Terraform will perform the following actions: # aws_lambda_function.lambda will be updated in-place ~ resource "aws_lambda_function" "lambda" { id = "user_registration_consulcam" ~ last_modified = "2023-08-07T19:40:10.000+0000" -> (known after apply) ~ layers = [] -> (known after apply) ~ source_code_hash = "Alfc5+hIWkPKzz7W6FQbDTns5SJFRvX1qVA0IcYPzLQ=" -> "aG/693OgtesclFbtQG3JpowPoOxVEki6ETbi5wlrhnw=" tags = { "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (16 unchanged attributes hidden) ~ environment { ~ variables = { ~ "MAINTAINER_MAIL" = (sensitive value) # (8 unchanged elements hidden) } } # (1 unchanged block hidden) } # aws_lambda_function.scan will be updated in-place ~ resource "aws_lambda_function" "scan" { id = "scan_user_consulcam" ~ last_modified = "2024-08-29T23:46:22.000+0000" -> (known after apply) ~ source_code_hash = "Jhe7k5MLImZLUspkUA3PeCwJyRBxXG+L/jXk1odHcdY=" -> "aG/693OgtesclFbtQG3JpowPoOxVEki6ETbi5wlrhnw=" tags = { "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (17 unchanged attributes hidden) ~ environment { ~ variables = { ~ "MAINTAINER_MAIL" = (sensitive value) # (8 unchanged elements hidden) } } # (1 unchanged block hidden) } # aws_lambda_layer_version.test_lambda_layer will be created + resource "aws_lambda_layer_version" "test_lambda_layer" { + arn = (known after apply) + compatible_runtimes = [ + "python3.7", + "python3.8", ] + created_date = (known after apply) + filename = "make_lamda_layer/python.zip" + id = (known after apply) + layer_arn = (known after apply) + layer_name = "test_lambda_layer" + signing_job_arn = (known after apply) + signing_profile_version_arn = (known after apply) + source_code_hash = (known after apply) + source_code_size = (known after apply) + version = (known after apply) } # aws_s3_bucket.images will be updated in-place ~ resource "aws_s3_bucket" "images" { id = "djansang" tags = { "Name" = "images" "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (10 unchanged attributes hidden) - server_side_encryption_configuration { - rule { - bucket_key_enabled = false -> null - apply_server_side_encryption_by_default { - sse_algorithm = "AES256" -> null } } } # (1 unchanged block hidden) } # aws_s3_bucket.website will be updated in-place ~ resource "aws_s3_bucket" "website" { id = "mtchoun-mouh.mongulu.cm" tags = { "Name" = "Website" "environment" = "mtchoun-mouh-master" "project" = "mtchoun-mouh" } # (12 unchanged attributes hidden) - server_side_encryption_configuration { - rule { - bucket_key_enabled = false -> null - apply_server_side_encryption_by_default { - sse_algorithm = "AES256" -> null } } } # (3 unchanged blocks hidden) } # local_file.index_page will be created + resource "local_file" "index_page" { + content = (sensitive value) + content_base64sha256 = (known after apply) + content_base64sha512 = (known after apply) + content_md5 = (known after apply) + content_sha1 = (known after apply) + content_sha256 = (known after apply) + content_sha512 = (known after apply) + directory_permission = "0777" + file_permission = "0777" + filename = "../html/index.html" + id = (known after apply) } Plan: 2 to add, 4 to change, 0 to destroy. ------------------------------------------------------------------------ Cost estimation: Resources: 3 of 5 estimated $1.74096/mo +$0.0 ------------------------------------------------------------------------ aws_lambda_layer_version.test_lambda_layer: Creating... local_file.index_page: Creating... local_file.index_page: Creation complete after 0s [id=c845316bee69b44546aed5f465d68859a00ebc56] aws_s3_bucket.images: Modifying... [id=djansang] aws_lambda_function.scan: Modifying... [id=scan_user_consulcam] aws_s3_bucket.website: Modifying... [id=mtchoun-mouh.mongulu.cm] aws_s3_bucket.images: Modifications complete after 5s [id=djansang] aws_s3_bucket.website: Modifications complete after 6s [id=mtchoun-mouh.mongulu.cm] aws_lambda_function.scan: Modifications complete after 7s [id=scan_user_consulcam] aws_lambda_layer_version.test_lambda_layer: Still creating... [10s elapsed] aws_lambda_layer_version.test_lambda_layer: Creation complete after 10s [id=arn:aws:lambda:eu-central-1:053932140667:layer:test_lambda_layer:6] aws_lambda_function.lambda: Modifying... [id=user_registration_consulcam] aws_lambda_function.lambda: Still modifying... [id=user_registration_consulcam, 10s elapsed] aws_lambda_function.lambda: Modifications complete after 13s [id=user_registration_consulcam] Apply complete! Resources: 2 added, 4 changed, 0 destroyed. Outputs: register_table = "Register" stage_url = "https://gozv19c3jf.execute-api.eu-central-1.amazonaws.com/dev" website_url = "http://mtchoun-mouh.mongulu.cm.s3-website.eu-central-1.amazonaws.com" ```