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
I tried to create multiple index-patterns which were assigned to different tenants. While applying the known error
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to module.opensearch.opensearch_dashboard_object.tenant-2-index-1, provider "provider[\"registry.opentofu.org/opensearch-project/opensearch\"]" produced an unexpected new value: Root object was present,
│ but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
was thrown. After applying again and checking the index-patterns created on the opensearch-cluster, I noticed that some index-patterns were added to the wrong tenant.
Here is an example how I was able to reproduce it quite consistenly. (Sometimes multiple retries were necessary):
How can one reproduce the bug?
using version 2.3.1 of the opensearch-terraform provider and applying the following terraform config:
What should the provided terraform-configuration do:
create 2 tenants (tenant-1, tenant-2)
each tenant has 3 index-patterns assigned:
tenant-1 should have the index-patterns tenant-1-1, tenant-1-2, tenant-1-3
tenant-2 should have the index-patterns tenant-2-1, tenant-2-2, `tenant-2-3
after first apply, I'm getting the provider error:
Plan: 8 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
OpenTofu will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
module.opensearch.opensearch_dashboard_tenant.this["tenant-1"]: Creating...
module.opensearch.opensearch_dashboard_tenant.this["tenant-2"]: Creating...
module.opensearch.opensearch_dashboard_tenant.this["tenant-1"]: Creation complete after 0s [id=tenant-1]
module.opensearch.opensearch_dashboard_tenant.this["tenant-2"]: Creation complete after 1s [id=tenant-2]
module.opensearch.opensearch_dashboard_object.tenant-2-index-patterns["tenant-2-2"]: Creating...
module.opensearch.opensearch_dashboard_object.tenant-2-index-patterns["tenant-2-3"]: Creating...
module.opensearch.opensearch_dashboard_object.tenant-1-index-patterns["tenant-1-2"]: Creating...
module.opensearch.opensearch_dashboard_object.tenant-1-index-patterns["tenant-1-1"]: Creating...
module.opensearch.opensearch_dashboard_object.tenant-2-index-patterns["tenant-2-1"]: Creating...
module.opensearch.opensearch_dashboard_object.tenant-1-index-patterns["tenant-1-3"]: Creating...
module.opensearch.opensearch_dashboard_object.tenant-2-index-patterns["tenant-2-1"]: Creation complete after 0s [id=index-pattern:tenant-2-1]
module.opensearch.opensearch_dashboard_object.tenant-1-index-patterns["tenant-1-2"]: Creation complete after 0s [id=index-pattern:tenant-1-2]
module.opensearch.opensearch_dashboard_object.tenant-1-index-patterns["tenant-1-1"]: Creation complete after 0s [id=index-pattern:tenant-1-1]
module.opensearch.opensearch_dashboard_object.tenant-1-index-patterns["tenant-1-3"]: Creation complete after 0s [id=index-pattern:tenant-1-3]
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to module.opensearch.opensearch_dashboard_object.tenant-2-index-patterns["tenant-2-2"], provider "provider[\"registry.opentofu.org/opensearch-project/opensearch\"]" produced an unexpected new value: Root
│ object was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to module.opensearch.opensearch_dashboard_object.tenant-2-index-patterns["tenant-2-3"], provider "provider[\"registry.opentofu.org/opensearch-project/opensearch\"]" produced an unexpected new value: Root
│ object was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Checking the index-patterns through the opensearch-dashboards UI, I could see, that for tenant-1 the index-pattern tenant-2-3 was added which is not defined in the terraform configuration:
When trying to tofu apply again, it is trying to recreate (already some existing) resources.
The behaviour is kindoff randomly, sometimes it is working, sometimes other index-patterns are assigned to the wrong tenant.
tofu destroy won't delete the wrong index-patterns
What is the expected behavior?
Each index-pattern is assigned to its correct tenant.
What is your host/environment?
Opentofu 1.6.2
opensearch-terraform-provider: 2.3.1
opensearch + opensearch-dashboards: 2.11 (via docker), was reproduceable with opensearch 2.15, too)
Do you have any additional context?
I think I found a workaround by disabling the parallelism from terraform / opentofu: tofu apply -parallelism=1.
Maybe this workaround gives a hint, that there is an issue with shared resources (in this case tenant) inside the provider.
The text was updated successfully, but these errors were encountered:
I tried to create multiple index-patterns which were assigned to different tenants. While applying the known error
was thrown. After applying again and checking the index-patterns created on the opensearch-cluster, I noticed that some index-patterns were added to the wrong tenant.
Here is an example how I was able to reproduce it quite consistenly. (Sometimes multiple retries were necessary):
How can one reproduce the bug?
using version 2.3.1 of the opensearch-terraform provider and applying the following terraform config:
What should the provided terraform-configuration do:
tenant-1
,tenant-2
)tenant-1
should have the index-patternstenant-1-1
,tenant-1-2
,tenant-1-3
tenant-2
should have the index-patternstenant-2-1
,tenant-2-2
, `tenant-2-3after first apply, I'm getting the provider error:
Checking the index-patterns through the opensearch-dashboards UI, I could see, that for
tenant-1
the index-patterntenant-2-3
was added which is not defined in the terraform configuration:When trying to
tofu apply
again, it is trying to recreate (already some existing) resources.The behaviour is kindoff randomly, sometimes it is working, sometimes other index-patterns are assigned to the wrong tenant.
tofu destroy
won't delete the wrong index-patternsWhat is the expected behavior?
Each index-pattern is assigned to its correct tenant.
What is your host/environment?
Opentofu 1.6.2
opensearch-terraform-provider: 2.3.1
opensearch + opensearch-dashboards: 2.11 (via docker), was reproduceable with opensearch 2.15, too)
Do you have any additional context?
tofu apply -parallelism=1
.Maybe this workaround gives a hint, that there is an issue with shared resources (in this case tenant) inside the provider.
The text was updated successfully, but these errors were encountered: