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

OPS-6704-mongodb-template-workaround #32

Merged
merged 3 commits into from
Jul 25, 2024

Conversation

YannickEvers
Copy link
Contributor

Description

Workaround for a problem with the ionoscloud_mongo_template DataSource:
The id is null in the inital plan, but has the correct value when read later, resulting in a inconsistent final plan.

Error: Provider produced inconsistent final plan
When expanding the plan for
module.ionos_mongodb_cluster["cd"].ionoscloud_mongo_cluster.mongo_cluster to
include new values learned so far during apply, provider
"registry.terraform.io/ionos-cloud/ionoscloud" produced an invalid new value
for .template_id: was null, but now
cty.StringVal("6b78ea06-ee0e-4689-998c-fc9c46e781f6").
This is a bug in the provider, which should be reported in the provider's own
issue tracker.

The null_data_source resource "hides" the initial null, resulting in a consistent final plan.

  # module.ionos_mongodb_cluster["cd"].data.null_data_source.template_workaround will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "null_data_source" "template_workaround" {
      + has_computed_default = (known after apply)
      + id                   = (known after apply)
      + inputs               = {
          + "mongo_template_id" = null
        }
      + outputs              = (known after apply)
      + random               = (known after apply)
    }

Links to Tickets or other PRs

Notes

Approval for review

  • All points were discussed with the ticket creator, support-team or product owner. The code upholds all quality guidelines from the PR-template.

Notice: Please remove the WIP label if the PR is ready to review, otherwise nobody will review it.

@YannickEvers YannickEvers requested a review from a team July 18, 2024 15:56
@YannickEvers YannickEvers self-assigned this Jul 18, 2024
@YannickEvers YannickEvers merged commit 2e28fe9 into main Jul 25, 2024
@YannickEvers YannickEvers deleted the OPS-6704-mongodb-template-workaround branch July 25, 2024 11:08
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

Successfully merging this pull request may close these issues.

2 participants