Open nadove-ucsc opened 1 year ago
Spike to check for obviously missing dependency between policy and lambda resources.
If a missing dependency exists, it doesn't stand out. However, from the logs one might conclude that this is due to a race condition. Item 6, 5 and 1 are of interest in this logs).
@hannes-ucsc: "Looking at the CloudTrail event sequence, we know that the PutRolePolicy call precedes the CreateNetworkInterface call, but only by seven seconds. We have observed latency with which policy updates become effective in IAM and those latencies es were in the order of several tens of seconds. Furthermore, the dependency graph in our Terraform config has the lambda depend on the role (R) but not the role policy (RP). That should also be fixed. We can address both problems by inserting a sleep resource(Z) between the function (F) and the role policy (RP) resource."
https://groups.google.com/a/ucsc.edu/g/azul-group/c/wGBpy99vvFA
May be a missing
depends_on
clause in the TF config.