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

feat: switch to food items #3

Merged
merged 1 commit into from
Jul 27, 2023
Merged

feat: switch to food items #3

merged 1 commit into from
Jul 27, 2023

Conversation

Chriscbr
Copy link
Contributor

No description provided.

@github-actions
Copy link

Terraform Plan

Show Plan
aws_iam_role_policy.cloudApi_cloudApi-OnRequest-41f14472_IamRolePolicy_2728B668: Refreshing state... [id=terraform-20230727202411679300000004:terraform-20230727202424568600000009]
aws_iam_role.cloudApi_cloudApi-OnRequest-1174f72e_IamRole_5C0487F1: Refreshing state... [id=terraform-20230727202411674700000002]
aws_api_gateway_deployment.cloudApi_api_deployment_545514BF: Refreshing state... [id=orwyme]
aws_iam_role_policy_attachment.cloudApi_cloudApi-OnRequest-41f14472_IamRolePolicyAttachment_73CC9260: Refreshing state... [id=terraform-20230727202411679300000004-20230727202411906100000006]
aws_iam_role_policy_attachment.cloudApi_cloudApi-OnRequest-1174f72e_IamRolePolicyAttachment_2304EB12: Refreshing state... [id=terraform-20230727202411674700000002-20230727202411910100000007]
aws_s3_object.cloudApi_cloudApi-OnRequest-41f14472_S3Object_2D3CDD60: Refreshing state... [id=asset.c81170c6eea85213cd98217b95378895ec0689d1c6.ef8f6d21adde3312fdddf04201948ce1.zip]
aws_lambda_function.cloudApi_cloudApi-OnRequest-41f14472_B4385311: Refreshing state... [id=cloud-Api-OnRequest-41f14472-c81170c6]
aws_api_gateway_stage.cloudApi_api_stage_BBB283E4: Refreshing state... [id=ags-p2l4j1gmv2-prod]
aws_lambda_permission.cloudApi_api_permission-POST-cb38ebcb_8FB5CBF5: Refreshing state... [id=AllowExecutionFromAPIGateway-POST-cb38ebcb]
aws_s3_object.cloudApi_cloudApi-OnRequest-1174f72e_S3Object_9D8ECEAD: Refreshing state... [id=asset.c8de6200ddb9f8a3590b097bfde9bdd5326dd904e9.6192f915b6c64cd9d2b8b5d3b5de10ce.zip]
aws_lambda_function.cloudApi_cloudApi-OnRequest-1174f72e_2F82FED3: Refreshing state... [id=cloud-Api-OnRequest-1174f72e-c8de6200]
aws_lambda_permission.cloudApi_api_permission-GET-60cabf0c_3E7E8C53: Refreshing state... [id=AllowExecutionFromAPIGateway-GET-60cabf0c]
aws_api_gateway_rest_api.cloudApi_api_2B334D75: Refreshing state... [id=p2l4j1gmv2]
aws_iam_role_policy.cloudApi_cloudApi-OnRequest-1174f72e_IamRolePolicy_9062CFE8: Refreshing state... [id=terraform-20230727202411674700000002:terraform-2023072720242456900000000a]
aws_iam_role.cloudApi_cloudApi-OnRequest-41f14472_IamRole_60C118A3: Refreshing state... [id=terraform-20230727202411679300000004]
aws_s3_bucket.Code: Refreshing state... [id=code-c84a50b1-20230727202411678600000003]
data.aws_region.Region: Reading...
aws_dynamodb_table.VotingAppItems_tfawsdynamodbTableDynamodbTable_21A977CE: Refreshing state... [id=Table-0e93c191]
data.aws_region.Region: Read complete after 0s [id=us-east-1]
aws_iam_role.InitializeTable_Function_IamRole_E3F0843D: Refreshing state... [id=terraform-20230727202411672600000001]
aws_iam_role_policy_attachment.InitializeTable_Function_IamRolePolicyAttachment_4435DE19: Refreshing state... [id=terraform-20230727202411672600000001-20230727202411887400000005]
aws_iam_role_policy.InitializeTable_Function_IamRolePolicy_2AD89519: Refreshing state... [id=terraform-20230727202411672600000001:terraform-20230727202424567600000008]
aws_s3_object.InitializeTable_Function_S3Object_F5933D3B: Refreshing state... [id=asset.c8e7055bb3773d297f63b5172fb6a571cddc069012.a59c80da992150b2fbbcd74b21cc13e5.zip]
aws_lambda_function.InitializeTable_Function_FD00736D: Refreshing state... [id=Function-c8e7055b]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
  - destroy
-/+ destroy and then create replacement
+/- create replacement and then destroy
 <= read (data resources)

Terraform will perform the following actions:

  # data.aws_lambda_invocation.InitializeTable_Invocation_6E01246F will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "aws_lambda_invocation" "InitializeTable_Invocation_6E01246F" {
      + function_name = "Function-c8e7055b"
      + id            = (known after apply)
      + input         = jsonencode({})
      + result        = (known after apply)
    }

  # aws_api_gateway_deployment.VotingAppApi_api_deployment_B9647894 will be created
  + resource "aws_api_gateway_deployment" "VotingAppApi_api_deployment_B9647894" {
      + created_date  = (known after apply)
      + execution_arn = (known after apply)
      + id            = (known after apply)
      + invoke_url    = (known after apply)
      + rest_api_id   = (known after apply)
      + triggers      = {
          + "redeployment" = "4067b106aab2d8e9f59b16ff863b180cdb8a650f"
        }
    }

  # aws_api_gateway_deployment.cloudApi_api_deployment_545514BF will be destroyed
  # (because aws_api_gateway_deployment.cloudApi_api_deployment_545514BF is not in configuration)
  - resource "aws_api_gateway_deployment" "cloudApi_api_deployment_545514BF" {
      - created_date  = "2023-07-27T20:24:31Z" -> null
      - execution_arn = "arn:aws:execute-api:us-east-1:223316951128:p2l4j1gmv2/" -> null
      - id            = "orwyme" -> null
      - invoke_url    = "https://p2l4j1gmv2.execute-api.us-east-1.amazonaws.com/" -> null
      - rest_api_id   = "p2l4j1gmv2" -> null
      - triggers      = {
          - "redeployment" = "4067b106aab2d8e9f59b16ff863b180cdb8a650f"
        } -> null
    }

  # aws_api_gateway_rest_api.VotingAppApi_api_CB41EC98 will be created
  + resource "aws_api_gateway_rest_api" "VotingAppApi_api_CB41EC98" {
      + api_key_source               = (known after apply)
      + arn                          = (known after apply)
      + binary_media_types           = (known after apply)
      + body                         = (known after apply)
      + created_date                 = (known after apply)
      + description                  = (known after apply)
      + disable_execute_api_endpoint = (known after apply)
      + execution_arn                = (known after apply)
      + id                           = (known after apply)
      + minimum_compression_size     = -1
      + name                         = "api-c8bc2868"
      + policy                       = (known after apply)
      + root_resource_id             = (known after apply)
      + tags_all                     = (known after apply)
    }

  # aws_api_gateway_rest_api.cloudApi_api_2B334D75 will be destroyed
  # (because aws_api_gateway_rest_api.cloudApi_api_2B334D75 is not in configuration)
  - resource "aws_api_gateway_rest_api" "cloudApi_api_2B334D75" {
      - api_key_source               = "HEADER" -> null
      - arn                          = "arn:aws:apigateway:us-east-1::/restapis/p2l4j1gmv2" -> null
      - binary_media_types           = [] -> null
      - body                         = jsonencode(
            {
              - openapi = "3.0.3"
              - paths   = {
                  - "/items" = {
                      - get = {
                          - operationId                     = "get-items"
                          - parameters                      = []
                          - responses                       = {
                              - "200" = {
                                  - content     = {}
                                  - description = "200 response"
                                }
                            }
                          - x-amazon-apigateway-integration = {
                              - contentHandling     = "CONVERT_TO_TEXT"
                              - httpMethod          = "POST"
                              - passthroughBehavior = "when_no_match"
                              - responses           = {
                                  - default = {
                                      - statusCode = "200"
                                    }
                                }
                              - type                = "aws_proxy"
                              - uri                 = "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:223316951128:function:cloud-Api-OnRequest-41f14472-c81170c6/invocations"
                            }
                        }
                    }
                  - "/vote"  = {
                      - post = {
                          - operationId                     = "post-vote"
                          - parameters                      = []
                          - responses                       = {
                              - "200" = {
                                  - content     = {}
                                  - description = "200 response"
                                }
                            }
                          - x-amazon-apigateway-integration = {
                              - contentHandling     = "CONVERT_TO_TEXT"
                              - httpMethod          = "POST"
                              - passthroughBehavior = "when_no_match"
                              - responses           = {
                                  - default = {
                                      - statusCode = "200"
                                    }
                                }
                              - type                = "aws_proxy"
                              - uri                 = "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:223316951128:function:cloud-Api-OnRequest-1174f72e-c8de6200/invocations"
                            }
                        }
                    }
                }
            }
        ) -> null
      - created_date                 = "2023-07-27T20:24:30Z" -> null
      - disable_execute_api_endpoint = false -> null
      - execution_arn                = "arn:aws:execute-api:us-east-1:223316951128:p2l4j1gmv2" -> null
      - id                           = "p2l4j1gmv2" -> null
      - minimum_compression_size     = -1 -> null
      - name                         = "api-c895068c" -> null
      - root_resource_id             = "5jabvd2jb8" -> null
      - tags                         = {} -> null
      - tags_all                     = {} -> null

      - endpoint_configuration {
          - types            = [
              - "EDGE",
            ] -> null
          - vpc_endpoint_ids = [] -> null
        }
    }

  # aws_api_gateway_stage.VotingAppApi_api_stage_9B2FA9EA will be created
  + resource "aws_api_gateway_stage" "VotingAppApi_api_stage_9B2FA9EA" {
      + arn           = (known after apply)
      + deployment_id = (known after apply)
      + execution_arn = (known after apply)
      + id            = (known after apply)
      + invoke_url    = (known after apply)
      + rest_api_id   = (known after apply)
      + stage_name    = "prod"
      + tags_all      = (known after apply)
      + web_acl_arn   = (known after apply)
    }

  # aws_api_gateway_stage.cloudApi_api_stage_BBB283E4 will be destroyed
  # (because aws_api_gateway_stage.cloudApi_api_stage_BBB283E4 is not in configuration)
  - resource "aws_api_gateway_stage" "cloudApi_api_stage_BBB283E4" {
      - arn                   = "arn:aws:apigateway:us-east-1::/restapis/p2l4j1gmv2/stages/prod" -> null
      - cache_cluster_enabled = false -> null
      - deployment_id         = "orwyme" -> null
      - execution_arn         = "arn:aws:execute-api:us-east-1:223316951128:p2l4j1gmv2/prod" -> null
      - id                    = "ags-p2l4j1gmv2-prod" -> null
      - invoke_url            = "https://p2l4j1gmv2.execute-api.us-east-1.amazonaws.com/prod" -> null
      - rest_api_id           = "p2l4j1gmv2" -> null
      - stage_name            = "prod" -> null
      - tags                  = {} -> null
      - tags_all              = {} -> null
      - variables             = {} -> null
      - xray_tracing_enabled  = false -> null
    }

  # aws_dynamodb_table.VotingAppItems_tfawsdynamodbTableDynamodbTable_21A977CE must be replaced
+/- resource "aws_dynamodb_table" "VotingAppItems_tfawsdynamodbTableDynamodbTable_21A977CE" {
      ~ arn                         = "arn:aws:dynamodb:us-east-1:223316951128:table/Table-0e93c191" -> (known after apply)
      - deletion_protection_enabled = false -> null
      ~ id                          = "Table-0e93c191" -> (known after apply)
      ~ name                        = "Table-0e93c191" -> "VotingAppItems-0e93c191" # forces replacement
      ~ read_capacity               = 0 -> (known after apply)
      + stream_arn                  = (known after apply)
      - stream_enabled              = false -> null
      + stream_label                = (known after apply)
      + stream_view_type            = (known after apply)
      - table_class                 = "STANDARD" -> null
      - tags                        = {} -> null
      ~ tags_all                    = {} -> (known after apply)
      ~ write_capacity              = 0 -> (known after apply)
        # (2 unchanged attributes hidden)

      - point_in_time_recovery {
          - enabled = false -> null
        }

      - ttl {
          - enabled = false -> null
        }

        # (1 unchanged block hidden)
    }

  # aws_iam_role.VotingAppApi_VotingAppApi-OnRequest-1174f72e_IamRole_249C1D45 will be created
  + resource "aws_iam_role" "VotingAppApi_VotingAppApi-OnRequest-1174f72e_IamRole_249C1D45" {
      + 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                  = (known after apply)
      + name_prefix           = (known after apply)
      + path                  = "/"
      + role_last_used        = (known after apply)
      + tags_all              = (known after apply)
      + unique_id             = (known after apply)
    }

  # aws_iam_role.VotingAppApi_VotingAppApi-OnRequest-41f14472_IamRole_5F3056C5 will be created
  + resource "aws_iam_role" "VotingAppApi_VotingAppApi-OnRequest-41f14472_IamRole_5F3056C5" {
      + 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                  = (known after apply)
      + name_prefix           = (known after apply)
      + path                  = "/"
      + role_last_used        = (known after apply)
      + tags_all              = (known after apply)
      + unique_id             = (known after apply)
    }

  # aws_iam_role.cloudApi_cloudApi-OnRequest-1174f72e_IamRole_5C0487F1 will be destroyed
  # (because aws_iam_role.cloudApi_cloudApi-OnRequest-1174f72e_IamRole_5C0487F1 is not in configuration)
  - resource "aws_iam_role" "cloudApi_cloudApi-OnRequest-1174f72e_IamRole_5C0487F1" {
      - arn                   = "arn:aws:iam::223316951128:role/terraform-20230727202411674700000002" -> null
      - assume_role_policy    = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "sts:AssumeRole"
                      - Effect    = "Allow"
                      - Principal = {
                          - Service = "lambda.amazonaws.com"
                        }
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - create_date           = "2023-07-27T20:24:11Z" -> null
      - force_detach_policies = false -> null
      - id                    = "terraform-20230727202411674700000002" -> null
      - managed_policy_arns   = [
          - "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",
        ] -> null
      - max_session_duration  = 3600 -> null
      - name                  = "terraform-20230727202411674700000002" -> null
      - name_prefix           = "terraform-" -> null
      - path                  = "/" -> null
      - role_last_used        = [
          - {
              - last_used_date = ""
              - region         = ""
            },
        ] -> null
      - tags                  = {} -> null
      - tags_all              = {} -> null
      - unique_id             = "AROATH7V2IBMMELKUFETF" -> null

      - inline_policy {
          - name   = "terraform-2023072720242456900000000a" -> null
          - policy = jsonencode(
                {
                  - Statement = [
                      - {
                          - Action   = [
                              - "dynamodb:PutItem",
                            ]
                          - Effect   = "Allow"
                          - Resource = [
                              - "arn:aws:dynamodb:us-east-1:223316951128:table/Table-0e93c191",
                            ]
                        },
                    ]
                  - Version   = "2012-10-17"
                }
            ) -> null
        }
    }

  # aws_iam_role.cloudApi_cloudApi-OnRequest-41f14472_IamRole_60C118A3 will be destroyed
  # (because aws_iam_role.cloudApi_cloudApi-OnRequest-41f14472_IamRole_60C118A3 is not in configuration)
  - resource "aws_iam_role" "cloudApi_cloudApi-OnRequest-41f14472_IamRole_60C118A3" {
      - arn                   = "arn:aws:iam::223316951128:role/terraform-20230727202411679300000004" -> null
      - assume_role_policy    = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "sts:AssumeRole"
                      - Effect    = "Allow"
                      - Principal = {
                          - Service = "lambda.amazonaws.com"
                        }
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - create_date           = "2023-07-27T20:24:11Z" -> null
      - force_detach_policies = false -> null
      - id                    = "terraform-20230727202411679300000004" -> null
      - managed_policy_arns   = [
          - "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",
        ] -> null
      - max_session_duration  = 3600 -> null
      - name                  = "terraform-20230727202411679300000004" -> null
      - name_prefix           = "terraform-" -> null
      - path                  = "/" -> null
      - role_last_used        = [
          - {
              - last_used_date = ""
              - region         = ""
            },
        ] -> null
      - tags                  = {} -> null
      - tags_all              = {} -> null
      - unique_id             = "AROATH7V2IBMPX6EKHPJE" -> null

      - inline_policy {
          - name   = "terraform-20230727202424568600000009" -> null
          - policy = jsonencode(
                {
                  - Statement = [
                      - {
                          - Action   = [
                              - "dynamodb:Scan",
                            ]
                          - Effect   = "Allow"
                          - Resource = [
                              - "arn:aws:dynamodb:us-east-1:223316951128:table/Table-0e93c191",
                            ]
                        },
                    ]
                  - Version   = "2012-10-17"
                }
            ) -> null
        }
    }

  # aws_iam_role_policy.InitializeTable_Function_IamRolePolicy_2AD89519 will be updated in-place
  ~ resource "aws_iam_role_policy" "InitializeTable_Function_IamRolePolicy_2AD89519" {
        id     = "terraform-20230727202411672600000001:terraform-20230727202424567600000008"
        name   = "terraform-20230727202424567600000008"
      ~ policy = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = [
                          - "dynamodb:PutItem",
                        ]
                      - Effect   = "Allow"
                      - Resource = [
                          - "arn:aws:dynamodb:us-east-1:223316951128:table/Table-0e93c191",
                        ]
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> (known after apply)
        # (1 unchanged attribute hidden)
    }

  # aws_iam_role_policy.VotingAppApi_VotingAppApi-OnRequest-1174f72e_IamRolePolicy_547443A5 will be created
  + resource "aws_iam_role_policy" "VotingAppApi_VotingAppApi-OnRequest-1174f72e_IamRolePolicy_547443A5" {
      + id     = (known after apply)
      + name   = (known after apply)
      + policy = (known after apply)
      + role   = (known after apply)
    }

  # aws_iam_role_policy.VotingAppApi_VotingAppApi-OnRequest-41f14472_IamRolePolicy_25C9720E will be created
  + resource "aws_iam_role_policy" "VotingAppApi_VotingAppApi-OnRequest-41f14472_IamRolePolicy_25C9720E" {
      + id     = (known after apply)
      + name   = (known after apply)
      + policy = (known after apply)
      + role   = (known after apply)
    }

  # aws_iam_role_policy.cloudApi_cloudApi-OnRequest-1174f72e_IamRolePolicy_9062CFE8 will be destroyed
  # (because aws_iam_role_policy.cloudApi_cloudApi-OnRequest-1174f72e_IamRolePolicy_9062CFE8 is not in configuration)
  - resource "aws_iam_role_policy" "cloudApi_cloudApi-OnRequest-1174f72e_IamRolePolicy_9062CFE8" {
      - id     = "terraform-20230727202411674700000002:terraform-2023072720242456900000000a" -> null
      - name   = "terraform-2023072720242456900000000a" -> null
      - policy = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = [
                          - "dynamodb:PutItem",
                        ]
                      - Effect   = "Allow"
                      - Resource = [
                          - "arn:aws:dynamodb:us-east-1:223316951128:table/Table-0e93c191",
                        ]
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - role   = "terraform-20230727202411674700000002" -> null
    }

  # aws_iam_role_policy.cloudApi_cloudApi-OnRequest-41f14472_IamRolePolicy_2728B668 will be destroyed
  # (because aws_iam_role_policy.cloudApi_cloudApi-OnRequest-41f14472_IamRolePolicy_2728B668 is not in configuration)
  - resource "aws_iam_role_policy" "cloudApi_cloudApi-OnRequest-41f14472_IamRolePolicy_2728B668" {
      - id     = "terraform-20230727202411679300000004:terraform-20230727202424568600000009" -> null
      - name   = "terraform-20230727202424568600000009" -> null
      - policy = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = [
                          - "dynamodb:Scan",
                        ]
                      - Effect   = "Allow"
                      - Resource = [
                          - "arn:aws:dynamodb:us-east-1:223316951128:table/Table-0e93c191",
                        ]
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - role   = "terraform-20230727202411679300000004" -> null
    }

  # aws_iam_role_policy_attachment.VotingAppApi_VotingAppApi-OnRequest-1174f72e_IamRolePolicyAttachment_4C4C30DD will be created
  + resource "aws_iam_role_policy_attachment" "VotingAppApi_VotingAppApi-OnRequest-1174f72e_IamRolePolicyAttachment_4C4C30DD" {
      + id         = (known after apply)
      + policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
      + role       = (known after apply)
    }

  # aws_iam_role_policy_attachment.VotingAppApi_VotingAppApi-OnRequest-41f14472_IamRolePolicyAttachment_E1980EB1 will be created
  + resource "aws_iam_role_policy_attachment" "VotingAppApi_VotingAppApi-OnRequest-41f14472_IamRolePolicyAttachment_E1980EB1" {
      + id         = (known after apply)
      + policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
      + role       = (known after apply)
    }

  # aws_iam_role_policy_attachment.cloudApi_cloudApi-OnRequest-1174f72e_IamRolePolicyAttachment_2304EB12 will be destroyed
  # (because aws_iam_role_policy_attachment.cloudApi_cloudApi-OnRequest-1174f72e_IamRolePolicyAttachment_2304EB12 is not in configuration)
  - resource "aws_iam_role_policy_attachment" "cloudApi_cloudApi-OnRequest-1174f72e_IamRolePolicyAttachment_2304EB12" {
      - id         = "terraform-20230727202411674700000002-20230727202411910100000007" -> null
      - policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" -> null
      - role       = "terraform-20230727202411674700000002" -> null
    }

  # aws_iam_role_policy_attachment.cloudApi_cloudApi-OnRequest-41f14472_IamRolePolicyAttachment_73CC9260 will be destroyed
  # (because aws_iam_role_policy_attachment.cloudApi_cloudApi-OnRequest-41f14472_IamRolePolicyAttachment_73CC9260 is not in configuration)
  - resource "aws_iam_role_policy_attachment" "cloudApi_cloudApi-OnRequest-41f14472_IamRolePolicyAttachment_73CC9260" {
      - id         = "terraform-20230727202411679300000004-20230727202411906100000006" -> null
      - policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" -> null
      - role       = "terraform-20230727202411679300000004" -> null
    }

  # aws_lambda_function.InitializeTable_Function_FD00736D will be updated in-place
  ~ resource "aws_lambda_function" "InitializeTable_Function_FD00736D" {
        id                             = "Function-c8e7055b"
      ~ last_modified                  = "2023-07-27T20:24:24.830+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:us-east-1:223316951128:function:Function-c8e7055b:1" -> (known after apply)
      ~ qualified_invoke_arn           = "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:223316951128:function:Function-c8e7055b:1/invocations" -> (known after apply)
      ~ s3_key                         = "asset.c8e7055bb3773d297f63b5172fb6a571cddc069012.a59c80da992150b2fbbcd74b21cc13e5.zip" -> "asset.c8e7055bb3773d297f63b5172fb6a571cddc069012.94b2bb47993146397486a8abbc1bc527.zip"
        tags                           = {}
      ~ version                        = "1" -> (known after apply)
        # (18 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "WING_TOKEN_TFTOKEN_TOKEN_1" = "\"Table-0e93c191\"" -> "\"VotingAppItems-0e93c191\""
                # (2 unchanged elements hidden)
            }
        }

        # (2 unchanged blocks hidden)
    }

  # aws_lambda_function.VotingAppApi_VotingAppApi-OnRequest-1174f72e_4702FFC5 will be created
  + resource "aws_lambda_function" "VotingAppApi_VotingAppApi-OnRequest-1174f72e_4702FFC5" {
      + architectures                  = (known after apply)
      + arn                            = (known after apply)
      + function_name                  = "VotingAppApi-OnRequest-1174f72e-c814122f"
      + handler                        = "index.handler"
      + id                             = (known after apply)
      + invoke_arn                     = (known after apply)
      + last_modified                  = (known after apply)
      + memory_size                    = 128
      + package_type                   = "Zip"
      + publish                        = true
      + qualified_arn                  = (known after apply)
      + qualified_invoke_arn           = (known after apply)
      + reserved_concurrent_executions = -1
      + role                           = (known after apply)
      + runtime                        = "nodejs18.x"
      + s3_bucket                      = "code-c84a50b1-20230727202411678600000003"
      + s3_key                         = "asset.c814122fe98ecb97e55419948afe38bcc26a9ca25b.7e3b1868141e1b60a1a08ffda10fdfa5.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_all                       = (known after apply)
      + timeout                        = 30
      + version                        = (known after apply)

      + environment {
          + variables = {
              + "WING_FUNCTION_NAME"         = "VotingAppApi-OnRequest-1174f72e-c814122f"
              + "WING_TARGET"                = "tf-aws"
              + "WING_TOKEN_TFTOKEN_TOKEN_1" = "\"VotingAppItems-0e93c191\""
            }
        }

      + vpc_config {
          + vpc_id = (known after apply)
        }
    }

  # aws_lambda_function.VotingAppApi_VotingAppApi-OnRequest-41f14472_39478289 will be created
  + resource "aws_lambda_function" "VotingAppApi_VotingAppApi-OnRequest-41f14472_39478289" {
      + architectures                  = (known after apply)
      + arn                            = (known after apply)
      + function_name                  = "VotingAppApi-OnRequest-41f14472-c87bddf9"
      + handler                        = "index.handler"
      + id                             = (known after apply)
      + invoke_arn                     = (known after apply)
      + last_modified                  = (known after apply)
      + memory_size                    = 128
      + package_type                   = "Zip"
      + publish                        = true
      + qualified_arn                  = (known after apply)
      + qualified_invoke_arn           = (known after apply)
      + reserved_concurrent_executions = -1
      + role                           = (known after apply)
      + runtime                        = "nodejs18.x"
      + s3_bucket                      = "code-c84a50b1-20230727202411678600000003"
      + s3_key                         = "asset.c87bddf927b70f22f963a14d64ce5f4bf1372d398a.6afd7229f402adfc3fef370895e34a0a.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_all                       = (known after apply)
      + timeout                        = 30
      + version                        = (known after apply)

      + environment {
          + variables = {
              + "WING_FUNCTION_NAME"         = "VotingAppApi-OnRequest-41f14472-c87bddf9"
              + "WING_TARGET"                = "tf-aws"
              + "WING_TOKEN_TFTOKEN_TOKEN_1" = "\"VotingAppItems-0e93c191\""
            }
        }

      + vpc_config {
          + vpc_id = (known after apply)
        }
    }

  # aws_lambda_function.cloudApi_cloudApi-OnRequest-1174f72e_2F82FED3 will be destroyed
  # (because aws_lambda_function.cloudApi_cloudApi-OnRequest-1174f72e_2F82FED3 is not in configuration)
  - resource "aws_lambda_function" "cloudApi_cloudApi-OnRequest-1174f72e_2F82FED3" {
      - architectures                  = [
          - "x86_64",
        ] -> null
      - arn                            = "arn:aws:lambda:us-east-1:223316951128:function:cloud-Api-OnRequest-1174f72e-c8de6200" -> null
      - function_name                  = "cloud-Api-OnRequest-1174f72e-c8de6200" -> null
      - handler                        = "index.handler" -> null
      - id                             = "cloud-Api-OnRequest-1174f72e-c8de6200" -> null
      - invoke_arn                     = "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:223316951128:function:cloud-Api-OnRequest-1174f72e-c8de6200/invocations" -> null
      - last_modified                  = "2023-07-27T20:24:31.347+0000" -> null
      - layers                         = [] -> null
      - memory_size                    = 128 -> null
      - package_type                   = "Zip" -> null
      - publish                        = true -> null
      - qualified_arn                  = "arn:aws:lambda:us-east-1:223316951128:function:cloud-Api-OnRequest-1174f72e-c8de6200:1" -> null
      - qualified_invoke_arn           = "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:223316951128:function:cloud-Api-OnRequest-1174f72e-c8de6200:1/invocations" -> null
      - reserved_concurrent_executions = -1 -> null
      - role                           = "arn:aws:iam::223316951128:role/terraform-20230727202411674700000002" -> null
      - runtime                        = "nodejs18.x" -> null
      - s3_bucket                      = "code-c84a50b1-20230727202411678600000003" -> null
      - s3_key                         = "asset.c8de6200ddb9f8a3590b097bfde9bdd5326dd904e9.6192f915b6c64cd9d2b8b5d3b5de10ce.zip" -> null
      - skip_destroy                   = false -> null
      - source_code_hash               = "eHReBUsh2oAfVPxE7u4FLsRsptJABzm1f6W0EFT/X40=" -> null
      - source_code_size               = 162454 -> null
      - tags                           = {} -> null
      - tags_all                       = {} -> null
      - timeout                        = 30 -> null
      - version                        = "1" -> null

      - environment {
          - variables = {
              - "WING_FUNCTION_NAME"         = "cloud-Api-OnRequest-1174f72e-c8de6200"
              - "WING_TARGET"                = "tf-aws"
              - "WING_TOKEN_TFTOKEN_TOKEN_1" = "\"Table-0e93c191\""
            } -> null
        }

      - ephemeral_storage {
          - size = 512 -> null
        }

      - tracing_config {
          - mode = "PassThrough" -> null
        }
    }

  # aws_lambda_function.cloudApi_cloudApi-OnRequest-41f14472_B4385311 will be destroyed
  # (because aws_lambda_function.cloudApi_cloudApi-OnRequest-41f14472_B4385311 is not in configuration)
  - resource "aws_lambda_function" "cloudApi_cloudApi-OnRequest-41f14472_B4385311" {
      - architectures                  = [
          - "x86_64",
        ] -> null
      - arn                            = "arn:aws:lambda:us-east-1:223316951128:function:cloud-Api-OnRequest-41f14472-c81170c6" -> null
      - function_name                  = "cloud-Api-OnRequest-41f14472-c81170c6" -> null
      - handler                        = "index.handler" -> null
      - id                             = "cloud-Api-OnRequest-41f14472-c81170c6" -> null
      - invoke_arn                     = "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:223316951128:function:cloud-Api-OnRequest-41f14472-c81170c6/invocations" -> null
      - last_modified                  = "2023-07-27T20:24:31.343+0000" -> null
      - layers                         = [] -> null
      - memory_size                    = 128 -> null
      - package_type                   = "Zip" -> null
      - publish                        = true -> null
      - qualified_arn                  = "arn:aws:lambda:us-east-1:223316951128:function:cloud-Api-OnRequest-41f14472-c81170c6:9" -> null
      - qualified_invoke_arn           = "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:223316951128:function:cloud-Api-OnRequest-41f14472-c81170c6:9/invocations" -> null
      - reserved_concurrent_executions = -1 -> null
      - role                           = "arn:aws:iam::223316951128:role/terraform-20230727202411679300000004" -> null
      - runtime                        = "nodejs18.x" -> null
      - s3_bucket                      = "code-c84a50b1-20230727202411678600000003" -> null
      - s3_key                         = "asset.c81170c6eea85213cd98217b95378895ec0689d1c6.ef8f6d21adde3312fdddf04201948ce1.zip" -> null
      - skip_destroy                   = false -> null
      - source_code_hash               = "fBqh9Zkdq4rdHypeWGh8SxDJi+fiR7B2IiiyeNvI1Kk=" -> null
      - source_code_size               = 161520 -> null
      - tags                           = {} -> null
      - tags_all                       = {} -> null
      - timeout                        = 30 -> null
      - version                        = "9" -> null

      - environment {
          - variables = {
              - "WING_FUNCTION_NAME"         = "cloud-Api-OnRequest-41f14472-c81170c6"
              - "WING_TARGET"                = "tf-aws"
              - "WING_TOKEN_TFTOKEN_TOKEN_1" = "\"Table-0e93c191\""
            } -> null
        }

      - ephemeral_storage {
          - size = 512 -> null
        }

      - tracing_config {
          - mode = "PassThrough" -> null
        }
    }

  # aws_lambda_permission.VotingAppApi_api_permission-GET-60cabf0c_A106D13D will be created
  + resource "aws_lambda_permission" "VotingAppApi_api_permission-GET-60cabf0c_A106D13D" {
      + action              = "lambda:InvokeFunction"
      + function_name       = "VotingAppApi-OnRequest-41f14472-c87bddf9"
      + id                  = (known after apply)
      + principal           = "apigateway.amazonaws.com"
      + source_arn          = (known after apply)
      + statement_id        = "AllowExecutionFromAPIGateway-GET-60cabf0c"
      + statement_id_prefix = (known after apply)
    }

  # aws_lambda_permission.VotingAppApi_api_permission-POST-cb38ebcb_8DE7E4D2 will be created
  + resource "aws_lambda_permission" "VotingAppApi_api_permission-POST-cb38ebcb_8DE7E4D2" {
      + action              = "lambda:InvokeFunction"
      + function_name       = "VotingAppApi-OnRequest-1174f72e-c814122f"
      + id                  = (known after apply)
      + principal           = "apigateway.amazonaws.com"
      + source_arn          = (known after apply)
      + statement_id        = "AllowExecutionFromAPIGateway-POST-cb38ebcb"
      + statement_id_prefix = (known after apply)
    }

  # aws_lambda_permission.cloudApi_api_permission-GET-60cabf0c_3E7E8C53 will be destroyed
  # (because aws_lambda_permission.cloudApi_api_permission-GET-60cabf0c_3E7E8C53 is not in configuration)
  - resource "aws_lambda_permission" "cloudApi_api_permission-GET-60cabf0c_3E7E8C53" {
      - action        = "lambda:InvokeFunction" -> null
      - function_name = "cloud-Api-OnRequest-41f14472-c81170c6" -> null
      - id            = "AllowExecutionFromAPIGateway-GET-60cabf0c" -> null
      - principal     = "apigateway.amazonaws.com" -> null
      - source_arn    = "arn:aws:execute-api:us-east-1:223316951128:p2l4j1gmv2/*/GET/items" -> null
      - statement_id  = "AllowExecutionFromAPIGateway-GET-60cabf0c" -> null
    }

  # aws_lambda_permission.cloudApi_api_permission-POST-cb38ebcb_8FB5CBF5 will be destroyed
  # (because aws_lambda_permission.cloudApi_api_permission-POST-cb38ebcb_8FB5CBF5 is not in configuration)
  - resource "aws_lambda_permission" "cloudApi_api_permission-POST-cb38ebcb_8FB5CBF5" {
      - action        = "lambda:InvokeFunction" -> null
      - function_name = "cloud-Api-OnRequest-1174f72e-c8de6200" -> null
      - id            = "AllowExecutionFromAPIGateway-POST-cb38ebcb" -> null
      - principal     = "apigateway.amazonaws.com" -> null
      - source_arn    = "arn:aws:execute-api:us-east-1:223316951128:p2l4j1gmv2/*/POST/vote" -> null
      - statement_id  = "AllowExecutionFromAPIGateway-POST-cb38ebcb" -> null
    }

  # aws_s3_object.InitializeTable_Function_S3Object_F5933D3B must be replaced
-/+ resource "aws_s3_object" "InitializeTable_Function_S3Object_F5933D3B" {
      ~ bucket_key_enabled     = false -> (known after apply)
      ~ content_type           = "binary/octet-stream" -> (known after apply)
      ~ etag                   = "32070c895be3e46f970fe328a53de6b5" -> (known after apply)
      ~ id                     = "asset.c8e7055bb3773d297f63b5172fb6a571cddc069012.a59c80da992150b2fbbcd74b21cc13e5.zip" -> (known after apply)
      ~ key                    = "asset.c8e7055bb3773d297f63b5172fb6a571cddc069012.a59c80da992150b2fbbcd74b21cc13e5.zip" -> "asset.c8e7055bb3773d297f63b5172fb6a571cddc069012.94b2bb47993146397486a8abbc1bc527.zip" # forces replacement
      + kms_key_id             = (known after apply)
      - metadata               = {} -> null
      ~ server_side_encryption = "AES256" -> (known after apply)
      ~ source                 = "assets/InitializeTable_Function_Asset_1A1B5BC3/A59C80DA992150B2FBBCD74B21CC13E5/archive.zip" -> "assets/InitializeTable_Function_Asset_1A1B5BC3/94B2BB47993146397486A8ABBC1BC527/archive.zip"
      ~ storage_class          = "STANDARD" -> (known after apply)
      - tags                   = {} -> null
      ~ tags_all               = {} -> (known after apply)
      + version_id             = (known after apply)
        # (3 unchanged attributes hidden)
    }

  # aws_s3_object.VotingAppApi_VotingAppApi-OnRequest-1174f72e_S3Object_F1D801A5 will be created
  + resource "aws_s3_object" "VotingAppApi_VotingAppApi-OnRequest-1174f72e_S3Object_F1D801A5" {
      + acl                    = "private"
      + bucket                 = "code-c84a50b1-20230727202411678600000003"
      + bucket_key_enabled     = (known after apply)
      + content_type           = (known after apply)
      + etag                   = (known after apply)
      + force_destroy          = false
      + id                     = (known after apply)
      + key                    = "asset.c814122fe98ecb97e55419948afe38bcc26a9ca25b.7e3b1868141e1b60a1a08ffda10fdfa5.zip"
      + kms_key_id             = (known after apply)
      + server_side_encryption = (known after apply)
      + source                 = "assets/VotingAppApi_VotingAppApi-OnRequest-1174f72e_Asset_6F97F7C2/7E3B1868141E1B60A1A08FFDA10FDFA5/archive.zip"
      + storage_class          = (known after apply)
      + tags_all               = (known after apply)
      + version_id             = (known after apply)
    }

  # aws_s3_object.VotingAppApi_VotingAppApi-OnRequest-41f14472_S3Object_C95F6BA9 will be created
  + resource "aws_s3_object" "VotingAppApi_VotingAppApi-OnRequest-41f14472_S3Object_C95F6BA9" {
      + acl                    = "private"
      + bucket                 = "code-c84a50b1-20230727202411678600000003"
      + bucket_key_enabled     = (known after apply)
      + content_type           = (known after apply)
      + etag                   = (known after apply)
      + force_destroy          = false
      + id                     = (known after apply)
      + key                    = "asset.c87bddf927b70f22f963a14d64ce5f4bf1372d398a.6afd7229f402adfc3fef370895e34a0a.zip"
      + kms_key_id             = (known after apply)
      + server_side_encryption = (known after apply)
      + source                 = "assets/VotingAppApi_VotingAppApi-OnRequest-41f14472_Asset_94F55D63/6AFD7229F402ADFC3FEF370895E34A0A/archive.zip"
      + storage_class          = (known after apply)
      + tags_all               = (known after apply)
      + version_id             = (known after apply)
    }

  # aws_s3_object.cloudApi_cloudApi-OnRequest-1174f72e_S3Object_9D8ECEAD will be destroyed
  # (because aws_s3_object.cloudApi_cloudApi-OnRequest-1174f72e_S3Object_9D8ECEAD is not in configuration)
  - resource "aws_s3_object" "cloudApi_cloudApi-OnRequest-1174f72e_S3Object_9D8ECEAD" {
      - acl                    = "private" -> null
      - bucket                 = "code-c84a50b1-20230727202411678600000003" -> null
      - bucket_key_enabled     = false -> null
      - content_type           = "binary/octet-stream" -> null
      - etag                   = "b36f19123978880674a67cc6ab0e3da3" -> null
      - force_destroy          = false -> null
      - id                     = "asset.c8de6200ddb9f8a3590b097bfde9bdd5326dd904e9.6192f915b6c64cd9d2b8b5d3b5de10ce.zip" -> null
      - key                    = "asset.c8de6200ddb9f8a3590b097bfde9bdd5326dd904e9.6192f915b6c64cd9d2b8b5d3b5de10ce.zip" -> null
      - metadata               = {} -> null
      - server_side_encryption = "AES256" -> null
      - source                 = "assets/cloudApi_cloudApi-OnRequest-1174f72e_Asset_2B0E3465/6192F915B6C64CD9D2B8B5D3B5DE10CE/archive.zip" -> null
      - storage_class          = "STANDARD" -> null
      - tags                   = {} -> null
      - tags_all               = {} -> null
    }

  # aws_s3_object.cloudApi_cloudApi-OnRequest-41f14472_S3Object_2D3CDD60 will be destroyed
  # (because aws_s3_object.cloudApi_cloudApi-OnRequest-41f14472_S3Object_2D3CDD60 is not in configuration)
  - resource "aws_s3_object" "cloudApi_cloudApi-OnRequest-41f14472_S3Object_2D3CDD60" {
      - acl                    = "private" -> null
      - bucket                 = "code-c84a50b1-20230727202411678600000003" -> null
      - bucket_key_enabled     = false -> null
      - content_type           = "binary/octet-stream" -> null
      - etag                   = "e33ebc490e78e7b6e64198bcfc2357d1" -> null
      - force_destroy          = false -> null
      - id                     = "asset.c81170c6eea85213cd98217b95378895ec0689d1c6.ef8f6d21adde3312fdddf04201948ce1.zip" -> null
      - key                    = "asset.c81170c6eea85213cd98217b95378895ec0689d1c6.ef8f6d21adde3312fdddf04201948ce1.zip" -> null
      - metadata               = {} -> null
      - server_side_encryption = "AES256" -> null
      - source                 = "assets/cloudApi_cloudApi-OnRequest-41f14472_Asset_83DC60BE/EF8F6D21ADDE3312FDDDF04201948CE1/archive.zip" -> null
      - storage_class          = "STANDARD" -> null
      - tags                   = {} -> null
      - tags_all               = {} -> null
    }

Plan: 17 to add, 2 to change, 17 to destroy.

@Chriscbr Chriscbr merged commit 309af1e into main Jul 27, 2023
1 check passed
@Chriscbr Chriscbr deleted the food-items branch July 27, 2023 20:46
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