Skip to content

Conversation

Shaikdavudh11
Copy link
Owner

Notes

  • This PR is created by StackGen to update the IAC files.

References

Copy link

Terraform Plan Output:

module.appcd_551e1d2b-88ec-5406-87cf-c51521bbe894.data.aws_caller_identity.current: Reading...
module.appcd_b71fd16c-797e-5a95-8e1b-ab22f1e34f43.aws_iam_role.this: Refreshing state... [id=hello-kitty-role-function-shaik-davudh15]
module.appcd_551e1d2b-88ec-5406-87cf-c51521bbe894.aws_kms_key.custom_s3_kms_key[0]: Refreshing state... [id=05255e48-c18f-43d7-8828-d1372ce4ad1f]
module.appcd_551e1d2b-88ec-5406-87cf-c51521bbe894.aws_s3_bucket.this: Refreshing state... [id=shaik-davudh-15]
module.appcd_551e1d2b-88ec-5406-87cf-c51521bbe894.data.aws_caller_identity.current: Read complete after 0s [id=222634395437]
module.appcd_551e1d2b-88ec-5406-87cf-c51521bbe894.aws_s3_bucket_public_access_block.this: Refreshing state... [id=shaik-davudh-15]
module.appcd_551e1d2b-88ec-5406-87cf-c51521bbe894.aws_s3_bucket_server_side_encryption_configuration.this[0]: Refreshing state... [id=shaik-davudh-15]
module.appcd_e26aeaa0-8250-4383-b98b-f90a82b3c8b5.aws_iam_role_policy.this: Refreshing state... [id=hello-kitty-role-function-shaik-davudh15:aws_s3-hello-kitty-policy]
module.appcd_551e1d2b-88ec-5406-87cf-c51521bbe894.aws_s3_bucket_versioning.this[0]: Refreshing state... [id=shaik-davudh-15]
module.appcd_551e1d2b-88ec-5406-87cf-c51521bbe894.aws_kms_alias.a[0]: Refreshing state... [id=alias/s3-shaik-davudh-15]

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

Terraform will perform the following actions:

  # module.appcd_00a20b0a-2ec0-5bdc-a08d-65a85dc81d5b.aws_lambda_function.this will be created
  + resource "aws_lambda_function" "this" {
      + architectures                  = [
          + "x86_64",
        ]
      + arn                            = (known after apply)
      + code_sha256                    = (known after apply)
      + function_name                  = "hello-kitty-function-davudh-15"
      + handler                        = "main.lambda_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)
      + qualified_invoke_arn           = (known after apply)
      + reserved_concurrent_executions = -1
      + role                           = (known after apply)
      + runtime                        = "python3.8"
      + s3_bucket                      = "stackgen-builds"
      + s3_key                         = "build/app.zip"
      + signing_job_arn                = (known after apply)
      + signing_profile_version_arn    = (known after apply)
      + skip_destroy                   = false
      + source_code_hash               = (known after apply)
      + source_code_size               = (known after apply)
      + tags                           = {
          + "appstack"  = "hello-kitty-shaik"
          + "component" = "hello-kitty"
        }
      + tags_all                       = {
          + "appstack"  = "hello-kitty-shaik"
          + "component" = "hello-kitty"
        }
      + timeout                        = 3
      + version                        = (known after apply)

      + environment {
          + variables = {
              + "IMAGES_BUCKET" = "davudh-15"
            }
        }

      + ephemeral_storage (known after apply)

      + logging_config (known after apply)

      + tracing_config (known after apply)
    }

  # module.appcd_00a20b0a-2ec0-5bdc-a08d-65a85dc81d5b.aws_lambda_function_url.this[0] will be created
  + resource "aws_lambda_function_url" "this" {
      + authorization_type = "NONE"
      + function_arn       = (known after apply)
      + function_name      = "hello-kitty-function-davudh-15"
      + function_url       = (known after apply)
      + id                 = (known after apply)
      + invoke_mode        = "BUFFERED"
      + url_id             = (known after apply)
    }

  # module.appcd_551e1d2b-88ec-5406-87cf-c51521bbe894.aws_kms_alias.a[0] must be replaced
-/+ resource "aws_kms_alias" "a" {
      ~ arn            = "arn:aws:kms:us-west-2:222634395437:alias/s3-shaik-davudh-15" -> (known after apply)
      ~ id             = "alias/s3-shaik-davudh-15" -> (known after apply)
      ~ name           = "alias/s3-shaik-davudh-15" -> "alias/s3-davudh-15" # forces replacement
      + name_prefix    = (known after apply)
      ~ target_key_arn = "arn:aws:kms:us-west-2:222634395437:key/05255e48-c18f-43d7-8828-d1372ce4ad1f" -> (known after apply)
        # (1 unchanged attribute hidden)
    }

  # module.appcd_551e1d2b-88ec-5406-87cf-c51521bbe894.aws_s3_bucket.this must be replaced
-/+ resource "aws_s3_bucket" "this" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      ~ arn                         = "arn:aws:s3:::shaik-davudh-15" -> (known after apply)
      ~ bucket                      = "shaik-davudh-15" -> "davudh-15" # forces replacement
      ~ bucket_domain_name          = "shaik-davudh-15.s3.amazonaws.com" -> (known after apply)
      + bucket_prefix               = (known after apply)
      ~ bucket_regional_domain_name = "shaik-davudh-15.s3.us-west-2.amazonaws.com" -> (known after apply)
      ~ hosted_zone_id              = "Z3BJ6K6RIION7M" -> (known after apply)
      ~ id                          = "shaik-davudh-15" -> (known after apply)
      ~ object_lock_enabled         = false -> (known after apply)
      + policy                      = (known after apply)
      ~ region                      = "us-west-2" -> (known after apply)
      ~ request_payer               = "BucketOwner" -> (known after apply)
        tags                        = {
            "appstack"  = "hello-kitty-shaik"
            "component" = "hello-kitty"
        }
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)
        # (2 unchanged attributes hidden)

      ~ cors_rule (known after apply)

      ~ grant (known after apply)
      - grant {
          - id          = "142ffdd1f87132a598f0ca276babbb31f1f8672261731ae3635f0b84be07a341" -> null
          - permissions = [
              - "FULL_CONTROL",
            ] -> null
          - type        = "CanonicalUser" -> null
            # (1 unchanged attribute hidden)
        }

      ~ lifecycle_rule (known after apply)

      ~ logging (known after apply)

      ~ object_lock_configuration (known after apply)

      ~ replication_configuration (known after apply)

      ~ server_side_encryption_configuration (known after apply)
      - server_side_encryption_configuration {
          - rule {
              - bucket_key_enabled = false -> null

              - apply_server_side_encryption_by_default {
                  - kms_master_key_id = "05255e48-c18f-43d7-8828-d1372ce4ad1f" -> null
                  - sse_algorithm     = "aws:kms" -> null
                }
            }
        }

      ~ versioning (known after apply)
      - versioning {
          - enabled    = true -> null
          - mfa_delete = false -> null
        }

      ~ website (known after apply)
    }

  # module.appcd_551e1d2b-88ec-5406-87cf-c51521bbe894.aws_s3_bucket_public_access_block.this must be replaced
-/+ resource "aws_s3_bucket_public_access_block" "this" {
      ~ bucket                  = "shaik-davudh-15" -> (known after apply) # forces replacement
      ~ id                      = "shaik-davudh-15" -> (known after apply)
        # (4 unchanged attributes hidden)
    }

  # module.appcd_551e1d2b-88ec-5406-87cf-c51521bbe894.aws_s3_bucket_server_side_encryption_configuration.this[0] must be replaced
-/+ resource "aws_s3_bucket_server_side_encryption_configuration" "this" {
      ~ bucket                = "shaik-davudh-15" -> (known after apply) # forces replacement
      ~ id                    = "shaik-davudh-15" -> (known after apply)
        # (1 unchanged attribute hidden)

      - rule {
          - bucket_key_enabled = false -> null

          - apply_server_side_encryption_by_default {
              - kms_master_key_id = "05255e48-c18f-43d7-8828-d1372ce4ad1f" -> null
              - sse_algorithm     = "aws:kms" -> null
            }
        }
      + rule {
          + apply_server_side_encryption_by_default {
              + kms_master_key_id = "05255e48-c18f-43d7-8828-d1372ce4ad1f"
              + sse_algorithm     = "aws:kms"
            }
        }
    }

  # module.appcd_551e1d2b-88ec-5406-87cf-c51521bbe894.aws_s3_bucket_versioning.this[0] must be replaced
-/+ resource "aws_s3_bucket_versioning" "this" {
      ~ bucket                = "shaik-davudh-15" -> (known after apply) # forces replacement
      ~ id                    = "shaik-davudh-15" -> (known after apply)
        # (1 unchanged attribute hidden)

      ~ versioning_configuration {
          + mfa_delete = (known after apply)
            # (1 unchanged attribute hidden)
        }
    }

  # module.appcd_86ec452a-770a-59bf-87dd-67ed883e25e5.aws_cloudwatch_log_group.this will be created
  + resource "aws_cloudwatch_log_group" "this" {
      + arn               = (known after apply)
      + id                = (known after apply)
      + log_group_class   = (known after apply)
      + name              = "/aws/lambda/hello-kitty-function"
      + name_prefix       = (known after apply)
      + retention_in_days = 7
      + skip_destroy      = false
      + tags              = {
          + "appstack"  = "hello-kitty-shaik"
          + "component" = "hello-kitty"
        }
      + tags_all          = {
          + "appstack"  = "hello-kitty-shaik"
          + "component" = "hello-kitty"
        }
    }

  # module.appcd_b71fd16c-797e-5a95-8e1b-ab22f1e34f43.aws_iam_role.this must be replaced
-/+ resource "aws_iam_role" "this" {
      ~ arn                   = "arn:aws:iam::222634395437:role/hello-kitty-role-function-shaik-davudh15" -> (known after apply)
      ~ create_date           = "2024-09-28T10:03:11Z" -> (known after apply)
      ~ id                    = "hello-kitty-role-function-shaik-davudh15" -> (known after apply)
      ~ managed_policy_arns   = [] -> (known after apply)
      ~ name                  = "hello-kitty-role-function-shaik-davudh15" -> "hello-kitty-role-function-davudh15" # forces replacement
      + name_prefix           = (known after apply)
        tags                  = {
            "appstack"  = "hello-kitty-shaik"
            "component" = "hello-kitty"
        }
      ~ unique_id             = "AROATHVQLI4WWVWZKGI3M" -> (known after apply)
        # (7 unchanged attributes hidden)

      ~ inline_policy (known after apply)
      - inline_policy {
          - name   = "aws_s3-hello-kitty-policy" -> null
          - policy = jsonencode(
                {
                  - Statement = [
                      - {
                          - Action   = [
                              - "kms:Decrypt",
                              - "kms:Encrypt",
                              - "kms:GenerateDataKey",
                            ]
                          - Effect   = "Allow"
                          - Resource = [
                              - "arn:aws:kms:us-west-2:222634395437:key/05255e48-c18f-43d7-8828-d1372ce4ad1f",
                            ]
                          - Sid      = "AllowKmsAccess"
                        },
                      - {
                          - Action   = [
                              - "s3:PutObject",
                              - "s3:ListBucket",
                              - "s3:GetObject",
                              - "s3:GetObjectVersion",
                            ]
                          - Effect   = "Allow"
                          - Resource = [
                              - "arn:aws:s3:::shaik-davudh-15",
                              - "arn:aws:s3:::shaik-davudh-15/*",
                            ]
                          - Sid      = "hellokittyIMAGESBUCKETS3Bucket551e1d2b88ec540687cfc51521bbe894"
                        },
                    ]
                  - Version   = "2012-10-17"
                }
            ) -> null
        }
    }

  # module.appcd_c2381f17-4f27-4d2d-913d-2e6d9b10badf.aws_iam_role_policy.this will be created
  + resource "aws_iam_role_policy" "this" {
      + id          = (known after apply)
      + name        = "Writer"
      + name_prefix = (known after apply)
      + policy      = (known after apply)
      + role        = "hello-kitty-role-function-davudh15"
    }

  # module.appcd_e26aeaa0-8250-4383-b98b-f90a82b3c8b5.aws_iam_role_policy.this must be replaced
-/+ resource "aws_iam_role_policy" "this" {
      ~ id          = "hello-kitty-role-function-shaik-davudh15:aws_s3-hello-kitty-policy" -> (known after apply)
        name        = "aws_s3-hello-kitty-policy"
      + name_prefix = (known after apply)
      ~ policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = [
                          - "kms:Decrypt",
                          - "kms:Encrypt",
                          - "kms:GenerateDataKey",
                        ]
                      - Effect   = "Allow"
                      - Resource = [
                          - "arn:aws:kms:us-west-2:222634395437:key/05255e48-c18f-43d7-8828-d1372ce4ad1f",
                        ]
                      - Sid      = "AllowKmsAccess"
                    },
                  - {
                      - Action   = [
                          - "s3:PutObject",
                          - "s3:ListBucket",
                          - "s3:GetObject",
                          - "s3:GetObjectVersion",
                        ]
                      - Effect   = "Allow"
                      - Resource = [
                          - "arn:aws:s3:::shaik-davudh-15",
                          - "arn:aws:s3:::shaik-davudh-15/*",
                        ]
                      - Sid      = "hellokittyIMAGESBUCKETS3Bucket551e1d2b88ec540687cfc51521bbe894"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> (known after apply)
      ~ role        = "hello-kitty-role-function-shaik-davudh15" -> "hello-kitty-role-function-davudh15" # forces replacement
    }

Plan: 11 to add, 0 to change, 7 to destroy.

Changes to Outputs:
  + aws_cloudwatch_log_group_aws_lambda_hello_kitty_function_arn  = (known after apply)
  + aws_iam_role_hello_kitty_role_function_davudh15_arn           = (known after apply)
  + aws_iam_role_hello_kitty_role_function_davudh15_name          = "hello-kitty-role-function-davudh15"
  - aws_iam_role_hello_kitty_role_function_shaik_davudh15_arn     = "arn:aws:iam::222634395437:role/hello-kitty-role-function-shaik-davudh15" -> null
  - aws_iam_role_hello_kitty_role_function_shaik_davudh15_name    = "hello-kitty-role-function-shaik-davudh15" -> null
  + aws_lambda_hello_kitty_function_davudh_15_function_arn        = (known after apply)
  + aws_lambda_hello_kitty_function_davudh_15_function_name       = "hello-kitty-function-davudh-15"
  + aws_lambda_hello_kitty_function_davudh_15_function_url        = (known after apply)
  + aws_lambda_hello_kitty_function_davudh_15_invoke_arn          = (known after apply)
  - aws_lambda_hello_kitty_function_shaik_15_function_name        = "hello-kitty-function-shaik-15" -> null
  + aws_s3_davudh_15_arn                                          = (known after apply)
  + aws_s3_davudh_15_bucket_name                                  = (known after apply)
  + aws_s3_davudh_15_kms_arn                                      = "arn:aws:kms:us-west-2:222634395437:key/05255e48-c18f-43d7-8828-d1372ce4ad1f"
  - aws_s3_shaik_davudh_15_arn                                    = "arn:aws:s3:::shaik-davudh-15" -> null
  - aws_s3_shaik_davudh_15_bucket_name                            = "shaik-davudh-15" -> null
  - aws_s3_shaik_davudh_15_kms_arn                                = "arn:aws:kms:us-west-2:222634395437:key/05255e48-c18f-43d7-8828-d1372ce4ad1f" -> null

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

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.

@Shaikdavudh11 Shaikdavudh11 merged commit 3e94eeb into main Sep 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants