Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workload resource rule failes without nrql_query #2751

Open
6 tasks done
smailc opened this issue Oct 3, 2024 · 0 comments
Open
6 tasks done

Workload resource rule failes without nrql_query #2751

smailc opened this issue Oct 3, 2024 · 0 comments

Comments

@smailc
Copy link

smailc commented Oct 3, 2024

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

⚠️ Important: Failure to include the following, such as omitting the Terraform configuration in question, may delay resolving the issue.

Terraform Version

1.5.7

Affected Resource(s)

newrelic_workload

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.

    newrelic = {
      source  = "newrelic/newrelic"
      version = "~> 3.0"
    }

    rule {
      entity_guids = ["<guid_id>"]
      #nrql_query {
      #  query = "name like '%Example application2%'"
      #}
      rollup {
        strategy        = "BEST_STATUS_WINS"
        threshold_type  = "FIXED"
        threshold_value = 100
      }
    }

Actual Behavior

Rule should apply when at least one of entity_guids or nrql_query is specified. However if you don't specify nrql_query it fails with the following message:

│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to newrelic_workload.foo, provider
│ "provider[\"registry.terraform.io/newrelic/newrelic\"]" produced an
│ unexpected new value: Root resource was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.

Expected Behavior

It should apply without failing

Steps to Reproduce

Setup workload resource as per Terraform doc. Create a rule with entity_guids and nrql_query. Apply and it will work fine. If you then remove nrql_query block from the rule it will fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant