focusaurus / focusaurus/hexagonal-lambda

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

Đang mở
#1 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug help wanted
Ngôn ngữ chính
JavaScript
Star
27
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.