Add auto_delete and instance_redistribution_type to compute-vm and compute-mig modules. #890
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While working with compute-vm and compute-mig modules, I encounted the following issues:
auto_delete
used bygoogle_compute_instance_template
creates a conflict withREAD_ONLY
disks (ex. https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/tree/master/modules/compute-mig#stateful-migs---mig-config ) and it's not possible to customize the attribute in the modulecompute-vm
, therefore it's not possible to create disk with read only disks with the current version of the module.instance_redistribution_type
used bygoogle_compute_region_instance_group_manager
is not compatible with stateful migs and it's not possible to customize the attribute in the modulecompute-mig
, therefore it's not possible to create regional stateful mig with the current version of the module (if I did not miss anything).stateful_config
and it's not working in my case. I guess there is an error.This PR add the two attributes in the respective module and let the user to customize them in order to implement the mentioned use case.
Using a template with
attached_disk
of typeread_only
incompute-vm
results in:Using a regional stateful mig in
compute-mig
results in: