focusaurus / focusaurus/hexagonal-lambda

Terraform apply fails first, then works 2nd time in some cases

未关闭
#1 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug help wanted
主要语言
JavaScript
星标
27
派生
3
PR 合并指标
30 天内没有已合并 PR

描述

Sometimes a `terraform apply` run does some things successfully but fails before completing. Then I rerun it again immediately without any other changes/actions and it succeeds. My strong hunch about this is that most likely my resource dependencies are not modeled correctly in terraform. I have seen this in at least 2 specific cases.

1. Fresh install into a blank slate AWS account.

```
aws_api_gateway_deployment.hexagonal-lambda-dev: Error creating API Gateway Deployment: BadRequestException: The REST API doesn't contain any methods
status code: 400, request id: redacted
```

2. Creating a new lambda function.

```
Error applying plan:

1 error(s) occurred:

* aws_iam_role_policy_attachment.post-up: 1 error(s) occurred:

* aws_iam_role_policy_attachment.post-up: [WARN] Error attaching policy arn:aws:iam::REDACTED:policy/terraform-redacted to IAM Role post-up: NoSuchEntity: Role not found for post-up
status code: 404, request id: redacted
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。