Getting Access Denied., null when trying to import a new relic alert policy in terraform as a data source.
0.12.24
https://gist.github.com/alivirya/5caf3fa102770036f1589f181ca9d64f
Have submitted a query via postman with the query below that works so it doesn't seem like an api key issue:
{
actor {
account(id: {accountId}) {
alerts {
policy(id: {policyId}) {
id
name
incidentPreference
accountId
}
}
}
}
}
I've created a New Relic Alert Policy data source that imports from an existing new relic alert policy. It should be able to import this information.
Getting Access Denied., null, when looking at the logs and the Graphql output, I tried running the postman query myself and it seems to work so it doesn't seem to be a problem with the api keys. Seems like this might be a problem with how the provider performs the query
Create a New Relic data source
# data "newrelic_alert_policy" "name" {
# name = "{existing_policy_name}"
# }
terraform plan
Hi @alivirya!
Can you confirm that that account_id configured in your provider block matches the account ID you are using in your test query?
@ctrombley Yes the account id is the same
Resolved by #783 .
Duplicate of #773
Most helpful comment
Resolved by #783 .