-
Notifications
You must be signed in to change notification settings - Fork 228
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
Implement rancher2_node_pool_v2 #1456
Comments
Hi, You can use terraform's dynamic blocks feature to achieve what you want. Not sure what issue you faced with it but here is my example which I'm currently using:
Where
Only problem that I'm currently facing is issue with not being able to ignore changes to quantity of each machine pool, this is not supported by terraform yet. Basically this is the issue I'm describing: #1257 |
Is your feature request related to a problem? Please describe.
Im creating a terraform module for creating an RKE2 cluster using the rancher2 terraform provider. I create the cluster and machine_pools within the
rancher2_cluster_v2
resource in my module like so:But I cannot add more pools in unless I copy and paste more machine pools into this resource.
I have different host configurations with different memory, vcpu, etc and will require more unique pools. I would like to dynamically create these pools by passing in terraform variables. Currently I do not see a way to do this without updating the terraform module with multiple pools which defeats the purpose of the module.
Describe the solution you'd like
Please create a
rancher2_node_pool_v2
to add new machine poolsIf that were created, I could do a for_each loop on that resource by passing a variable to my module and I could dynamically create multiple pools
Of course that is all pseudo code. Hopefully that helps understand the feature and reason for it.
Describe alternatives you've considered
I investigated terraforms dynamic blocks to build out the
rancher2_cluster_v2
machine_pools
but it was not supported by terraform.Additional context
None
Thanks for maintaining and improving this module. Terraform is awesome and im glad to see SUSE maintain this provider.
The text was updated successfully, but these errors were encountered: