-
Notifications
You must be signed in to change notification settings - Fork 60
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
[BUG]Provider produced inconsistent final plan #183
Comments
The attribute needs the same value for plan phase and apply phase, hence the error. |
Further reference from hashicorp/terraform#25090 : |
I got the error by updating the access rights of the data policy with a new value. Planning showed it was going to update, and it did so at the apply. However it then spit out the error right after. So there is a bug with the read after the update. |
+1 on this, it is quite the struggle to get this piece working with AWS OpenSearch right now. |
If I then try rerunning it again, I get this error:
|
What is the bug?
Provider produced inconsistent final plan when the 'body' value for resource opensearch_component_template changes from plan to apply. In my case the body template would be dynamically fetched from private repo using null_resource. So during plan phase its considering the "{}" value while actually apply returns a JSON template resulting into this issue.
How can one reproduce the bug?
locals{
component_templates_map = {"my-template1": "http://localnexus:8080/mytemplatefile1"}
}
resource "null_resource" "download_component_templates"{
Downloading file from the local nexus and redirecting the response body into the file
}
resource "opensearch_component_template" "component_tempalte" {
provider = opensearch.opensearch_provider
for_each = local.component_templates_map
name = each.key
body = try(file("${path.module}/${each.key}_components.json"), "{}")
depends_on = [null_resource.download_component_templates]
}
Provider
opensearch = {
source = "opensearch-project/opensearch"
version = "2.2.1"
}
What is the expected behavior?
Open search component to be created.
What is your host/environment?
Linux
Do you have any screenshots?
Do you have any additional context?
Add any other context about the problem.
The text was updated successfully, but these errors were encountered: