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

Add lambda #11

Merged
merged 4 commits into from
Jun 11, 2024
Merged

Add lambda #11

merged 4 commits into from
Jun 11, 2024

Conversation

kunduso
Copy link
Owner

@kunduso kunduso commented Jun 11, 2024

This PR closes #9 and closes #8

@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_lambda_function.lambda_run
  Monthly cost depends on usage

    + Requests
      Monthly cost depends on usage
        +$0.20 per 1M requests

    + Ephemeral storage
      Monthly cost depends on usage
        +$0.0000000309 per GB-seconds

    + Duration (first 6B)
      Monthly cost depends on usage
        +$0.0000166667 per GB-seconds

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.

10 cloud resources were detected:
∙ 3 were estimated
∙ 7 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.archive_file.python_file: Reading...
data.archive_file.python_file: Read complete after 0s [id=bf48155394d42c8fbe0f52e181e2a0a15a7f56c7]
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]
aws_cloudwatch_log_group.lambda_log: Refreshing state... [id=app-7]
aws_ssm_parameter.parameter: Refreshing state... [id=/app-7]
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:
  + create

Terraform will perform the following actions:

  # aws_cloudwatch_log_stream.lambda_log_stream will be created
  + resource "aws_cloudwatch_log_stream" "lambda_log_stream" {
      + arn            = (known after apply)
      + id             = (known after apply)
      + log_group_name = "app-7"
      + name           = "app-7-lambda-log-stream"
    }

  # aws_lambda_function.lambda_run will be created
  + resource "aws_lambda_function" "lambda_run" {
      + architectures                  = (known after apply)
      + arn                            = (known after apply)
      + code_sha256                    = (known after apply)
      + filename                       = "./lambda_function/lambda_function.zip"
      + function_name                  = "write_parameter_to_cloudwatch"
      + handler                        = "handler.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                           = "arn:aws:iam::743794601996:role/app-7-lambda-role"
      + runtime                        = "python3.8"
      + 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_all                       = {
          + "Source" = "https://github.com/kunduso/add-aws-lambda-terraform"
        }
      + timeout                        = 3
      + version                        = (known after apply)
    }

Plan: 2 to add, 0 to change, 0 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 15fd416 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 the python code Add the lambda aws resource
1 participant