You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to create a elasticsearch_kibana_alert resource results in the following error:
Acquiring state lock. This may take a few moments...
elasticsearch_kibana_alert.my-test-alert-from-tf: Creating...
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to
│ elasticsearch_kibana_alert.my-test-alert-from-tf, provider
│ "provider[\"registry.terraform.io/phillbaker/elasticsearch\"]" 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.
╵
Releasing state lock. This may take a few moments...
time=2022-09-26T17:17:36+01:00 level=error msg=1 error occurred:
* exit status 1
Environment
terraform v1.0.2
phillbaker/elasticsearch v2.0.4
elasticsearch & kibana both at version 7.17.1 (elastic.co hosted)
Repro
I was originally trying this with an anomaly detection alert, but it also repros with a simple log threshold - example Terraform:
In case it's relevant, under the provider "elasticsearch" block I have set kibana_url to the same value as url (as I'm not sure what else to set it to) - both URLs are of the form https://RANDOMNESS.us-east-1.aws.found.io:9243 which is where I access the Kibana UI.
https://www.reddit.com/r/Terraform/comments/m5nv14/comment/gr29zct/ suggests that this kind of error Root resource was present, but now absent means the provider is returning null from the apply, despite having planned to create something (?) I tried with TF_LOG=INFO (see collapsed output below) but that doesn't enlighten me any further unfortunately.
Expand for full output with TF_LOG=INFO
2022-09-26T16:04:40.638+0100 [INFO] Terraform version: 1.0.2
2022-09-26T16:04:40.639+0100 [INFO] Go runtime version: go1.16.4
2022-09-26T16:04:40.639+0100 [INFO] CLI args: []string{"C:\\ProgramData\\chocolatey\\lib\\terraform\\tools\\terraform.exe", "apply", "tfplan"}
2022-09-26T16:04:40.645+0100 [INFO] CLI command args: []string{"apply", "tfplan"}
2022-09-26T16:04:40.669+0100 [INFO] AWS Auth provider used: "EnvProvider"
2022-09-26T16:04:41.772+0100 [INFO] Failed to read plugin lock file .terraform\plugins\windows_amd64\lock.json: open .terraform\plugins\windows_amd64\lock.json: The system cannot find the path specified.
2022-09-26T16:04:41.773+0100 [INFO] backend/local: starting Apply operation
Acquiring state lock. This may take a few moments...
2022-09-26T16:04:44.056+0100 [INFO] provider: configuring client automatic mTLS
2022-09-26T16:04:44.143+0100 [INFO] provider.terraform-provider-aws_v3.49.0_x5.exe: configuring server automatic mTLS: timestamp=2022-09-26T16:04:44.142+0100
2022-09-26T16:04:44.327+0100 [INFO] provider: configuring client automatic mTLS
2022-09-26T16:04:44.384+0100 [INFO] provider.terraform-provider-elasticsearch_v2.0.4.exe: configuring server automatic mTLS: timestamp=2022-09-26T16:04:44.383+0100
2022-09-26T16:04:44.461+0100 [INFO] backend/local: apply calling Apply
2022-09-26T16:04:44.461+0100 [INFO] terraform: building graph: GraphTypeApply
2022-09-26T16:04:44.466+0100 [INFO] ReferenceTransformer: reference not found: "path.module"
2022-09-26T16:04:44.466+0100 [INFO] ReferenceTransformer: reference not found: "path.module"
2022-09-26T16:04:44.467+0100 [INFO] ReferenceTransformer: reference not found: "path.module"
2022-09-26T16:04:44.470+0100 [INFO] provider: configuring client automatic mTLS
2022-09-26T16:04:44.527+0100 [INFO] provider.terraform-provider-elasticsearch_v2.0.4.exe: configuring server automatic mTLS: timestamp=2022-09-26T16:04:44.526+0100
2022-09-26T16:04:44.584+0100 [WARN] ValidateProviderConfig from "provider[\"registry.terraform.io/phillbaker/elasticsearch\"]" changed the config value, but that value is unused
elasticsearch_kibana_alert.my-test-alert-from-tf: Creating...
2022-09-26T16:04:44.590+0100 [INFO] Starting apply for elasticsearch_kibana_alert.my-test-alert-from-tf
2022-09-26T16:04:45.058+0100 [INFO] provider.terraform-provider-elasticsearch_v2.0.4.exe: 2022/09/26 16:04:45 [INFO] Pinging url to determine version https://REDACTED.us-east-1.aws.found.io:9243 with timeout 5s: timestamp=2022-09-26T16:04:45.058+0100
2022-09-26T16:04:45.162+0100 [INFO] provider.terraform-provider-elasticsearch_v2.0.4.exe: 2022/09/26 16:04:45 [INFO] ES version {Number:7.17.1 BuildFlavor:default BuildType:docker BuildHash:e5acb99f822233d62d6444ce45a4543dc1c8059a BuildDate:2022-02-23T22:20:54.153567231Z BuildSnapshot:false LuceneVersion:8.11.1 MinimumWireCompatibilityVersion:6.8.0 MinimumIndexCompatibilityVersion:6.0.0-beta1}: timestamp=2022-09-26T16:04:45.162+0100
2022-09-26T16:04:46.346+0100 [INFO] provider.terraform-provider-elasticsearch_v2.0.4.exe: 2022/09/26 16:04:46 [INFO] Kibana Alert () created: timestamp=2022-09-26T16:04:46.346+0100
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to
│ elasticsearch_kibana_alert.my-test-alert-from-tf, provider
│ "provider[\"registry.terraform.io/phillbaker/elasticsearch\"]" 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.
╵
Releasing state lock. This may take a few moments...
time=2022-09-26T16:04:48+01:00 level=error msg=1 error occurred:
* exit status 1
The text was updated successfully, but these errors were encountered:
Error
Trying to create a
elasticsearch_kibana_alert
resource results in the following error:Environment
Repro
I was originally trying this with an anomaly detection alert, but it also repros with a simple log threshold - example Terraform:
In case it's relevant, under the
provider "elasticsearch"
block I have setkibana_url
to the same value asurl
(as I'm not sure what else to set it to) - both URLs are of the formhttps://RANDOMNESS.us-east-1.aws.found.io:9243
which is where I access the Kibana UI.https://www.reddit.com/r/Terraform/comments/m5nv14/comment/gr29zct/ suggests that this kind of error
Root resource was present, but now absent
means the provider is returning null from the apply, despite having planned to create something (?) I tried withTF_LOG=INFO
(see collapsed output below) but that doesn't enlighten me any further unfortunately.Expand for full output with TF_LOG=INFO
The text was updated successfully, but these errors were encountered: