diff --git a/api/client/cloudprovider/aws.pb.go b/api/client/cloudprovider/aws.pb.go index eca20262..d5927ff5 100644 --- a/api/client/cloudprovider/aws.pb.go +++ b/api/client/cloudprovider/aws.pb.go @@ -554,7 +554,7 @@ type AwsBaseImageSettings struct { // Base image configuration. BaseImage *AwsBaseImage `protobuf:"bytes,1,opt,name=baseImage,proto3" json:"baseImage,omitempty"` // Base image virtualization settings. - VirtualizationSettings *AwsVirtualizationSettings `protobuf:"bytes,2,opt,name=virtualizationSettings,proto3" json:"virtualizationSettings,omitempty"` + VirtualizationSettings []*AwsVirtualizationSettings `protobuf:"bytes,2,rep,name=virtualizationSettings,proto3" json:"virtualizationSettings,omitempty"` } func (x *AwsBaseImageSettings) Reset() { @@ -596,7 +596,7 @@ func (x *AwsBaseImageSettings) GetBaseImage() *AwsBaseImage { return nil } -func (x *AwsBaseImageSettings) GetVirtualizationSettings() *AwsVirtualizationSettings { +func (x *AwsBaseImageSettings) GetVirtualizationSettings() []*AwsVirtualizationSettings { if x != nil { return x.VirtualizationSettings } @@ -1126,7 +1126,7 @@ var file_cloudprovider_aws_proto_rawDesc = []byte{ 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x41, 0x77, 0x73, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x66, 0x0a, 0x16, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x41, 0x77, 0x73, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x16, 0x76, diff --git a/api/proto/cloudprovider/aws.proto b/api/proto/cloudprovider/aws.proto index 00b0e38a..7f62a2e5 100644 --- a/api/proto/cloudprovider/aws.proto +++ b/api/proto/cloudprovider/aws.proto @@ -154,7 +154,7 @@ message AwsBaseImageSettings { AwsBaseImage baseImage = 1; // Base image virtualization settings. - AwsVirtualizationSettings virtualizationSettings = 2; + repeated AwsVirtualizationSettings virtualizationSettings = 2; } // Base image configuration. diff --git a/docs/docs.md b/docs/docs.md index 199f293d..46443190 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -2173,7 +2173,7 @@ Configuration for a base image for the AWS provider's bakery. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | baseImage | [AwsBaseImage](#proto.cloudprovider.AwsBaseImage) | | Base image configuration. | -| virtualizationSettings | [AwsVirtualizationSettings](#proto.cloudprovider.AwsVirtualizationSettings) | | Base image virtualization settings. | +| virtualizationSettings | [AwsVirtualizationSettings](#proto.cloudprovider.AwsVirtualizationSettings) | repeated | Base image virtualization settings. | diff --git a/internal/convert/rosco_test.go b/internal/convert/rosco_test.go index 402bd654..061686d5 100644 --- a/internal/convert/rosco_test.go +++ b/internal/convert/rosco_test.go @@ -93,10 +93,12 @@ var roscoTests = configTest{ Id: "my-image", ShortDescription: "this is an image", }, - VirtualizationSettings: &cloudprovider.AwsVirtualizationSettings{ - Region: "us-east-1", - VirtualizationType: "hvm", - InstanceType: "t2-micro", + VirtualizationSettings: []*cloudprovider.AwsVirtualizationSettings{ + { + Region: "us-east-1", + VirtualizationType: "hvm", + InstanceType: "t2-micro", + }, }, }, }, @@ -123,10 +125,12 @@ var roscoTests = configTest{ Id: "my-image", ShortDescription: "this is an image", }, - VirtualizationSettings: &cloudprovider.AwsVirtualizationSettings{ - Region: "us-east-1", - VirtualizationType: "hvm", - InstanceType: "t2-micro", + VirtualizationSettings: []*cloudprovider.AwsVirtualizationSettings{ + { + Region: "us-east-1", + VirtualizationType: "hvm", + InstanceType: "t2-micro", + }, }, }, }, diff --git a/testdata/clouddriver.yml b/testdata/clouddriver.yml index c5ee4f4d..fba28e26 100644 --- a/testdata/clouddriver.yml +++ b/testdata/clouddriver.yml @@ -108,6 +108,7 @@ aws: id: my-image-id shortDescription: my short description virtualizationSettings: + - region: us-west-2 sourceAmi: my-source-ami virtualizationType: pv defaultVirtualizationType: pv diff --git a/testdata/halconfig.yml b/testdata/halconfig.yml index d3bbc2e0..50430b18 100644 --- a/testdata/halconfig.yml +++ b/testdata/halconfig.yml @@ -309,8 +309,9 @@ providers: id: my-image-id shortDescription: my short description virtualizationSettings: - sourceAmi: my-source-ami - virtualizationType: pv + - region: us-west-2 + sourceAmi: my-source-ami + virtualizationType: pv defaultVirtualizationType: pv templateFile: file defaultKeyPairTemplate: '{{name}}-keypair' diff --git a/testdata/rosco.yml b/testdata/rosco.yml index 4a0c472e..acb579db 100644 --- a/testdata/rosco.yml +++ b/testdata/rosco.yml @@ -28,6 +28,7 @@ aws: id: my-image-id shortDescription: my short description virtualizationSettings: + - region: us-west-2 sourceAmi: my-source-ami virtualizationType: pv defaultVirtualizationType: pv