issues
search
winglang
/
voting-app
MIT License
6
stars
4
forks
source link
fix: workaround bug
#29
Closed
Chriscbr
closed
9 months ago
Chriscbr
commented
9 months ago
Workaround for
https://github.com/winglang/wing/issues/4470
github-actions[bot]
commented
9 months ago
Terraform Plan
Show Plan
``` aws_cloudwatch_log_group.VotingAppApi_post_requestChoices0_CloudwatchLogGroup_679E4CF2: Refreshing state... [id=/aws/lambda/post_requestChoices0-c8820ba5] aws_iam_role.VotingAppApi_get_leaderboard0_IamRole_DE30BD64: Refreshing state... [id=terraform-20240208163203724700000003] aws_iam_role.VotingAppApi_post_requestChoices0_IamRole_22F6E9E7: Refreshing state... [id=terraform-20240208163203806300000004] aws_dynamodb_table.VotingAppStore_Entries_DynamoDBTableAws_tfawsdynamodbTableDynamodbTable_894280AD: Refreshing state... [id=DynamoDBTableAws-4b65a10e] aws_s3_bucket.cloudWebsite_WebsiteBucket_EB03D355: Refreshing state... [id=cloud-website-c8e58765-20240208163203695500000001] aws_cloudwatch_log_group.VotingAppApi_post_selectWinner0_CloudwatchLogGroup_FF958712: Refreshing state... [id=/aws/lambda/post_selectWinner0-c8d65bd1] data.aws_caller_identity.account: Reading... aws_cloudwatch_log_group.VotingAppApi_get_leaderboard0_CloudwatchLogGroup_80A5B81E: Refreshing state... [id=/aws/lambda/get_leaderboard0-c8bf3988] aws_iam_role.VotingAppApi_post_selectWinner0_IamRole_3824DF8A: Refreshing state... [id=terraform-20240208163203720100000002] aws_s3_bucket.Code: Refreshing state... [id=code-c84a50b1-20230727202411678600000003] data.aws_caller_identity.account: Read complete after 1s [id=223316951128] aws_cloudfront_origin_access_control.cloudWebsite_CloudfrontOac_C956968B: Refreshing state... [id=E1J2GO7P2VQ2EZ] aws_cloudwatch_log_group.InitializeTable_Function_CloudwatchLogGroup_E746307D: Refreshing state... [id=/aws/lambda/Function-c8e7055b] data.aws_region.Region: Reading... 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_api_gateway_rest_api.VotingAppApi_api_CB41EC98: Refreshing state... [id=f9yi5t9zj2] aws_iam_role_policy_attachment.VotingAppApi_post_selectWinner0_IamRolePolicyAttachment_A11AE727: Refreshing state... [id=terraform-20240208163203720100000002-20240208163204033500000006] aws_iam_role_policy.VotingAppApi_post_selectWinner0_IamRolePolicy_538B4B66: Refreshing state... [id=terraform-20240208163203720100000002:terraform-20240208163217106000000009] aws_iam_role_policy_attachment.VotingAppApi_get_leaderboard0_IamRolePolicyAttachment_7BB9531C: Refreshing state... [id=terraform-20240208163203724700000003-20240208163204000500000005] aws_iam_role_policy.VotingAppApi_get_leaderboard0_IamRolePolicy_F06B1AF0: Refreshing state... [id=terraform-20240208163203724700000003:terraform-20240208163217070500000008] aws_iam_role_policy_attachment.VotingAppApi_post_requestChoices0_IamRolePolicyAttachment_E91C632D: Refreshing state... [id=terraform-20240208163203806300000004-20240208163204103600000007] aws_iam_role_policy.VotingAppApi_post_requestChoices0_IamRolePolicy_926B955D: Refreshing state... [id=terraform-20240208163203806300000004:terraform-2024020816321710710000000a] aws_api_gateway_deployment.VotingAppApi_api_deployment_B9647894: Refreshing state... [id=50b5sq] 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_api_gateway_stage.VotingAppApi_api_stage_9B2FA9EA: Refreshing state... [id=ags-f9yi5t9zj2-prod] aws_s3_object.VotingAppApi_get_leaderboard0_S3Object_D4AF4AC9: Refreshing state... [id=asset.c8bf3988f2d3a2c1d496b96539d5a03959421f37af.c3abbafab0452767fa73f1307a970f86.zip] aws_s3_object.InitializeTable_Function_S3Object_F5933D3B: Refreshing state... [id=asset.c8e7055bb3773d297f63b5172fb6a571cddc069012.a6268c60b5dd4c542cb86525c829f512.zip] aws_s3_object.VotingAppApi_post_requestChoices0_S3Object_E5911DA4: Refreshing state... [id=asset.c8820ba52700a98c4d6b8c373ec54bc26496a4e0ac.ad9f50a4e71d5aeb76c300e47046a7e3.zip] aws_s3_object.VotingAppApi_post_selectWinner0_S3Object_3DCD8E80: Refreshing state... [id=asset.c8d65bd11e98c1b56b54b826b80a0ffc8870c53ac6.2d468ff76b03fcee9cb5347adb2b5e32.zip] aws_lambda_function.InitializeTable_Function_FD00736D: Refreshing state... [id=Function-c8e7055b] aws_lambda_function.VotingAppApi_post_requestChoices0_78C94EF5: Refreshing state... [id=post_requestChoices0-c8820ba5] aws_lambda_function.VotingAppApi_get_leaderboard0_6A571716: Refreshing state... [id=get_leaderboard0-c8bf3988] aws_lambda_function.VotingAppApi_post_selectWinner0_B484847F: Refreshing state... [id=post_selectWinner0-c8d65bd1] aws_s3_object.cloudWebsite_File-configjson_591A81BA: Refreshing state... [id=config.json] aws_s3_object.cloudWebsite_File--robotstxt_F93900E9: Refreshing state... [id=/robots.txt] aws_s3_object.cloudWebsite_File--logo192png_6E513B20: Refreshing state... [id=/logo192.png] aws_s3_bucket_website_configuration.cloudWebsite_BucketWebsiteConfiguration_920E8E41: Refreshing state... [id=cloud-website-c8e58765-20240208163203695500000001] aws_s3_object.cloudWebsite_File--static--css--mainbc8dc0a9css_ABAEC285: Refreshing state... [id=/static/css/main.bc8dc0a9.css] aws_s3_object.cloudWebsite_File--asset-manifestjson_8187FE70: Refreshing state... [id=/asset-manifest.json] aws_s3_object.cloudWebsite_File--static--js--mainf35fcf80jsmap_8EB0B4F9: Refreshing state... [id=/static/js/main.f35fcf80.js.map] aws_s3_object.cloudWebsite_File--logo512png_E26C5AA3: Refreshing state... [id=/logo512.png] aws_cloudfront_distribution.cloudWebsite_Distribution_083B5AF9: Refreshing state... [id=E2V1QW96MX1WMX] aws_s3_object.cloudWebsite_File--static--js--78728cb0dcdchunkjs_40889769: Refreshing state... [id=/static/js/787.28cb0dcd.chunk.js] aws_s3_object.cloudWebsite_File--static--js--mainf35fcf80js_5A79BA2F: Refreshing state... [id=/static/js/main.f35fcf80.js] aws_s3_object.cloudWebsite_File--manifestjson_5AC33197: Refreshing state... [id=/manifest.json] aws_s3_object.cloudWebsite_File--static--js--78728cb0dcdchunkjsmap_F5D0643F: Refreshing state... [id=/static/js/787.28cb0dcd.chunk.js.map] aws_s3_object.cloudWebsite_File--static--css--mainbc8dc0a9cssmap_D475E55B: Refreshing state... [id=/static/css/main.bc8dc0a9.css.map] aws_s3_object.cloudWebsite_File--faviconico_A86052F9: Refreshing state... [id=/favicon.ico] aws_s3_object.cloudWebsite_File--indexhtml_2A2AE13C: Refreshing state... [id=/index.html] aws_s3_object.cloudWebsite_File--static--js--mainf35fcf80jsLICENSEtxt_E95A10E1: Refreshing state... [id=/static/js/main.f35fcf80.js.LICENSE.txt] aws_lambda_permission.VotingAppApi_api_permission-GET-5969f3af_56B4A504: Refreshing state... [id=AllowExecutionFromAPIGateway-GET-5969f3af] aws_lambda_permission.VotingAppApi_api_permission-POST-53dc1f64_98751060: Refreshing state... [id=AllowExecutionFromAPIGateway-POST-53dc1f64] aws_lambda_permission.VotingAppApi_api_permission-POST-57590acc_3E83C8F6: Refreshing state... [id=AllowExecutionFromAPIGateway-POST-57590acc] data.aws_iam_policy_document.cloudWebsite_AllowDistributionReadOnly_89DC4FD0: Reading... data.aws_iam_policy_document.cloudWebsite_AllowDistributionReadOnly_89DC4FD0: Read complete after 0s [id=3498224767] aws_s3_bucket_policy.cloudWebsite_DistributionS3BucketPolicy_32B029AE: Refreshing state... [id=cloud-website-c8e58765-20240208163203695500000001] Note: Objects have changed outside of Terraform Terraform detected the following changes made outside of Terraform since the last "terraform apply" which may have affected this plan: # aws_s3_object.InitializeTable_Function_S3Object_F5933D3B has been deleted - resource "aws_s3_object" "InitializeTable_Function_S3Object_F5933D3B" { id = "asset.c8e7055bb3773d297f63b5172fb6a571cddc069012.a6268c60b5dd4c542cb86525c829f512.zip" - key = "asset.c8e7055bb3773d297f63b5172fb6a571cddc069012.a6268c60b5dd4c542cb86525c829f512.zip" -> null # (9 unchanged attributes hidden) } # aws_s3_object.VotingAppApi_get_leaderboard0_S3Object_D4AF4AC9 has been deleted - resource "aws_s3_object" "VotingAppApi_get_leaderboard0_S3Object_D4AF4AC9" { id = "asset.c8bf3988f2d3a2c1d496b96539d5a03959421f37af.c3abbafab0452767fa73f1307a970f86.zip" - key = "asset.c8bf3988f2d3a2c1d496b96539d5a03959421f37af.c3abbafab0452767fa73f1307a970f86.zip" -> null # (9 unchanged attributes hidden) } # aws_s3_object.VotingAppApi_post_requestChoices0_S3Object_E5911DA4 has been deleted - resource "aws_s3_object" "VotingAppApi_post_requestChoices0_S3Object_E5911DA4" { id = "asset.c8820ba52700a98c4d6b8c373ec54bc26496a4e0ac.ad9f50a4e71d5aeb76c300e47046a7e3.zip" - key = "asset.c8820ba52700a98c4d6b8c373ec54bc26496a4e0ac.ad9f50a4e71d5aeb76c300e47046a7e3.zip" -> null # (9 unchanged attributes hidden) } # aws_s3_object.VotingAppApi_post_selectWinner0_S3Object_3DCD8E80 has been deleted - resource "aws_s3_object" "VotingAppApi_post_selectWinner0_S3Object_3DCD8E80" { id = "asset.c8d65bd11e98c1b56b54b826b80a0ffc8870c53ac6.2d468ff76b03fcee9cb5347adb2b5e32.zip" - key = "asset.c8d65bd11e98c1b56b54b826b80a0ffc8870c53ac6.2d468ff76b03fcee9cb5347adb2b5e32.zip" -> null # (9 unchanged attributes hidden) } Unless you have made equivalent changes to your configuration, or ignored the relevant attributes using ignore_changes, the following plan may include actions to undo or respond to these changes. ───────────────────────────────────────────────────────────────────────────── Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create ~ update in-place <= 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_lambda_function.InitializeTable_Function_FD00736D will be updated in-place ~ resource "aws_lambda_function" "InitializeTable_Function_FD00736D" { id = "Function-c8e7055b" ~ last_modified = "2024-02-08T17:10:36.000+0000" -> (known after apply) ~ qualified_arn = "arn:aws:lambda:us-east-1:223316951128:function:Function-c8e7055b:24" -> (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:24/invocations" -> (known after apply) ~ s3_key = "asset.c8e7055bb3773d297f63b5172fb6a571cddc069012.a6268c60b5dd4c542cb86525c829f512.zip" -> "asset.c8e7055bb3773d297f63b5172fb6a571cddc069012.aea927aa1e91bcb57d24c881c282d943.zip" tags = {} ~ version = "24" -> (known after apply) # (18 unchanged attributes hidden) # (3 unchanged blocks hidden) } # aws_lambda_function.VotingAppApi_get_leaderboard0_6A571716 will be updated in-place ~ resource "aws_lambda_function" "VotingAppApi_get_leaderboard0_6A571716" { id = "get_leaderboard0-c8bf3988" ~ last_modified = "2024-02-08T17:10:36.000+0000" -> (known after apply) ~ qualified_arn = "arn:aws:lambda:us-east-1:223316951128:function:get_leaderboard0-c8bf3988:2" -> (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:get_leaderboard0-c8bf3988:2/invocations" -> (known after apply) ~ s3_key = "asset.c8bf3988f2d3a2c1d496b96539d5a03959421f37af.c3abbafab0452767fa73f1307a970f86.zip" -> "asset.c8bf3988f2d3a2c1d496b96539d5a03959421f37af.03d9e2d82ab24b29486813b450fd8654.zip" tags = {} ~ version = "2" -> (known after apply) # (18 unchanged attributes hidden) # (3 unchanged blocks hidden) } # aws_lambda_function.VotingAppApi_post_requestChoices0_78C94EF5 will be updated in-place ~ resource "aws_lambda_function" "VotingAppApi_post_requestChoices0_78C94EF5" { id = "post_requestChoices0-c8820ba5" ~ last_modified = "2024-02-08T17:10:36.000+0000" -> (known after apply) ~ qualified_arn = "arn:aws:lambda:us-east-1:223316951128:function:post_requestChoices0-c8820ba5:2" -> (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:post_requestChoices0-c8820ba5:2/invocations" -> (known after apply) ~ s3_key = "asset.c8820ba52700a98c4d6b8c373ec54bc26496a4e0ac.ad9f50a4e71d5aeb76c300e47046a7e3.zip" -> "asset.c8820ba52700a98c4d6b8c373ec54bc26496a4e0ac.77fdb881e96bb42de4165acba7391731.zip" tags = {} ~ version = "2" -> (known after apply) # (18 unchanged attributes hidden) # (3 unchanged blocks hidden) } # aws_lambda_function.VotingAppApi_post_selectWinner0_B484847F will be updated in-place ~ resource "aws_lambda_function" "VotingAppApi_post_selectWinner0_B484847F" { id = "post_selectWinner0-c8d65bd1" ~ last_modified = "2024-02-08T17:10:36.000+0000" -> (known after apply) ~ qualified_arn = "arn:aws:lambda:us-east-1:223316951128:function:post_selectWinner0-c8d65bd1:2" -> (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:post_selectWinner0-c8d65bd1:2/invocations" -> (known after apply) ~ s3_key = "asset.c8d65bd11e98c1b56b54b826b80a0ffc8870c53ac6.2d468ff76b03fcee9cb5347adb2b5e32.zip" -> "asset.c8d65bd11e98c1b56b54b826b80a0ffc8870c53ac6.1cb4c5dee40e41da26384e57ac84ab8f.zip" tags = {} ~ version = "2" -> (known after apply) # (18 unchanged attributes hidden) # (3 unchanged blocks hidden) } # aws_s3_object.InitializeTable_Function_S3Object_F5933D3B will be created + resource "aws_s3_object" "InitializeTable_Function_S3Object_F5933D3B" { + acl = (known after apply) + bucket = "code-c84a50b1-20230727202411678600000003" + bucket_key_enabled = (known after apply) + checksum_crc32 = (known after apply) + checksum_crc32c = (known after apply) + checksum_sha1 = (known after apply) + checksum_sha256 = (known after apply) + content_type = (known after apply) + etag = (known after apply) + force_destroy = false + id = (known after apply) + key = "asset.c8e7055bb3773d297f63b5172fb6a571cddc069012.aea927aa1e91bcb57d24c881c282d943.zip" + kms_key_id = (known after apply) + server_side_encryption = (known after apply) + source = "assets/InitializeTable_Function_Asset_1A1B5BC3/EF1BD0DF14AB75C3DF30AE292562CC87/archive.zip" + storage_class = (known after apply) + tags_all = (known after apply) + version_id = (known after apply) } # aws_s3_object.VotingAppApi_get_leaderboard0_S3Object_D4AF4AC9 will be created + resource "aws_s3_object" "VotingAppApi_get_leaderboard0_S3Object_D4AF4AC9" { + acl = (known after apply) + bucket = "code-c84a50b1-20230727202411678600000003" + bucket_key_enabled = (known after apply) + checksum_crc32 = (known after apply) + checksum_crc32c = (known after apply) + checksum_sha1 = (known after apply) + checksum_sha256 = (known after apply) + content_type = (known after apply) + etag = (known after apply) + force_destroy = false + id = (known after apply) + key = "asset.c8bf3988f2d3a2c1d496b96539d5a03959421f37af.03d9e2d82ab24b29486813b450fd8654.zip" + kms_key_id = (known after apply) + server_side_encryption = (known after apply) + source = "assets/VotingAppApi_get_leaderboard0_Asset_7C98D66C/DF818777333DB2B243EA701F37A12C73/archive.zip" + storage_class = (known after apply) + tags_all = (known after apply) + version_id = (known after apply) } # aws_s3_object.VotingAppApi_post_requestChoices0_S3Object_E5911DA4 will be created + resource "aws_s3_object" "VotingAppApi_post_requestChoices0_S3Object_E5911DA4" { + acl = (known after apply) + bucket = "code-c84a50b1-20230727202411678600000003" + bucket_key_enabled = (known after apply) + checksum_crc32 = (known after apply) + checksum_crc32c = (known after apply) + checksum_sha1 = (known after apply) + checksum_sha256 = (known after apply) + content_type = (known after apply) + etag = (known after apply) + force_destroy = false + id = (known after apply) + key = "asset.c8820ba52700a98c4d6b8c373ec54bc26496a4e0ac.77fdb881e96bb42de4165acba7391731.zip" + kms_key_id = (known after apply) + server_side_encryption = (known after apply) + source = "assets/VotingAppApi_post_requestChoices0_Asset_D5F3DEE4/6FA66B16FB6500116D70F0B60A27AF80/archive.zip" + storage_class = (known after apply) + tags_all = (known after apply) + version_id = (known after apply) } # aws_s3_object.VotingAppApi_post_selectWinner0_S3Object_3DCD8E80 will be created + resource "aws_s3_object" "VotingAppApi_post_selectWinner0_S3Object_3DCD8E80" { + acl = (known after apply) + bucket = "code-c84a50b1-20230727202411678600000003" + bucket_key_enabled = (known after apply) + checksum_crc32 = (known after apply) + checksum_crc32c = (known after apply) + checksum_sha1 = (known after apply) + checksum_sha256 = (known after apply) + content_type = (known after apply) + etag = (known after apply) + force_destroy = false + id = (known after apply) + key = "asset.c8d65bd11e98c1b56b54b826b80a0ffc8870c53ac6.1cb4c5dee40e41da26384e57ac84ab8f.zip" + kms_key_id = (known after apply) + server_side_encryption = (known after apply) + source = "assets/VotingAppApi_post_selectWinner0_Asset_C0113166/096D48F358FA5896E9B9AA76D9E41D24/archive.zip" + storage_class = (known after apply) + tags_all = (known after apply) + version_id = (known after apply) } Plan: 4 to add, 4 to change, 0 to destroy. ```
Workaround for https://github.com/winglang/wing/issues/4470