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

Lambda terraform #34

Merged
merged 14 commits into from
Sep 27, 2023
Merged

Lambda terraform #34

merged 14 commits into from
Sep 27, 2023

Conversation

Rithin-QB
Copy link
Collaborator

@Rithin-QB Rithin-QB commented Sep 22, 2023

Terraform Plan:

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:

module.my_lambda.aws_iam_policy_attachment.lambda_policy_attachment[0] will be created

  • resource "aws_iam_policy_attachment" "lambda_policy_attachment" {
    • id = (known after apply)
    • name = "lambda-policy-attachment-0"
    • policy_arn = "arn:aws:iam::aws:policy/AmazonEC2FullAccess"
    • roles = [
      • "MyLambdaFunction-execution-role",
        ]
        }

module.my_lambda.aws_iam_policy_attachment.lambda_policy_attachment[1] will be created

  • resource "aws_iam_policy_attachment" "lambda_policy_attachment" {
    • id = (known after apply)
    • name = "lambda-policy-attachment-1"
    • policy_arn = "arn:aws:iam::691936972587:policy/service-role/AWSLambdaBasicExecutionRole-a61b5924-9719-48a9-8b48-d5a12a46fa1e"
    • roles = [
      • "MyLambdaFunction-execution-role",
        ]
        }

module.my_lambda.aws_iam_role.lambda_execution_role will be created

  • resource "aws_iam_role" "lambda_execution_role" {
    • arn = (known after apply)
    • assume_role_policy = jsonencode(
      {
      + Statement = [
      + {
      + Action = "sts:AssumeRole"
      + Effect = "Allow"
      + Principal = {
      + Service = "lambda.amazonaws.com"
      }
      },
      ]
      + Version = "2012-10-17"
      }
      )
    • create_date = (known after apply)
    • force_detach_policies = false
    • id = (known after apply)
    • managed_policy_arns = (known after apply)
    • max_session_duration = 3600
    • name = "MyLambdaFunction-execution-role"
    • name_prefix = (known after apply)
    • path = "/"
    • tags = {
      • "Name" = "qburst-lambda-role"
        }
    • tags_all = {
      • "Environment" = "Test"
      • "Name" = "qburst-lambda-role"
      • "Project" = "QBurst"
        }
    • unique_id = (known after apply)
      }

module.my_lambda.aws_lambda_function.lambda will be created

  • resource "aws_lambda_function" "lambda" {
    • architectures = (known after apply)

    • arn = (known after apply)

    • description = "Delete default VPCs"

    • filename = "./lambda_zip/lambda1.zip"

    • function_name = "MyLambdaFunction"

    • handler = "lambda1.lambda_handler"

    • id = (known after apply)

    • invoke_arn = (known after apply)

    • last_modified = (known after apply)

    • memory_size = 256

    • 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.11"

    • signing_job_arn = (known after apply)

    • signing_profile_version_arn = (known after apply)

    • skip_destroy = false

    • source_code_hash = "k5L2ZfcvSqKOI9lU4b+DPLZ9IR06UquGK2lu9HE9LS4="

    • source_code_size = (known after apply)

    • tags = {

      • "Name" = "qburst-lambda"
        }
    • tags_all = {

      • "Environment" = "Test"
      • "Name" = "qburst-lambda"
      • "Project" = "QBurst"
        }
    • timeout = 60

    • version = (known after apply)

    • environment {

      • variables = {
        • "MY_ENV_VAR" = "some-value"
          }
          }
          }

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

@qburst-praven
Copy link
Collaborator

@Rithin-QB , can u please add the plan to the PR description. Also, please run
terraform fmt --recursive
once against all your code.

@Rithin-QB
Copy link
Collaborator Author

@Rithin-QB , can u please add the plan to the PR description. Also, please run terraform fmt --recursive once against all your code.

@qburst-praven , I have added the plan in PR description as mentioned. Also, ran terraform fmt --recursive.

@Rithin-QB Rithin-QB merged commit 881f0a3 into main Sep 27, 2023
@Rithin-QB Rithin-QB deleted the lambda-terraform branch September 27, 2023 06:01
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