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

updated resource name and added default value #6

Merged
merged 1 commit into from
Jun 11, 2024
Merged

Conversation

kunduso
Copy link
Owner

@kunduso kunduso commented Jun 11, 2024

This PR closes #3

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

💰 Infracost report

Monthly cost will not change

Changed project Baseline cost Usage cost* Total change New monthly cost
kunduso/add-aws-lambda-terraform/TFplan.JSON +$0 +$0 +$0 $1

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

Cost details
Key: * usage cost, ~ changed, + added, - removed

──────────────────────────────────
Project: kunduso/add-aws-lambda-terraform/TFplan.JSON

+ aws_cloudwatch_log_group.lambda_log
  Monthly cost depends on usage

    + Data ingested
      Monthly cost depends on usage
        +$0.50 per GB

    + Archival Storage
      Monthly cost depends on usage
        +$0.03 per GB

    + Insights queries data scanned
      Monthly cost depends on usage
        +$0.005 per GB

Monthly cost change for kunduso/add-aws-lambda-terraform/TFplan.JSON
Amount:  $0.00 ($1 → $1)
Percent: 0%

──────────────────────────────────
Key: * usage cost, ~ changed, + added, - removed

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

8 cloud resources were detected:
∙ 2 were estimated
∙ 6 were free
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.aws_caller_identity.current: Reading...
aws_kms_key.encryption_rest: Refreshing state... [id=220735b2-d633-4fa5-b9dc-07c2b410193f]
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_kms_key_policy.encryption_rest_policy: Refreshing state... [id=220735b2-d633-4fa5-b9dc-07c2b410193f]

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:

  # aws_cloudwatch_log_group.lambda_log will be created
  + resource "aws_cloudwatch_log_group" "lambda_log" {
      + arn               = (known after apply)
      + id                = (known after apply)
      + kms_key_id        = "arn:aws:kms:us-east-2:743794601996:key/220735b2-d633-4fa5-b9dc-07c2b410193f"
      + log_group_class   = (known after apply)
      + name              = "app-7"
      + name_prefix       = (known after apply)
      + retention_in_days = 365
      + skip_destroy      = false
      + tags_all          = {
          + "Source" = "https://github.com/kunduso/add-aws-lambda-terraform"
        }
    }

  # aws_iam_policy.lambda_policy will be created
  + resource "aws_iam_policy" "lambda_policy" {
      + arn              = (known after apply)
      + attachment_count = (known after apply)
      + description      = "AWS IAM policy for the lambda role."
      + id               = (known after apply)
      + name             = "app-7-lambda-policy"
      + name_prefix      = (known after apply)
      + path             = "/"
      + policy           = (known after apply)
      + policy_id        = (known after apply)
      + tags_all         = {
          + "Source" = "https://github.com/kunduso/add-aws-lambda-terraform"
        }
    }

  # aws_iam_role.lambda_role must be replaced
-/+ resource "aws_iam_role" "lambda_role" {
      ~ arn                   = "arn:aws:iam::743794601996:role/app-7_lambda_role" -> (known after apply)
      ~ create_date           = "2024-06-11T02:10:32Z" -> (known after apply)
      ~ id                    = "app-7_lambda_role" -> (known after apply)
      ~ managed_policy_arns   = [] -> (known after apply)
      ~ name                  = "app-7_lambda_role" -> "app-7-lambda-role" # forces replacement
      + name_prefix           = (known after apply)
      - tags                  = {} -> null
      ~ unique_id             = "AROA22LM46AGDKWFTNB72" -> (known after apply)
        # (7 unchanged attributes hidden)
    }

  # aws_iam_role_policy_attachment.lambda_policy_attachement will be created
  + resource "aws_iam_role_policy_attachment" "lambda_policy_attachement" {
      + id         = (known after apply)
      + policy_arn = (known after apply)
      + role       = "app-7-lambda-role"
    }

  # aws_ssm_parameter.parameter will be created
  + resource "aws_ssm_parameter" "parameter" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = "220735b2-d633-4fa5-b9dc-07c2b410193f"
      + name           = "/app-7"
      + tags_all       = {
          + "Source" = "https://github.com/kunduso/add-aws-lambda-terraform"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

Plan: 5 to add, 0 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 6f1d9a9 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.

Add AWS Cloud resources
1 participant