[WIP] terraform: Consolidate bootstrap resources with module count feature #4822
[WIP] terraform: Consolidate bootstrap resources with module count feature #4822rna-afk wants to merge 6 commits intoopenshift:masterfrom
Conversation
e19d2cc to
30457ee
Compare
30457ee to
bc6d971
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1 similar comment
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
bc6d971 to
9a8522e
Compare
|
This builds on #4729 |
There was a problem hiding this comment.
Make this variable a bool and rename it to something like bootstrapping.
There was a problem hiding this comment.
Is this statement accurate? Why does it only apply to cloud platforms?
There was a problem hiding this comment.
Don't provide a default. Require that this variable be explicitly set.
9a8522e to
78cf8f6
Compare
78cf8f6 to
568f27e
Compare
568f27e to
d28e98f
Compare
There was a problem hiding this comment.
Let's move count up to right under source. This keeps it consistent with how count is used for resources and data.
There was a problem hiding this comment.
I think we can get rid of gcp_bootstrap_enabled and gcp_bootstrap_lb.
There was a problem hiding this comment.
I think we can get rid of boostrap_dns.
bd9afcd to
37b09aa
Compare
|
/test e2e-azure |
37b09aa to
39160d7
Compare
|
This looks good to me. |
| // upload the disk if we don't have an existing template | ||
| resource "ovirt_image_transfer" "releaseimage" { | ||
| count = length(local.existing_id) == 0 ? 1 : 0 | ||
| count = length(local.existing_id) == 0 && var.bootstrapping ? 1 : 0 |
There was a problem hiding this comment.
You need to pass in the bootstrapping variable to this module.
|
/test e2e-gcp |
6b81b3d to
50d1081
Compare
50d1081 to
03a1a5a
Compare
Update terraform-provider-aws to 3.1.0 Update terraform-provider-azure to 2.48.0 Update terraform-provider-google to 3.40.0
Update plugin directory to use new terraform plugin paths. Add environment variable that sets location of terraform.rc so that local terraform plugins can be used. New terraform provider requirements are documented here: https://www.terraform.io/docs/language/providers/requirements.html
Add terraform.rc and update terraform modules to specify terraform version and local provider locations.
Add environment variable OPENSHIFT_INSTALL_KEEP_TERRAFORM that will not delete the installer terraform when set.
03a1a5a to
3f4c686
Compare
Terraform 0.13 has a module count feature that can be set to instruct terraform to create the exact number of copies of the module in the cloud provider. This feature can be used to control the creation and deletion of the bootstrap resources needed for cluster. Adding the count field in all the bootstrap modules of all cloud providers in order to make it easy to destroy bootstrap after nodes have been created. This field would also make it easy to destroy the resources without having to check for the cloud platform and have a separate destroy logic for each of the platforms.
3f4c686 to
e715485
Compare
|
@rna-afk: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
@rna-afk: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
@rna-afk: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Terraform 0.13 has a module count feature that can be set to instruct
terraform to create the exact number of copies of the module in the
cloud provider. This feature can be used to control the creation and
deletion of the bootstrap resources needed for cluster.
Adding the count field in all the bootstrap modules of all cloud
providers in order to make it easy to destroy bootstrap after
nodes have been created. This field would also make it easy to
destroy the resources without having to check for the cloud
platform and have a separate destroy logic for each of the platforms.