Closed jacob-hudson closed 3 months ago
When you are rebuilding the state, you have policyId:conditioned:conditionType
instead of "id":"1327951:6879335:static"
it should be "id":"1327951:6879335"
On new alert creation, there is no issue
This works as expected
terraform import newrelic_nrql_alert_condition.complete-example 1327951:6879335:static
Meaning the State files are being corrupted somehow as the resource are being imported correctly
@smcavallo Could you please take a look at this issue/PR when you get a chance? This is preventing us from replacing the original NewRelic Provider you wrote as we have codified Alert Conditions that need to be managed
If I am completely off on the PR, let me know - this was found when investigating/testing the provider preparing it to go to production
@jacob-hudson thank you so much for this - I will take a look and review
@jacob-hudson your fix has been merged and published to the upbound marketplace. Thanks again for the fix (and using this provider!!!)
https://marketplace.upbound.io/providers/crossplane-contrib/crossplane-provider-newrelic/v0.2.1
What happened?
AlertCondition resources fail to reconcile after the controller pod restarts
How can we reproduce it?
Failed
with a reason ofReconcileError
and the message ofobserve failed: cannot run refresh: refresh failed: strconv.ParseInt: parsing "static": invalid syntax:
. AlertConditions are completely fine before this point. Alert Policies are unaffected. There are no logs in the controller pod in its default configuration. If the alert condition is of type Baseline, the error will read Baseline instead of StaticWhat environment did it happen in?
Crossplane version: 1.15.2 Kubernetes Version: AWS EKS 1.27