Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

removed log stream resource since it is created by function #12

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

kunduso
Copy link
Owner

@kunduso kunduso commented Jun 11, 2024

No description provided.

@kunduso kunduso self-assigned this Jun 11, 2024
Copy link

💰 Infracost report

Monthly cost will not change

This comment will be updated when code changes.

Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Terraform Validation 🤖success

Show Plan

terraform
data.archive_file.python_file: Reading...
aws_cloudwatch_log_stream.lambda_log_stream: Refreshing state... [id=app-7-lambda-log-stream]
aws_kms_key.encryption_rest: Refreshing state... [id=220735b2-d633-4fa5-b9dc-07c2b410193f]
data.aws_caller_identity.current: Reading...
aws_iam_role.lambda_role: Refreshing state... [id=app-7-lambda-role]
data.aws_caller_identity.current: Read complete after 0s [id=743794601996]
aws_kms_alias.encryption_rest: Refreshing state... [id=alias/lambda-app-7-at-rest]
aws_cloudwatch_log_group.lambda_log: Refreshing state... [id=app-7]
aws_kms_key_policy.encryption_rest_policy: Refreshing state... [id=220735b2-d633-4fa5-b9dc-07c2b410193f]
aws_ssm_parameter.parameter: Refreshing state... [id=/app-7]
aws_lambda_function.lambda_run: Refreshing state... [id=write_parameter_to_cloudwatch]
data.archive_file.python_file: Read complete after 1s [id=bf48155394d42c8fbe0f52e181e2a0a15a7f56c7]
aws_iam_policy.lambda_policy: Refreshing state... [id=arn:aws:iam::743794601996:policy/app-7-lambda-policy]
aws_iam_role_policy_attachment.lambda_policy_attachement: Refreshing state... [id=app-7-lambda-role-20240611023939013200000001]

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

Terraform will perform the following actions:

  # aws_cloudwatch_log_stream.lambda_log_stream will be destroyed
  # (because aws_cloudwatch_log_stream.lambda_log_stream is not in configuration)
  - resource "aws_cloudwatch_log_stream" "lambda_log_stream" {
      - arn            = "arn:aws:logs:us-east-2:743794601996:log-group:app-7:log-stream:app-7-lambda-log-stream" -> null
      - id             = "app-7-lambda-log-stream" -> null
      - log_group_name = "app-7" -> null
      - name           = "app-7-lambda-log-stream" -> null
    }

  # aws_iam_policy.lambda_policy will be updated in-place
  ~ resource "aws_iam_policy" "lambda_policy" {
        id               = "arn:aws:iam::743794601996:policy/app-7-lambda-policy"
        name             = "app-7-lambda-policy"
      ~ policy           = jsonencode(
          ~ {
              ~ Statement = [
                    {
                        Action   = [
                            "ssm:GetParameters",
                            "ssm:GetParameter",
                        ]
                        Effect   = "Allow"
                        Resource = [
                            "arn:aws:ssm:us-east-2:743794601996:parameter/app-7",
                        ]
                    },
                  ~ {
                      ~ Resource = [
                            "arn:aws:logs:us-east-2:743794601996:log-group:app-7",
                          - "arn:aws:logs:us-east-2:743794601996:log-group:app-7:log-stream:app-7-lambda-log-stream",
                        ]
                        # (2 unchanged attributes hidden)
                    },
                    {
                        Action   = [
                            "kms:Decrypt",
                        ]
                        Effect   = "Allow"
                        Resource = [
                            "arn:aws:kms:us-east-2:743794601996:key/220735b2-d633-4fa5-b9dc-07c2b410193f",
                        ]
                    },
                ]
                # (1 unchanged attribute hidden)
            }
        )
        tags             = {}
        # (7 unchanged attributes hidden)
    }

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

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

Saved the plan to: TFplan.JSON

To perform exactly these actions, run the following command to apply:
    terraform apply "TFplan.JSON"

Pushed by: @kunduso, Action: pull_request

@kunduso kunduso merged commit ed32378 into main Jun 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant