-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPS-6704-mongodb-template-workaround (#32)
Workaround for a problem with the ionoscloud_mongo_template DataSource.
- Loading branch information
1 parent
74af620
commit 2e28fe9
Showing
3 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
data "ionoscloud_mongo_template" "mongo_template" { | ||
count = var.resource_template == null ? 0 : 1 | ||
name = var.resource_template | ||
} | ||
|
||
# Workaround | ||
# There's probably a bug in the IONOS Provider: The DataSource ionoscloud_mongo_template doesn't define id | ||
# as computed, leading to an inconsistent final plan (id is null instead of unknown in the initial plan) | ||
# This null_data_source is in between and the output is unknown in the initial plan, solving the problem. | ||
data "null_data_source" "template_workaround" { | ||
inputs = { | ||
mongo_template_id = var.resource_template == null ? null : data.ionoscloud_mongo_template.mongo_template[0].id | ||
} | ||
depends_on = [ data.ionoscloud_mongo_template.mongo_template ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters