-
Notifications
You must be signed in to change notification settings - Fork 7
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
Azure Virtual Machine Support #16
Merged
Merged
Conversation
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
* agreement resource added to confirm agreements automatically * var.additional_volumes created in machine module so that validation can be used * added support for zones * not all regions support zones but certain services require zones * List of regions with zones: https://learn.microsoft.com/en-us/azure/reliability/availability-zones-service-support * use of zoned virtual machines requires a zoned public ip with standard sku/static ip or results in error due to not being in the same zone * public ip must be standard sku and static ip to be used with a zone * public ip basic sku or dynamic ip will not work with a vm that has a zone * firewall support for public access and regional subnet access * use of regions without zones supported * zone is passed in as null to the machine module when assigned to 0 * optional requires terraform >= 1.3.6 * when omitted, optional returns null or can be assigned a static value * contains fails during `terraform plan` if given a null value * use `try(contains(...), boolean)` as a workaround when null value needs to be checked when not null * shortcircuit evalution does not work here: `variable == null || contains([...], variable)` will fail
* Testing of validation/optional vs pre/post-conditions * variables azs and az changed to zones and zone * additional use of validations for required objects * due to limitiation of validations, pre-conditions might be better used with similar abilities to catch errors during plan and to be able to use locals instead of manual definitions * removed unneeded validations that are properly handled by providers resources * preferably any invalid configurations are caught during `terraform plan` but provider implementation varies * added precondition for region-zone in network module * added precondition in machine module for premium ssd availability
jt-edb
reviewed
Jan 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Only 2 minor comments.
* machine module uses a machine object variable with region and zone keys already. `var.region` / `var.zone` not needed. * output references its resource's zone instead of zone variable * network module should be self-contained and not reference infrastructure.yml file expectations within errors (zone = 0) * Validation module will handle these checks
jt-edb
approved these changes
Jan 9, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Azure Virtual Machine Support Changes:
terraform plan
but provider implementation variescontains
fails duringterraform plan
if given a null valuetry(contains(...), boolean)
as a workaround when null value needs to be checked when not nullvariable == null || contains([...], variable)
will failprevent_deletion_if_contains_resources = false
azurerm_resource_group
delete fails because of lag in resource deletion hashicorp/terraform-provider-azurerm#16155