Skip to content

Commit 617e5c4

Browse files
refactor: deploy subnets for every az in aws (#330)
subnets are regional in azure and gcp, so we're mimicking that behavior in aws this means: - subnets in aws generate 1 subnet for each availability zone - for regional and highly available resources (kubernetes node pool and databases for now) we use all generated AWS subnets - for zonal resources (vms, network interfaces), a zone is selected and the appropriate subnet with it - for resources that are associated with single subnets (route table associations) we create 1 for each subnet
1 parent 708a01d commit 617e5c4

59 files changed

Lines changed: 1514 additions & 1346 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/proto/resourcespb/database.pb.go

Lines changed: 63 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/proto/resourcespb/database.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ message DatabaseArgs {
4444
string password = 8;
4545
repeated string subnet_ids = 9;
4646
int32 port = 10;
47+
string subnet_id = 11;
4748
}
4849

4950
message DatabaseResource {
@@ -57,6 +58,7 @@ message DatabaseResource {
5758
string password = 8;
5859
repeated string subnet_ids = 9;
5960
int32 port = 12;
61+
string subnet_id = 13;
6062

6163
//outputs
6264
string host = 10;

api/proto/resourcespb/network_interface.pb.go

Lines changed: 43 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/proto/resourcespb/network_interface.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ message NetworkInterfaceArgs {
3131
string name = 2;
3232
string subnet_id = 3;
3333
string public_ip_id = 4;
34+
int32 availability_zone = 5;
3435
}
3536

3637
message NetworkInterfaceResource {
3738
common.CommonResourceParameters common_parameters = 1;
3839
string name = 2;
3940
string subnet_id = 3;
4041
string public_ip_id = 4;
42+
int32 availability_zone = 5;
4143
}

0 commit comments

Comments
 (0)