-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: 429 error without the "X-Redlock-Status" header #223
Comments
appears to be related to #200 ? possibility of a "noisy neighbor" problem? i.e. some Prisma Cloud customers' volume affecting other customers in the same tenancy? not sure, but might be worth checking the aggregate API traffic stats. |
I put in some calories trying to engineer a way to every attempt to
they're saying they need the calculated attributes of the resource in order to calculate how many of the data source to make. they don't know I'm just trying to we run many Terraform stacks in an orchestrated manner which does not support the separate attempt using the most promising was the resource "time_static" "foo" {
}
data "prismacloud_aws_cft_generator" "foo" {
count = timecmp(time_static.foo.rfc3339, timestamp()) == 0 ? 1 : 0
...
} this conditional logic keeps track of the timestamp when it first gets created and never runs again. unfortunately, there are two issues:
just to be clear: this wouldn't be happening in the first place if the external ID were available as a resource instead of a data source. this 429 API limiting problem is a ramification of the design decision to make the external ID available only as a data source, because of the way the Terraform ecosystem is architected and because its use as drift detection is encouraged. other further reading: |
FYI there does exist a time_rotating Terraform resource (implementation here). this resource expires itself after a certain time period, causing no-op for the duration but flags Terraform to taint (i.e. destroy and re-create) after the duration. something similar could be implemented for the proposed external_id resource to keep it static for a defined rotation period. I'm imagining the hypothetical just brainstorming. |
@erikpaasonen Thanks for opening the issue, a fix has been released with terraform version = "1.4.1" |
Describe the bug
Terraform fails because the data sources don't return valid data.
Expected behavior
should be able to rerun
terraform plan
andterraform apply
against a reasonable number of accounts at once, as often as we choose.Current behavior
after several successes, we receive this error on all the others:
since the data source fails, the Terraform stack cannot calculate a plan and exits nonzero (failure).
Possible solutions
Steps to reproduce
terraform apply
against approx. 50 AWS accounts in short succession.note: for reproducing this error, it does not matter whether the
prismacloud_cloud_account_v2
resource is already created, or fails to create, or what. even previously-successfulterraform apply
runs will fail on subsequent runs because both data sources still need to succeed their underlying API calls.Context
I work at a big company (though I'm posting this issue here personally). we recently began using the newly-released prismacloud_cloud_account_v2 resource. we are unable to deploy this refactor to all of our accounts because of this error.
this worked for us up until recently, while we were on the v1 version of the resource. I suspect it's because we didn't have to hit a data source on every run. it was a one-and-done TF resource that did nothing (meaning, no API calls at all) when we reran Terraform against the account in the future. now with v2 requiring an external ID value which is provided only via data source, our Terraform stack needs to run that data source on every run in order to have the value ready for the resource (which it doesn't need/throws away on every subsequent run after the initial resource is created, of course).
Terraform is often used as a drift detection tool. rerunning a stack which is not expected to have any changes is one way of achieving a high confidence in the resources managed by Terraform. the more often Terraform runs and detects no changes between the code and the environment, the greater the confidence in the environment. thus, a high load can be expected on data sources, since they need to complete successfully for even a no-changes
plan
orapply
run to not fail with an error.Your Environment
I think I'm safe to say somewhere in the range of 100 to 2000 AWS accounts
v1.2.2
linux_amd64
prismacloud
Terraform provider:v1.3.7
The text was updated successfully, but these errors were encountered: