UNCLASSIFIED - NO CUI

Skip to content

Support the usage of custom subnet addresses

General MR

Summary

This modifies the k3d-dev.sh package to support the usage of a SUBNET_ID other than the VPC default.

Relevant logs/screenshots

Without this patch, in a custom VPC which has no default subnet tagged:

$ VPC_ID=vpc-06f6601af69fe5e6b SUBNET_ID=subnet-abcdefghijklmnopqrstuvwxyz ./k3d-dev.sh -t leviathan
arn:aws-us-gov:sts::141078740716:assumed-role/AWSReservedSSO_P1-Airgap_d0106e4b824bbd53/akesterson@bridgephase.com
VPC vpc-06f6601af69fe5e6b has no default subnets - please provide SUBNET_ID

With this patch:

$ VPC_ID=vpc-06f6601af69fe5e6b SUBNET_ID=subnet-abcdefghijklmnopqrstuvwxyz ./k3d-dev.sh -t TEST                                                                                        
arn:aws-us-gov:sts::141078740716:assumed-role/AWSReservedSSO_P1-Airgap_d0106e4b824bbd53/akesterson@bridgephase.com                                                                 
Will use standard t3.2xlarge spot instance                                                                                                                                         
Checking if key pair akestersonbridgephase.com-dev-TEST exists ...missing                                                                                                     
Creating key pair akestersonbridgephase.com-dev-TEST ... done                                                                                                                 
Checking if security group akestersonbridgephase.com-dev-TEST exists ...missing                                                                                               
Creating security group akestersonbridgephase.com-dev-TEST ... 
                                            
An error occurred (InvalidGroup.Duplicate) when calling the CreateSecurityGroup operation: The security group 'akestersonbridgephase.com-dev-TEST' already exists for VPC 'vpc-06f6601af69fe5e6b'                 
done                                 
Retrieving ID for security group akestersonbridgephase.com-dev-TEST ...done
Checking if 75.90.16.84 is authorized in security group ...found                                                                                                                   
Using AMI image id ami-0b8aee775c59a76e4
Creating device_mappings.json ...
Creating spot_options.json ...
Running spot instance ...
Waiting for instance i-0df20824387cbd11d to be ready ...
Almost there, 15 seconds to go...

Linked Issue

issue

Upgrade Notices

(Include any relevant notes about upgrades here or write "N/A" if there are none)

Merge request reports

Loading