Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

modules/azure: Enable the use of external master & worker subnets #550

Merged
merged 2 commits into from
May 9, 2017

Conversation

metral
Copy link
Contributor

@metral metral commented May 5, 2017

No description provided.

@coreosbot
Copy link

Can one of the admins verify this patch?


variable "tectonic_azure_external_master_subnet_id" {
type = "string"
description = "Subnet ID within an existing VNet to deploy master nodes into. Required to use an existing VNet. Example: the subnet ID starts with `\"/subscriptions/{subscriptionId}\"` or `\"/providers/{resourceProviderNamespace}\"'`. "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: let's use HEREDOC syntax, so this does not end up in one long huge line, escaping of quotes is not necessary any more, and double new-lines will be translated to <br> lines in the generated markdown:

description = <<EOF
Subnet ID within an existing VNet to deploy master nodes into.
Required to use an existing VNet.

Example: the subnet ID starts with `"/subscriptions/{subscriptionId}"` or `"/providers/{resourceProviderNamespace}"'`. "
EOF

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally I suggest to add (optional) like so:

description = <<EOF
(optional) Subnet ID within an existing VNet to deploy master nodes into.
...
EOF

The terraform-examples tool will auto-detect the prefix (optional) and will comment out the variable in the generated examples tfvars file.

Copy link
Contributor

@s-urbaniak s-urbaniak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just two nits/suggestions regarding the documentation, else LGTM.


variable "tectonic_azure_external_master_subnet_id" {
type = "string"
description = "Subnet ID within an existing VNet to deploy master nodes into. Required to use an existing VNet. Example: the subnet ID starts with `\"/subscriptions/{subscriptionId}\"` or `\"/providers/{resourceProviderNamespace}\"'`. "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally I suggest to add (optional) like so:

description = <<EOF
(optional) Subnet ID within an existing VNet to deploy master nodes into.
...
EOF

The terraform-examples tool will auto-detect the prefix (optional) and will comment out the variable in the generated examples tfvars file.

@metral
Copy link
Contributor Author

metral commented May 5, 2017

@s-urbaniak Thanks for the feedback! I've gone ahead and addressed your changes

@metral metral force-pushed the ext-subnets branch 2 times, most recently from f346739 to 813295d Compare May 5, 2017 19:57
@s-urbaniak
Copy link
Contributor

ok to test

1 similar comment
@metral
Copy link
Contributor Author

metral commented May 9, 2017

ok to test

- Only create master & worker subnets if no external vnets exist
- The `join()` interpolation function is used to work around
hashicorp/hil#50 when the subnets are conditionally
created. For more detail, see:
coreos@7ab31b0)
@metral
Copy link
Contributor Author

metral commented May 9, 2017

@s-urbaniak is there anything else needed in this PR?

Copy link
Contributor

@s-urbaniak s-urbaniak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM now, thanks a lot!

@s-urbaniak s-urbaniak merged commit e0c2d67 into coreos:master May 9, 2017
@metral metral deleted the ext-subnets branch May 9, 2017 16:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants