Add support to choosing the GCP subnet to deploy to. #132
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.
If
infra.gcp.vpc.subnet_id
is set, it will use that specified subnet for deploying the environment. Otherwise, it will use the first subnet found as has been the case so far.Note that this property is under
infra.gpc.vpc
while other properties like the VPC name are underinfra.vpc
.I think that's confusing but it put it under
infra.gcp.vpc
for consistency with similar properties for other cloud providers (e.g.,infra.aws.vpc.existing.public_subnet_ids
) and anyway, VPC properties seem to already be split between both places (e.g.,infra.aws.vpc.nat_gateway.name
,infra.aws.vpc.private_endpoints
, etc. vs.infra.vpc.private_subnets
,infra.vpc.enable_ssh
, etc.).I tested it by deploying GPC environments where I either specifically provided a subnet name that was different than the first one or didn't provide the subnet name to let it choose the first one and in both cases the result was the expected one.