terraform-provider-newrelic
terraform-provider-newrelic copied to clipboard
account_id property is required on newrelic_notification_destination but documentation says it is optional
Please include the following with your bug report
:warning: Important: Failure to include the following, such as omitting the Terraform configuration in question, may delay resolving the issue.
- [ x ] Your New Relic
provider
configuration (sensitive details redacted) - [ x ] A list of affected resources and/or data sources
- [ x ] The configuration of the resources and/or data sources related to the bug report (i.e. from the list mentioned above)
- [ x ] Description of the current behavior (the bug)
- [ x ] Description of the expected behavior
- [ x ] Any related log output
Terraform Version
1.2.8
Affected Resource(s)
Please list the resources as a list, for example:
-
newrelic_notification_destination
Terraform Configuration
Please include your
provider
configuration (sensitive details redacted) as well as the configuration of the resources and/or data sources related to the bug report.
provider "newrelic" {
api_key = var.api_key
account_id = redacted
region = "US"
}
Actual Behavior
An error occurs when not supplying the account_id attribute for a newrelic_notification_destination
Expected Behavior
An error should not occur and the terraform plan should be successful
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
- Create a
newrelic_notification_destination
resource following the examples in documentation, omitting the account_id property. My resource is below:
resource "newrelic_notification_destination" "slack_destination" {
name = "TF_slack_destination"
type = "WEBHOOK"
property {
key = "url"
value = "redacted"
}
}
- Run
terraform plan
- See error
Debug Output
https://gist.github.com/arhill05/a196919b2bf36ec8eb8ddc538c00e560
Hi @arhill05 , Thanks for raising the issue, We will prioritise this issue.
fixed in the latest release V3.2.0
There must be a regression then. Using 3.3.0 and facing this issue: https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/workflow#account_id says optional but it's required. I declare it inside the provider declaration, not per-resource.
# newrelic_workflow.workflow must be replaced
-/+ resource "newrelic_workflow" "workflow" {
- account_id = (REDACTED) -> null # forces replacement
~ id = "1434fa59-xxxx-xxxx-xxxx-13402ba0c4c2" -> (known after apply)
+ last_run = (known after apply)
name = "Workflow"
~ workflow_id = "1434fa59-xxxx-xxxx-xxxx-13402ba0c4c2" -> (known after apply)
...
Please reopen
hi @pgalvarez-elsevier, this is a different problem related to workflows, not channels. That problem was fixed in v3.5.1