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

InfluxDB Continuous Query not working as expected #8

Open
Tafzer96 opened this issue Oct 3, 2023 · 1 comment
Open

InfluxDB Continuous Query not working as expected #8

Tafzer96 opened this issue Oct 3, 2023 · 1 comment

Comments

@Tafzer96
Copy link

Tafzer96 commented Oct 3, 2023

I'm experiencing an issue with the InfluxDB Continuous Query feature using the Terraform provider. The continuous query is not being created correctly and is producing inconsistent results.

The error message indicates that the provider is producing an unexpected new value, resulting in the issue.

Error: Provider produced inconsistent result after apply

When applying changes to influxdb_continuous_query.xxx, provider
"provider["registry.terraform.io/drfaust92/influxdb"]" 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.

Terraform Configuration:

resource "influxdb_continuous_query" "example_cq" {
  name     = "example_cq"
  database = "my_database"

  query = "SELECT count(value) AS count INTO xxx_db.xxx.:MEASUREMENT FROM xxx_db.xxx_rb./.*/"
}


**Note:**
- Ensure to include the provider version you're using (1.6.1 in this case).
- Provide clear steps to reproduce the issue and the expected behavior.

---

This information will help the maintainers of the InfluxDB provider to investigate the issue and provide a fix.
@geronimo-iia
Copy link

I find the root cause : when the continuous query is not created, the provider didnt find it (normal), and unset the identifier in the ressource, so we've git this message.

In the query, xxx_db.xxx_rb must exist before create the continuous query.

In order to have a better understanding, my we could raise a specific error message when we set d.SetId("") in continuous_query.go line 111.

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

2 participants