focusaurus / focusaurus/hexagonal-lambda

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

Abierto
#1 3 comentarios 0 reacciones 0 asignados Ver en GitHub
bug help wanted
Lenguaje dominante
JavaScript
Estrellas
27
Forks
3
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Inspect the Terraform configuration for aws_api_gateway_deployment, API methods, the Lambda function, and aws_iam_role_policy_attachment.post-up. First reproduce an initial apply in a blank AWS account and compare the resource dependency graph with the second run; done means the first apply completes without either reported error.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
aws, terraform
Área
cloud, infrastructure
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.