Skip to content

Clean zip after docker image creation#4

Merged
ana-sher merged 8 commits into
mainfrom
dev
Nov 28, 2025
Merged

Clean zip after docker image creation#4
ana-sher merged 8 commits into
mainfrom
dev

Conversation

@ana-sher

Copy link
Copy Markdown
Owner

No description provided.

@ana-sher ana-sher self-assigned this Nov 28, 2025
@ana-sher ana-sher added the enhancement New feature or request label Nov 28, 2025
@github-actions

Copy link
Copy Markdown

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
data.archive_file.docker_context: Reading...
data.archive_file.docker_context: Read complete after 0s [id=faa95f0ae5347474de6e7c17827f0e10f031a48e]
data.aws_ecr_authorization_token.token: Reading...
module.docker_image.data.aws_caller_identity.this: Reading...
module.aws_lambda_function.data.aws_region.current: Reading...
aws_apigatewayv2_api.api: Refreshing state... [id=040fg458ka]
module.aws_lambda_function.data.aws_partition.current: Reading...
module.docker_image.data.aws_region.current: Reading...
aws_iam_role.app_role: Refreshing state... [id=climate_app_role]
module.aws_lambda_function.aws_cloudwatch_log_group.lambda[0]: Refreshing state... [id=/aws/lambda/climate_analysis_lambda]
module.aws_lambda_function.data.aws_region.current: Read complete after 0s [id=eu-north-1]
module.docker_image.data.aws_region.current: Read complete after 0s [id=eu-north-1]
module.aws_lambda_function.data.aws_caller_identity.current: Reading...
module.docker_image.aws_ecr_repository.this[0]: Refreshing state... [id=climate-analysis]
module.aws_lambda_function.data.aws_partition.current: Read complete after 0s [id=aws]
data.aws_caller_identity.current: Reading...
aws_s3_bucket.app_s3: Refreshing state... [id=climate-analysis-bucket]
module.docker_image.data.aws_caller_identity.this: Read complete after 0s [id=266796786618]
aws_iam_role_policy_attachment.lambda_basic: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole]
aws_iam_role_policy_attachment.ecs_read: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly]
module.aws_lambda_function.data.aws_caller_identity.current: Read complete after 0s [id=266796786618]
data.aws_caller_identity.current: Read complete after 0s [id=266796786618]
aws_apigatewayv2_stage.default_stage: Refreshing state... [id=$default]
data.aws_ecr_authorization_token.token: Read complete after 0s [id=eu-north-1]
module.docker_image.aws_ecr_lifecycle_policy.this[0]: Refreshing state... [id=climate-analysis]
module.docker_image.docker_image.this: Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9]
module.docker_image.docker_registry_image.this: Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0]
null_resource.cleanup_zip: Refreshing state... [id=5111199625386406948]
module.aws_lambda_function.aws_lambda_function.this[0]: Refreshing state... [id=climate_analysis_lambda]
aws_apigatewayv2_integration.lambda_integration: Refreshing state... [id=a4fgymd]
aws_lambda_permission.apigw_invoke: Refreshing state... [id=AllowAPIGatewayInvoke]
aws_apigatewayv2_route.root_route: Refreshing state... [id=i3s6lws]
aws_s3_bucket_public_access_block.s3_access: Refreshing state... [id=climate-analysis-bucket]
data.aws_iam_policy_document.aws_policy_doc: Reading...
data.aws_iam_policy_document.aws_policy_doc: Read complete after 0s [id=1638820244]
aws_iam_policy.policy: Refreshing state... [id=arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]
aws_iam_role_policy_attachment.app_role_policy_attach: Refreshing state... [id=climate_app_role/arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.docker_image.docker_image.this has been deleted
  - resource "docker_image" "this" {
        id           = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9"
      - image_id     = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - name         = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9" -> null
        # (3 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }


Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.

─────────────────────────────────────────────────────────────────────────────

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
-/+ destroy and then create replacement
+/- create replacement and then destroy

Terraform will perform the following actions:

  # null_resource.cleanup_zip is tainted, so must be replaced
-/+ resource "null_resource" "cleanup_zip" {
      ~ id = "5111199625386406948" -> (known after apply)
    }

  # module.aws_lambda_function.aws_lambda_function.this[0] will be updated in-place
  ~ resource "aws_lambda_function" "this" {
        id                             = "climate_analysis_lambda"
      ~ image_uri                      = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9" -> "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9+cEi"
      ~ last_modified                  = "2025-11-28T16:02:33.000+0000" -> (known after apply)
        tags                           = {
            "terraform-aws-modules" = "lambda"
        }
        # (28 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.docker_image.docker_image.this will be created
  + resource "docker_image" "this" {
      + force_remove = false
      + id           = (known after apply)
      + image_id     = (known after apply)
      + keep_locally = false
      + name         = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9+cEi"
      + repo_digest  = (known after apply)

      + build {
          + cache_from     = []
          + context        = "../"
          + dockerfile     = "Dockerfile"
          + extra_hosts    = []
          + remove         = true
          + security_opt   = []
          + tag            = []
            # (13 unchanged attributes hidden)
        }
    }

  # module.docker_image.docker_registry_image.this must be replaced
+/- resource "docker_registry_image" "this" {
      ~ id                   = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> (known after apply)
      ~ name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9" -> "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9+cEi" # forces replacement
      ~ sha256_digest        = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> (known after apply)
      ~ triggers             = {
          - "image_id" = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0"
        } -> (known after apply) # forces replacement
        # (2 unchanged attributes hidden)
    }

Plan: 3 to add, 1 to change, 2 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

Pusher: @ana-sher, Action: pull_request

@github-actions

Copy link
Copy Markdown

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
data.archive_file.docker_context: Reading...
data.archive_file.docker_context: Read complete after 0s [id=faa95f0ae5347474de6e7c17827f0e10f031a48e]
module.aws_lambda_function.data.aws_partition.current: Reading...
data.aws_ecr_authorization_token.token: Reading...
module.docker_image.data.aws_caller_identity.this: Reading...
module.aws_lambda_function.data.aws_caller_identity.current: Reading...
module.docker_image.data.aws_region.current: Reading...
aws_apigatewayv2_api.api: Refreshing state... [id=040fg458ka]
module.docker_image.aws_ecr_repository.this[0]: Refreshing state... [id=climate-analysis]
module.aws_lambda_function.data.aws_region.current: Reading...
module.aws_lambda_function.aws_cloudwatch_log_group.lambda[0]: Refreshing state... [id=/aws/lambda/climate_analysis_lambda]
aws_iam_role.app_role: Refreshing state... [id=climate_app_role]
module.docker_image.data.aws_region.current: Read complete after 0s [id=eu-north-1]
module.aws_lambda_function.data.aws_region.current: Read complete after 0s [id=eu-north-1]
module.aws_lambda_function.data.aws_partition.current: Read complete after 0s [id=aws]
data.aws_caller_identity.current: Reading...
aws_s3_bucket.app_s3: Refreshing state... [id=climate-analysis-bucket]
module.aws_lambda_function.data.aws_caller_identity.current: Read complete after 0s [id=266796786618]
module.docker_image.data.aws_caller_identity.this: Read complete after 0s [id=266796786618]
data.aws_caller_identity.current: Read complete after 0s [id=266796786618]
aws_iam_role_policy_attachment.lambda_basic: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole]
aws_iam_role_policy_attachment.ecs_read: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly]
aws_apigatewayv2_stage.default_stage: Refreshing state... [id=$default]
data.aws_ecr_authorization_token.token: Read complete after 0s [id=eu-north-1]
module.docker_image.docker_registry_image.this (deposed object 07e9d7c1): Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0]
module.docker_image.aws_ecr_lifecycle_policy.this[0]: Refreshing state... [id=climate-analysis]
module.docker_image.docker_image.this: Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9]
module.docker_image.docker_registry_image.this: Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0]
null_resource.cleanup_zip: Refreshing state... [id=6219709658811386966]
module.aws_lambda_function.aws_lambda_function.this[0]: Refreshing state... [id=climate_analysis_lambda]
aws_lambda_permission.apigw_invoke: Refreshing state... [id=AllowAPIGatewayInvoke]
aws_apigatewayv2_integration.lambda_integration: Refreshing state... [id=a4fgymd]
aws_apigatewayv2_route.root_route: Refreshing state... [id=i3s6lws]
aws_s3_bucket_public_access_block.s3_access: Refreshing state... [id=climate-analysis-bucket]
data.aws_iam_policy_document.aws_policy_doc: Reading...
data.aws_iam_policy_document.aws_policy_doc: Read complete after 0s [id=1638820244]
aws_iam_policy.policy: Refreshing state... [id=arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]
aws_iam_role_policy_attachment.app_role_policy_attach: Refreshing state... [id=climate_app_role/arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.docker_image.docker_image.this has been deleted
  - resource "docker_image" "this" {
        id           = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9"
      - image_id     = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - name         = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9" -> null
        # (3 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }


Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.

─────────────────────────────────────────────────────────────────────────────

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
  - destroy
-/+ destroy and then create replacement
+/- create replacement and then destroy

Terraform will perform the following actions:

  # null_resource.cleanup_zip is tainted, so must be replaced
-/+ resource "null_resource" "cleanup_zip" {
      ~ id = "6219709658811386966" -> (known after apply)
    }

  # module.aws_lambda_function.aws_lambda_function.this[0] will be updated in-place
  ~ resource "aws_lambda_function" "this" {
        id                             = "climate_analysis_lambda"
      ~ image_uri                      = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9" -> "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9+cEi"
      ~ last_modified                  = "2025-11-28T16:02:33.000+0000" -> (known after apply)
        tags                           = {
            "terraform-aws-modules" = "lambda"
        }
        # (28 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.docker_image.docker_image.this will be created
  + resource "docker_image" "this" {
      + force_remove = false
      + id           = (known after apply)
      + image_id     = (known after apply)
      + keep_locally = false
      + name         = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9+cEi"
      + repo_digest  = (known after apply)

      + build {
          + cache_from     = []
          + context        = "../"
          + dockerfile     = "Dockerfile"
          + extra_hosts    = []
          + remove         = true
          + security_opt   = []
          + tag            = []
            # (13 unchanged attributes hidden)
        }
    }

  # module.docker_image.docker_registry_image.this must be replaced
+/- resource "docker_registry_image" "this" {
      ~ id                   = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> (known after apply)
      ~ name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9" -> "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9+cEi" # forces replacement
      ~ sha256_digest        = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> (known after apply)
      ~ triggers             = {
          - "image_id" = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0"
        } -> (known after apply) # forces replacement
        # (2 unchanged attributes hidden)
    }

  # module.docker_image.docker_registry_image.this (deposed object 07e9d7c1) will be destroyed
  # (left over from a partially-failed replacement of this instance)
  - resource "docker_registry_image" "this" {
      - id                   = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - insecure_skip_verify = false -> null
      - keep_remotely        = false -> null
      - name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9" -> null
      - sha256_digest        = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - triggers             = {
          - "image_id" = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0"
        } -> null
    }

Plan: 3 to add, 1 to change, 3 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.
Releasing state lock. This may take a few moments...

Pusher: @ana-sher, Action: pull_request

@github-actions

Copy link
Copy Markdown

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
data.archive_file.docker_context: Reading...
data.archive_file.docker_context: Read complete after 0s [id=faa95f0ae5347474de6e7c17827f0e10f031a48e]
module.docker_image.data.aws_caller_identity.this: Reading...
module.aws_lambda_function.aws_cloudwatch_log_group.lambda[0]: Refreshing state... [id=/aws/lambda/climate_analysis_lambda]
module.docker_image.data.aws_region.current: Reading...
data.aws_ecr_authorization_token.token: Reading...
module.aws_lambda_function.data.aws_partition.current: Reading...
module.aws_lambda_function.data.aws_caller_identity.current: Reading...
aws_iam_role.app_role: Refreshing state... [id=climate_app_role]
data.aws_caller_identity.current: Reading...
module.aws_lambda_function.data.aws_region.current: Reading...
aws_s3_bucket.app_s3: Refreshing state... [id=climate-analysis-bucket]
module.docker_image.data.aws_region.current: Read complete after 0s [id=eu-north-1]
module.aws_lambda_function.data.aws_partition.current: Read complete after 0s [id=aws]
module.aws_lambda_function.data.aws_region.current: Read complete after 0s [id=eu-north-1]
aws_apigatewayv2_api.api: Refreshing state... [id=040fg458ka]
module.docker_image.aws_ecr_repository.this[0]: Refreshing state... [id=climate-analysis]
module.docker_image.data.aws_caller_identity.this: Read complete after 0s [id=266796786618]
data.aws_caller_identity.current: Read complete after 0s [id=266796786618]
module.aws_lambda_function.data.aws_caller_identity.current: Read complete after 0s [id=266796786618]
aws_iam_role_policy_attachment.lambda_basic: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole]
aws_iam_role_policy_attachment.ecs_read: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly]
aws_apigatewayv2_stage.default_stage: Refreshing state... [id=$default]
data.aws_ecr_authorization_token.token: Read complete after 0s [id=eu-north-1]
module.docker_image.docker_registry_image.this (deposed object 07e9d7c1): Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0]
module.docker_image.aws_ecr_lifecycle_policy.this[0]: Refreshing state... [id=climate-analysis]
module.docker_image.docker_registry_image.this: Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0]
module.aws_lambda_function.aws_lambda_function.this[0]: Refreshing state... [id=climate_analysis_lambda]
aws_lambda_permission.apigw_invoke: Refreshing state... [id=AllowAPIGatewayInvoke]
aws_apigatewayv2_integration.lambda_integration: Refreshing state... [id=a4fgymd]
aws_apigatewayv2_route.root_route: Refreshing state... [id=i3s6lws]
aws_s3_bucket_public_access_block.s3_access: Refreshing state... [id=climate-analysis-bucket]
data.aws_iam_policy_document.aws_policy_doc: Reading...
data.aws_iam_policy_document.aws_policy_doc: Read complete after 0s [id=1638820244]
aws_iam_policy.policy: Refreshing state... [id=arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]
aws_iam_role_policy_attachment.app_role_policy_attach: Refreshing state... [id=climate_app_role/arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
  - destroy
+/- create replacement and then destroy

Terraform will perform the following actions:

  # null_resource.cleanup_zip will be created
  + resource "null_resource" "cleanup_zip" {
      + id = (known after apply)
    }

  # module.aws_lambda_function.aws_lambda_function.this[0] will be updated in-place
  ~ resource "aws_lambda_function" "this" {
        id                             = "climate_analysis_lambda"
      ~ image_uri                      = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9" -> "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9+cEi"
      ~ last_modified                  = "2025-11-28T16:02:33.000+0000" -> (known after apply)
        tags                           = {
            "terraform-aws-modules" = "lambda"
        }
        # (28 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.docker_image.docker_image.this will be created
  + resource "docker_image" "this" {
      + force_remove = false
      + id           = (known after apply)
      + image_id     = (known after apply)
      + keep_locally = false
      + name         = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9+cEi"
      + repo_digest  = (known after apply)

      + build {
          + cache_from     = []
          + context        = "../"
          + dockerfile     = "Dockerfile"
          + extra_hosts    = []
          + remove         = true
          + security_opt   = []
          + tag            = []
            # (13 unchanged attributes hidden)
        }
    }

  # module.docker_image.docker_registry_image.this must be replaced
+/- resource "docker_registry_image" "this" {
      ~ id                   = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> (known after apply)
      ~ name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9" -> "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9+cEi" # forces replacement
      ~ sha256_digest        = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> (known after apply)
      ~ triggers             = {
          - "image_id" = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0"
        } -> (known after apply) # forces replacement
        # (2 unchanged attributes hidden)
    }

  # module.docker_image.docker_registry_image.this (deposed object 07e9d7c1) will be destroyed
  # (left over from a partially-failed replacement of this instance)
  - resource "docker_registry_image" "this" {
      - id                   = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - insecure_skip_verify = false -> null
      - keep_remotely        = false -> null
      - name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9" -> null
      - sha256_digest        = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - triggers             = {
          - "image_id" = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0"
        } -> null
    }

Plan: 3 to add, 1 to change, 2 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.
Releasing state lock. This may take a few moments...

Pusher: @ana-sher, Action: pull_request

@github-actions

Copy link
Copy Markdown

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
data.archive_file.docker_context: Reading...
data.archive_file.docker_context: Read complete after 0s [id=faa95f0ae5347474de6e7c17827f0e10f031a48e]
module.docker_image.data.aws_caller_identity.this: Reading...
aws_apigatewayv2_api.api: Refreshing state... [id=040fg458ka]
aws_iam_role.app_role: Refreshing state... [id=climate_app_role]
module.docker_image.data.aws_region.current: Reading...
module.aws_lambda_function.data.aws_partition.current: Reading...
module.docker_image.aws_ecr_repository.this[0]: Refreshing state... [id=climate-analysis]
data.aws_caller_identity.current: Reading...
module.aws_lambda_function.data.aws_region.current: Reading...
data.aws_ecr_authorization_token.token: Reading...
module.aws_lambda_function.aws_cloudwatch_log_group.lambda[0]: Refreshing state... [id=/aws/lambda/climate_analysis_lambda]
module.aws_lambda_function.data.aws_partition.current: Read complete after 0s [id=aws]
module.docker_image.data.aws_region.current: Read complete after 0s [id=eu-north-1]
module.aws_lambda_function.data.aws_region.current: Read complete after 0s [id=eu-north-1]
module.aws_lambda_function.data.aws_caller_identity.current: Reading...
aws_s3_bucket.app_s3: Refreshing state... [id=climate-analysis-bucket]
module.docker_image.data.aws_caller_identity.this: Read complete after 0s [id=266796786618]
data.aws_caller_identity.current: Read complete after 0s [id=266796786618]
aws_iam_role_policy_attachment.ecs_read: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly]
aws_iam_role_policy_attachment.lambda_basic: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole]
module.aws_lambda_function.data.aws_caller_identity.current: Read complete after 0s [id=266796786618]
aws_apigatewayv2_stage.default_stage: Refreshing state... [id=$default]
data.aws_ecr_authorization_token.token: Read complete after 0s [id=eu-north-1]
module.docker_image.docker_registry_image.this (deposed object 46a38b1c): Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0]
module.docker_image.aws_ecr_lifecycle_policy.this[0]: Refreshing state... [id=climate-analysis]
module.docker_image.docker_image.this: Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9-1]
module.docker_image.docker_registry_image.this: Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0]
module.docker_image.docker_image.this (deposed object db8bec12): Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9]
null_resource.cleanup_zip: Refreshing state... [id=8103002033468160805]
module.aws_lambda_function.aws_lambda_function.this[0]: Refreshing state... [id=climate_analysis_lambda]
aws_lambda_permission.apigw_invoke: Refreshing state... [id=AllowAPIGatewayInvoke]
aws_apigatewayv2_integration.lambda_integration: Refreshing state... [id=a4fgymd]
aws_apigatewayv2_route.root_route: Refreshing state... [id=i3s6lws]
aws_s3_bucket_public_access_block.s3_access: Refreshing state... [id=climate-analysis-bucket]
data.aws_iam_policy_document.aws_policy_doc: Reading...
data.aws_iam_policy_document.aws_policy_doc: Read complete after 0s [id=1638820244]
aws_iam_policy.policy: Refreshing state... [id=arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]
aws_iam_role_policy_attachment.app_role_policy_attach: Refreshing state... [id=climate_app_role/arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.docker_image.docker_image.this has been deleted
  - resource "docker_image" "this" {
        id           = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9-1"
      - image_id     = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - name         = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9-1" -> null
        # (3 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }


Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.

─────────────────────────────────────────────────────────────────────────────

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
  - destroy
-/+ destroy and then create replacement
+/- create replacement and then destroy

Terraform will perform the following actions:

  # null_resource.cleanup_zip is tainted, so must be replaced
-/+ resource "null_resource" "cleanup_zip" {
      ~ id = "8103002033468160805" -> (known after apply)
    }

  # module.aws_lambda_function.aws_lambda_function.this[0] will be updated in-place
  ~ resource "aws_lambda_function" "this" {
        id                             = "climate_analysis_lambda"
      ~ image_uri                      = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9-1" -> "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi"
      ~ last_modified                  = "2025-11-28T18:40:46.000+0000" -> (known after apply)
        tags                           = {
            "terraform-aws-modules" = "lambda"
        }
        # (28 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.docker_image.docker_image.this will be created
  + resource "docker_image" "this" {
      + force_remove = false
      + id           = (known after apply)
      + image_id     = (known after apply)
      + keep_locally = false
      + name         = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi"
      + repo_digest  = (known after apply)

      + build {
          + cache_from     = []
          + context        = "../"
          + dockerfile     = "Dockerfile"
          + extra_hosts    = []
          + remove         = true
          + security_opt   = []
          + tag            = []
            # (13 unchanged attributes hidden)
        }
    }

  # module.docker_image.docker_registry_image.this must be replaced
+/- resource "docker_registry_image" "this" {
      ~ id                   = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> (known after apply)
      ~ name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9-1" -> "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi" # forces replacement
      ~ sha256_digest        = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> (known after apply)
      ~ triggers             = {
          - "image_id" = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0"
        } -> (known after apply) # forces replacement
        # (2 unchanged attributes hidden)
    }

  # module.docker_image.docker_registry_image.this (deposed object 46a38b1c) will be destroyed
  # (left over from a partially-failed replacement of this instance)
  - resource "docker_registry_image" "this" {
      - id                   = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - insecure_skip_verify = false -> null
      - keep_remotely        = false -> null
      - name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9" -> null
      - sha256_digest        = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - triggers             = {
          - "image_id" = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0"
        } -> null
    }

Plan: 3 to add, 1 to change, 3 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

Pusher: @ana-sher, Action: pull_request

@github-actions

Copy link
Copy Markdown

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
data.archive_file.docker_context: Reading...
data.archive_file.docker_context: Read complete after 0s [id=faa95f0ae5347474de6e7c17827f0e10f031a48e]
data.aws_ecr_authorization_token.token: Reading...
module.docker_image.data.aws_caller_identity.this: Reading...
module.aws_lambda_function.data.aws_partition.current: Reading...
module.aws_lambda_function.data.aws_caller_identity.current: Reading...
module.docker_image.data.aws_region.current: Reading...
data.aws_caller_identity.current: Reading...
module.aws_lambda_function.aws_cloudwatch_log_group.lambda[0]: Refreshing state... [id=/aws/lambda/climate_analysis_lambda]
aws_apigatewayv2_api.api: Refreshing state... [id=040fg458ka]
aws_s3_bucket.app_s3: Refreshing state... [id=climate-analysis-bucket]
aws_iam_role.app_role: Refreshing state... [id=climate_app_role]
module.docker_image.data.aws_region.current: Read complete after 0s [id=eu-north-1]
module.aws_lambda_function.data.aws_partition.current: Read complete after 0s [id=aws]
module.docker_image.aws_ecr_repository.this[0]: Refreshing state... [id=climate-analysis]
module.aws_lambda_function.data.aws_region.current: Reading...
module.aws_lambda_function.data.aws_region.current: Read complete after 0s [id=eu-north-1]
data.aws_caller_identity.current: Read complete after 0s [id=266796786618]
module.docker_image.data.aws_caller_identity.this: Read complete after 0s [id=266796786618]
aws_iam_role_policy_attachment.lambda_basic: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole]
aws_iam_role_policy_attachment.ecs_read: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly]
module.aws_lambda_function.data.aws_caller_identity.current: Read complete after 0s [id=266796786618]
aws_apigatewayv2_stage.default_stage: Refreshing state... [id=$default]
data.aws_ecr_authorization_token.token: Read complete after 0s [id=eu-north-1]
module.docker_image.docker_registry_image.this (deposed object 46a38b1c): Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0]
module.docker_image.docker_registry_image.this (deposed object d8c48ebb): Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0]
module.docker_image.aws_ecr_lifecycle_policy.this[0]: Refreshing state... [id=climate-analysis]
module.docker_image.docker_image.this: Refreshing state... [id=sha256:4d5fcb8c9b6ec96dc53c026dd39da29005f9be4840365933f972c830738b133e266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi]
module.docker_image.docker_registry_image.this: Refreshing state... [id=sha256:e51766252b225d69e0ec5e22084094678f5211c00c6ca6d6cd7cfba58e942ab9]
null_resource.cleanup_zip: Refreshing state... [id=9034304018553160492]
module.aws_lambda_function.aws_lambda_function.this[0]: Refreshing state... [id=climate_analysis_lambda]
aws_lambda_permission.apigw_invoke: Refreshing state... [id=AllowAPIGatewayInvoke]
aws_apigatewayv2_integration.lambda_integration: Refreshing state... [id=a4fgymd]
aws_apigatewayv2_route.root_route: Refreshing state... [id=i3s6lws]
aws_s3_bucket_public_access_block.s3_access: Refreshing state... [id=climate-analysis-bucket]
data.aws_iam_policy_document.aws_policy_doc: Reading...
data.aws_iam_policy_document.aws_policy_doc: Read complete after 0s [id=1638820244]
aws_iam_policy.policy: Refreshing state... [id=arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]
aws_iam_role_policy_attachment.app_role_policy_attach: Refreshing state... [id=climate_app_role/arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.docker_image.docker_image.this has been deleted
  - resource "docker_image" "this" {
        id           = "sha256:4d5fcb8c9b6ec96dc53c026dd39da29005f9be4840365933f972c830738b133e266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi"
      - image_id     = "sha256:4d5fcb8c9b6ec96dc53c026dd39da29005f9be4840365933f972c830738b133e" -> null
      - name         = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi" -> null
        # (3 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }


Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.

─────────────────────────────────────────────────────────────────────────────

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  - destroy
+/- create replacement and then destroy

Terraform will perform the following actions:

  # module.docker_image.docker_image.this will be created
  + resource "docker_image" "this" {
      + force_remove = false
      + id           = (known after apply)
      + image_id     = (known after apply)
      + keep_locally = false
      + name         = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi"
      + repo_digest  = (known after apply)

      + build {
          + cache_from     = []
          + context        = "../"
          + dockerfile     = "Dockerfile"
          + extra_hosts    = []
          + remove         = true
          + security_opt   = []
          + tag            = []
            # (13 unchanged attributes hidden)
        }
    }

  # module.docker_image.docker_registry_image.this must be replaced
+/- resource "docker_registry_image" "this" {
      ~ id                   = "sha256:e51766252b225d69e0ec5e22084094678f5211c00c6ca6d6cd7cfba58e942ab9" -> (known after apply)
        name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi"
      ~ sha256_digest        = "sha256:e51766252b225d69e0ec5e22084094678f5211c00c6ca6d6cd7cfba58e942ab9" -> (known after apply)
      ~ triggers             = {
          - "image_id" = "sha256:4d5fcb8c9b6ec96dc53c026dd39da29005f9be4840365933f972c830738b133e"
        } -> (known after apply) # forces replacement
        # (2 unchanged attributes hidden)
    }

  # module.docker_image.docker_registry_image.this (deposed object 46a38b1c) will be destroyed
  # (left over from a partially-failed replacement of this instance)
  - resource "docker_registry_image" "this" {
      - id                   = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - insecure_skip_verify = false -> null
      - keep_remotely        = false -> null
      - name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9" -> null
      - sha256_digest        = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - triggers             = {
          - "image_id" = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0"
        } -> null
    }

  # module.docker_image.docker_registry_image.this (deposed object d8c48ebb) will be destroyed
  # (left over from a partially-failed replacement of this instance)
  - resource "docker_registry_image" "this" {
      - id                   = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - insecure_skip_verify = false -> null
      - keep_remotely        = false -> null
      - name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9-1" -> null
      - sha256_digest        = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - triggers             = {
          - "image_id" = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0"
        } -> null
    }

Plan: 2 to add, 0 to change, 3 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.
Releasing state lock. This may take a few moments...

Pusher: @ana-sher, Action: pull_request

@github-actions

Copy link
Copy Markdown

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
data.archive_file.docker_context: Reading...
data.archive_file.docker_context: Read complete after 0s [id=faa95f0ae5347474de6e7c17827f0e10f031a48e]
data.aws_caller_identity.current: Reading...
module.docker_image.data.aws_caller_identity.this: Reading...
module.aws_lambda_function.aws_cloudwatch_log_group.lambda[0]: Refreshing state... [id=/aws/lambda/climate_analysis_lambda]
module.aws_lambda_function.data.aws_region.current: Reading...
module.aws_lambda_function.data.aws_caller_identity.current: Reading...
module.docker_image.aws_ecr_repository.this[0]: Refreshing state... [id=climate-analysis]
module.docker_image.data.aws_region.current: Reading...
data.aws_ecr_authorization_token.token: Reading...
aws_iam_role.app_role: Refreshing state... [id=climate_app_role]
aws_s3_bucket.app_s3: Refreshing state... [id=climate-analysis-bucket]
module.aws_lambda_function.data.aws_region.current: Read complete after 0s [id=eu-north-1]
module.docker_image.data.aws_region.current: Read complete after 0s [id=eu-north-1]
aws_apigatewayv2_api.api: Refreshing state... [id=040fg458ka]
module.aws_lambda_function.data.aws_partition.current: Reading...
module.aws_lambda_function.data.aws_partition.current: Read complete after 0s [id=aws]
data.aws_caller_identity.current: Read complete after 0s [id=266796786618]
module.docker_image.data.aws_caller_identity.this: Read complete after 0s [id=266796786618]
aws_iam_role_policy_attachment.lambda_basic: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole]
aws_iam_role_policy_attachment.ecs_read: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly]
module.aws_lambda_function.data.aws_caller_identity.current: Read complete after 1s [id=266796786618]
aws_apigatewayv2_stage.default_stage: Refreshing state... [id=$default]
data.aws_ecr_authorization_token.token: Read complete after 1s [id=eu-north-1]
module.docker_image.docker_registry_image.this (deposed object 9fa7819e): Refreshing state... [id=sha256:e51766252b225d69e0ec5e22084094678f5211c00c6ca6d6cd7cfba58e942ab9]
module.docker_image.docker_registry_image.this (deposed object 46a38b1c): Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0]
module.docker_image.docker_registry_image.this (deposed object d8c48ebb): Refreshing state... [id=sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0]
module.docker_image.aws_ecr_lifecycle_policy.this[0]: Refreshing state... [id=climate-analysis]
module.docker_image.docker_image.this: Refreshing state... [id=sha256:d15a2f2e03504764d62ba93bcbefd432d313e529c0b92df278b77d5eb325d85c266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi]
module.docker_image.docker_registry_image.this: Refreshing state... [id=sha256:a60268ce62a2bd2175d4861ec2a854404b6f01d8bcf469c7419a934b895fae9f]
null_resource.cleanup_zip: Refreshing state... [id=9034304018553160492]
module.aws_lambda_function.aws_lambda_function.this[0]: Refreshing state... [id=climate_analysis_lambda]
aws_lambda_permission.apigw_invoke: Refreshing state... [id=AllowAPIGatewayInvoke]
aws_apigatewayv2_integration.lambda_integration: Refreshing state... [id=a4fgymd]
aws_apigatewayv2_route.root_route: Refreshing state... [id=i3s6lws]
aws_s3_bucket_public_access_block.s3_access: Refreshing state... [id=climate-analysis-bucket]
data.aws_iam_policy_document.aws_policy_doc: Reading...
data.aws_iam_policy_document.aws_policy_doc: Read complete after 0s [id=1638820244]
aws_iam_policy.policy: Refreshing state... [id=arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]
aws_iam_role_policy_attachment.app_role_policy_attach: Refreshing state... [id=climate_app_role/arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.docker_image.docker_image.this has been deleted
  - resource "docker_image" "this" {
        id           = "sha256:d15a2f2e03504764d62ba93bcbefd432d313e529c0b92df278b77d5eb325d85c266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi"
      - image_id     = "sha256:d15a2f2e03504764d62ba93bcbefd432d313e529c0b92df278b77d5eb325d85c" -> null
      - name         = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi" -> null
        # (3 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }


Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.

─────────────────────────────────────────────────────────────────────────────

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  - destroy
+/- create replacement and then destroy

Terraform will perform the following actions:

  # module.docker_image.docker_image.this will be created
  + resource "docker_image" "this" {
      + force_remove = false
      + id           = (known after apply)
      + image_id     = (known after apply)
      + keep_locally = false
      + name         = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi"
      + repo_digest  = (known after apply)

      + build {
          + cache_from     = []
          + context        = "../"
          + dockerfile     = "Dockerfile"
          + extra_hosts    = []
          + remove         = true
          + security_opt   = []
          + tag            = []
            # (13 unchanged attributes hidden)
        }
    }

  # module.docker_image.docker_registry_image.this must be replaced
+/- resource "docker_registry_image" "this" {
      ~ id                   = "sha256:a60268ce62a2bd2175d4861ec2a854404b6f01d8bcf469c7419a934b895fae9f" -> (known after apply)
        name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi"
      ~ sha256_digest        = "sha256:a60268ce62a2bd2175d4861ec2a854404b6f01d8bcf469c7419a934b895fae9f" -> (known after apply)
      ~ triggers             = {
          - "image_id" = "sha256:d15a2f2e03504764d62ba93bcbefd432d313e529c0b92df278b77d5eb325d85c"
        } -> (known after apply) # forces replacement
        # (2 unchanged attributes hidden)
    }

  # module.docker_image.docker_registry_image.this (deposed object 46a38b1c) will be destroyed
  # (left over from a partially-failed replacement of this instance)
  - resource "docker_registry_image" "this" {
      - id                   = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - insecure_skip_verify = false -> null
      - keep_remotely        = false -> null
      - name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9" -> null
      - sha256_digest        = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - triggers             = {
          - "image_id" = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0"
        } -> null
    }

  # module.docker_image.docker_registry_image.this (deposed object 9fa7819e) will be destroyed
  # (left over from a partially-failed replacement of this instance)
  - resource "docker_registry_image" "this" {
      - id                   = "sha256:e51766252b225d69e0ec5e22084094678f5211c00c6ca6d6cd7cfba58e942ab9" -> null
      - insecure_skip_verify = false -> null
      - keep_remotely        = false -> null
      - name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi" -> null
      - sha256_digest        = "sha256:a60268ce62a2bd2175d4861ec2a854404b6f01d8bcf469c7419a934b895fae9f" -> null
      - triggers             = {
          - "image_id" = "sha256:4d5fcb8c9b6ec96dc53c026dd39da29005f9be4840365933f972c830738b133e"
        } -> null
    }

  # module.docker_image.docker_registry_image.this (deposed object d8c48ebb) will be destroyed
  # (left over from a partially-failed replacement of this instance)
  - resource "docker_registry_image" "this" {
      - id                   = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - insecure_skip_verify = false -> null
      - keep_remotely        = false -> null
      - name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:SnCVQOL2mzo9-1" -> null
      - sha256_digest        = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0" -> null
      - triggers             = {
          - "image_id" = "sha256:079d9f471ba237301f89b4120515117e2c76da02f80b736285ea0e08f0a8b6d0"
        } -> null
    }

Plan: 2 to add, 0 to change, 4 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.
Releasing state lock. This may take a few moments...

Pusher: @ana-sher, Action: pull_request

@ana-sher ana-sher merged commit a857d37 into main Nov 28, 2025
1 check passed
@github-actions

Copy link
Copy Markdown

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
data.archive_file.docker_context: Reading...
data.archive_file.docker_context: Read complete after 0s [id=faa95f0ae5347474de6e7c17827f0e10f031a48e]
module.aws_lambda_function.data.aws_partition.current: Reading...
data.aws_ecr_authorization_token.token: Reading...
module.aws_lambda_function.data.aws_caller_identity.current: Reading...
module.docker_image.data.aws_region.current: Reading...
module.docker_image.data.aws_caller_identity.this: Reading...
module.docker_image.aws_ecr_repository.this[0]: Refreshing state... [id=climate-analysis]
module.aws_lambda_function.data.aws_region.current: Reading...
aws_apigatewayv2_api.api: Refreshing state... [id=040fg458ka]
aws_s3_bucket.app_s3: Refreshing state... [id=climate-analysis-bucket]
module.aws_lambda_function.aws_cloudwatch_log_group.lambda[0]: Refreshing state... [id=/aws/lambda/climate_analysis_lambda]
module.aws_lambda_function.data.aws_region.current: Read complete after 0s [id=eu-north-1]
module.docker_image.data.aws_region.current: Read complete after 0s [id=eu-north-1]
module.aws_lambda_function.data.aws_partition.current: Read complete after 0s [id=aws]
data.aws_caller_identity.current: Reading...
aws_iam_role.app_role: Refreshing state... [id=climate_app_role]
module.aws_lambda_function.data.aws_caller_identity.current: Read complete after 0s [id=266796786618]
module.docker_image.data.aws_caller_identity.this: Read complete after 0s [id=266796786618]
aws_iam_role_policy_attachment.ecs_read: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly]
aws_iam_role_policy_attachment.lambda_basic: Refreshing state... [id=climate_app_role/arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole]
data.aws_caller_identity.current: Read complete after 0s [id=266796786618]
aws_apigatewayv2_stage.default_stage: Refreshing state... [id=$default]
data.aws_ecr_authorization_token.token: Read complete after 1s [id=eu-north-1]
module.docker_image.aws_ecr_lifecycle_policy.this[0]: Refreshing state... [id=climate-analysis]
module.docker_image.docker_image.this: Refreshing state... [id=sha256:b52023c0f84a10cb024f80085df5f5e83c4f77afdb6ce7ef1bc5abe119c4a342266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi]
module.docker_image.docker_registry_image.this: Refreshing state... [id=sha256:12b9896c8cc89e32bdb6100d98e7c41dbe03bae75c175389108e4afa82c0b7b0]
null_resource.cleanup_zip: Refreshing state... [id=9034304018553160492]
module.aws_lambda_function.aws_lambda_function.this[0]: Refreshing state... [id=climate_analysis_lambda]
aws_apigatewayv2_integration.lambda_integration: Refreshing state... [id=a4fgymd]
aws_lambda_permission.apigw_invoke: Refreshing state... [id=AllowAPIGatewayInvoke]
aws_apigatewayv2_route.root_route: Refreshing state... [id=i3s6lws]
data.aws_iam_policy_document.aws_policy_doc: Reading...
data.aws_iam_policy_document.aws_policy_doc: Read complete after 0s [id=1638820244]
aws_s3_bucket_public_access_block.s3_access: Refreshing state... [id=climate-analysis-bucket]
aws_iam_policy.policy: Refreshing state... [id=arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]
aws_iam_role_policy_attachment.app_role_policy_attach: Refreshing state... [id=climate_app_role/arn:aws:iam::266796786618:policy/climate_analysis_resources_policy]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.docker_image.docker_image.this has been deleted
  - resource "docker_image" "this" {
        id           = "sha256:b52023c0f84a10cb024f80085df5f5e83c4f77afdb6ce7ef1bc5abe119c4a342266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi"
      - image_id     = "sha256:b52023c0f84a10cb024f80085df5f5e83c4f77afdb6ce7ef1bc5abe119c4a342" -> null
      - name         = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi" -> null
        # (3 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }


Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.

─────────────────────────────────────────────────────────────────────────────

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
+/- create replacement and then destroy

Terraform will perform the following actions:

  # module.docker_image.docker_image.this will be created
  + resource "docker_image" "this" {
      + force_remove = false
      + id           = (known after apply)
      + image_id     = (known after apply)
      + keep_locally = false
      + name         = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi"
      + repo_digest  = (known after apply)

      + build {
          + cache_from     = []
          + context        = "../"
          + dockerfile     = "Dockerfile"
          + extra_hosts    = []
          + remove         = true
          + security_opt   = []
          + tag            = []
            # (13 unchanged attributes hidden)
        }
    }

  # module.docker_image.docker_registry_image.this must be replaced
+/- resource "docker_registry_image" "this" {
      ~ id                   = "sha256:12b9896c8cc89e32bdb6100d98e7c41dbe03bae75c175389108e4afa82c0b7b0" -> (known after apply)
        name                 = "266796786618.dkr.ecr.eu-north-1.amazonaws.com/climate-analysis:BSNUTlx9-cEi"
      ~ sha256_digest        = "sha256:12b9896c8cc89e32bdb6100d98e7c41dbe03bae75c175389108e4afa82c0b7b0" -> (known after apply)
      ~ triggers             = {
          - "image_id" = "sha256:b52023c0f84a10cb024f80085df5f5e83c4f77afdb6ce7ef1bc5abe119c4a342"
        } -> (known after apply) # forces replacement
        # (2 unchanged attributes hidden)
    }

Plan: 2 to add, 0 to change, 1 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.
Releasing state lock. This may take a few moments...

Pusher: @ana-sher, Action: pull_request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant