newrelic / terraform-provider-newrelic

Terraform provider for New Relic
https://registry.terraform.io/providers/newrelic/newrelic/latest/docs
Mozilla Public License 2.0
202 stars 245 forks source link

Strategies for Mitigating Impact of New Relic API Downtime on Terraform Operations #2615

Open jodem opened 6 months ago

jodem commented 6 months ago

Hello,

I recently encountered an issue with the New Relic API during a critical phase of our operations. About 40 minutes ago, while using the New Relic Terraform provider, specifically with _newrelic_nrql_alertcondition resources, I started receiving Forbidden responses from New Relic's API, preventing me from performing a terraform apply. This issue has previously occurred in the middle of a migration, requiring our OPS team to wait for New Relic to resolve the API response issues.

This poses a significant challenge, as it halts our entire deployment process, especially in critical situations requiring immediate infrastructure updates or deployments. Given the potential for New Relic API downtimes or errors to disrupt our Terraform operations, I'm seeking guidance or best practices on how to mitigate this risk.

I'm interested in knowing if there's a way to temporarily disable the New Relic provider or its resources in our Terraform configurations to prevent it from attempting to make API calls when New Relic is experiencing issues, or ignore changes temporarily, allowing us to apply the rest of our Terraform stack without being blocked by New Relic's API status. Any advice, workarounds, or best practices on how to limit our exposure to New Relic API errors and ensure that our Terraform operations can proceed, even when specific resources might be temporarily unreachable, would be greatly appreciated.

pranav-new-relic commented 6 months ago

Hi @jodem, thanks for reaching out. We don't have a concrete suggestion in this regard as this is mostly caused by intermittent API behaviour like you mentioned, which isn't very predictable - however, we shall keep this thread open and revert when we have something resourceful to suggest. Thanks!