terraform-provider-newrelic
terraform-provider-newrelic copied to clipboard
workflow_enabled is ignored
Hi there,
Thank you for opening an issue. In order to better assist you with your issue, we kindly ask to follow the template format and instructions. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests only. General usage questions submitted as issues will be closed and redirected to New Relic's Explorers Hub https://discuss.newrelic.com/c/build-on-new-relic/developer-toolkit.
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
- [ ] Any related log output
Terraform Version
╰─ $ terraform -v Terraform v1.2.8 on linux_amd64
- provider registry.terraform.io/newrelic/newrelic v3.0.1
Affected Resource(s)
Please list the resources as a list, for example:
-
newrelic_workflow
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
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.
terraform {
required_providers {
newrelic = {
source = "newrelic/newrelic"
version = "3.0.1"
}
}
}
provider "newrelic" {
# Configuration options
account_id = "IDGOESHERE"
api_key = "APIKEYGOESHERE"
region = "US"
}
resource "newrelic_workflow" "tf_workflow" {
name = "tf-workflow"
account_id = var.account_id
muting_rules_handling = "NOTIFY_ALL_ISSUES"
workflow_enabled = false
enrichments {
nrql {
name = "Log count"
configurations {
query = "SELECT count(*) FROM Log"
}
}
}
issues_filter {
name = "Filter-name"
type = "FILTER"
predicates {
attribute = "accumulations.sources"
operator = "EXACTLY_MATCHES"
values = [ "newrelic" ]
}
}
destination_configuration {
channel_id = newrelic_notification_channel.tf_webhook_channel.id
}
}
Actual Behavior
Workflow is always enabled.
Expected Behavior
Workflow should be disabled
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
- Generate the configuration for a new (or modify an existing) workflow.
-
terraform apply
- See success message.
- Refresh browser and see workflow is still enabled.
Hi @jbhardman Thanks for raising the issue, we will prioritise this issue.
Hello,
The same issue also applies to the following attributes:
- destinations_enabled
- enrichments_enabled
The issue should be resolved in the next release of our TF provider
The issue has been fixed in v3.5.2 for all boolean flags in workflows (destinations_enabled
, enrichments_enabled
, enabled
)
That being said, I would advice against using destinations_enabled
and enrichments_enabled
flags:
-
destinations_enabled
: please useenabled
instead, it does the same thing but better because you'll be able to at least see it in the UI -
enrichments_enabled
: just remove enrichments if you do not need them; if you do not have any enrichments, this flag does not do anything
We will most likely remove both flags in the future.
We got and verified a report that the flag does not work again, at least when creating a new workflow. I am reopening the ticket for now for visibility.
The issue only affects workflow creation, not updated. So as a workaround, please run terraform apply
one more time after creation.
We have already identified the root cause and hope to roll out a fix next week
The issue with new workflows has been fixed in v3.11.0