diff --git a/api/proto/resourcespb/virtual_machine.pb.go b/api/proto/resourcespb/virtual_machine.pb.go index 8b0a3d67..098ce7b4 100644 --- a/api/proto/resourcespb/virtual_machine.pb.go +++ b/api/proto/resourcespb/virtual_machine.pb.go @@ -632,6 +632,195 @@ func (x *VirtualMachineArgs) GetAvailabilityZone() int32 { return 0 } +type VirtualMachineAwsOutputs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ec2InstanceId string `protobuf:"bytes,1,opt,name=ec2_instance_id,json=ec2InstanceId,proto3" json:"ec2_instance_id,omitempty"` + IamInstanceProfileArn string `protobuf:"bytes,2,opt,name=iam_instance_profile_arn,json=iamInstanceProfileArn,proto3" json:"iam_instance_profile_arn,omitempty"` + IamRoleArn string `protobuf:"bytes,3,opt,name=iam_role_arn,json=iamRoleArn,proto3" json:"iam_role_arn,omitempty"` + KeyPairArn string `protobuf:"bytes,4,opt,name=key_pair_arn,json=keyPairArn,proto3" json:"key_pair_arn,omitempty"` +} + +func (x *VirtualMachineAwsOutputs) Reset() { + *x = VirtualMachineAwsOutputs{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_resourcespb_virtual_machine_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VirtualMachineAwsOutputs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VirtualMachineAwsOutputs) ProtoMessage() {} + +func (x *VirtualMachineAwsOutputs) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_resourcespb_virtual_machine_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VirtualMachineAwsOutputs.ProtoReflect.Descriptor instead. +func (*VirtualMachineAwsOutputs) Descriptor() ([]byte, []int) { + return file_api_proto_resourcespb_virtual_machine_proto_rawDescGZIP(), []int{9} +} + +func (x *VirtualMachineAwsOutputs) GetEc2InstanceId() string { + if x != nil { + return x.Ec2InstanceId + } + return "" +} + +func (x *VirtualMachineAwsOutputs) GetIamInstanceProfileArn() string { + if x != nil { + return x.IamInstanceProfileArn + } + return "" +} + +func (x *VirtualMachineAwsOutputs) GetIamRoleArn() string { + if x != nil { + return x.IamRoleArn + } + return "" +} + +func (x *VirtualMachineAwsOutputs) GetKeyPairArn() string { + if x != nil { + return x.KeyPairArn + } + return "" +} + +type VirtualMachineAzureOutputs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VirtualMachineId string `protobuf:"bytes,1,opt,name=virtual_machine_id,json=virtualMachineId,proto3" json:"virtual_machine_id,omitempty"` + NetworkInterfaceId string `protobuf:"bytes,2,opt,name=network_interface_id,json=networkInterfaceId,proto3" json:"network_interface_id,omitempty"` + PublicIpId string `protobuf:"bytes,3,opt,name=public_ip_id,json=publicIpId,proto3" json:"public_ip_id,omitempty"` +} + +func (x *VirtualMachineAzureOutputs) Reset() { + *x = VirtualMachineAzureOutputs{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_resourcespb_virtual_machine_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VirtualMachineAzureOutputs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VirtualMachineAzureOutputs) ProtoMessage() {} + +func (x *VirtualMachineAzureOutputs) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_resourcespb_virtual_machine_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VirtualMachineAzureOutputs.ProtoReflect.Descriptor instead. +func (*VirtualMachineAzureOutputs) Descriptor() ([]byte, []int) { + return file_api_proto_resourcespb_virtual_machine_proto_rawDescGZIP(), []int{10} +} + +func (x *VirtualMachineAzureOutputs) GetVirtualMachineId() string { + if x != nil { + return x.VirtualMachineId + } + return "" +} + +func (x *VirtualMachineAzureOutputs) GetNetworkInterfaceId() string { + if x != nil { + return x.NetworkInterfaceId + } + return "" +} + +func (x *VirtualMachineAzureOutputs) GetPublicIpId() string { + if x != nil { + return x.PublicIpId + } + return "" +} + +type VirtualMachineGcpOutputs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ComputeInstanceId string `protobuf:"bytes,1,opt,name=compute_instance_id,json=computeInstanceId,proto3" json:"compute_instance_id,omitempty"` + ServiceAccountEmail string `protobuf:"bytes,2,opt,name=service_account_email,json=serviceAccountEmail,proto3" json:"service_account_email,omitempty"` +} + +func (x *VirtualMachineGcpOutputs) Reset() { + *x = VirtualMachineGcpOutputs{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_resourcespb_virtual_machine_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VirtualMachineGcpOutputs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VirtualMachineGcpOutputs) ProtoMessage() {} + +func (x *VirtualMachineGcpOutputs) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_resourcespb_virtual_machine_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VirtualMachineGcpOutputs.ProtoReflect.Descriptor instead. +func (*VirtualMachineGcpOutputs) Descriptor() ([]byte, []int) { + return file_api_proto_resourcespb_virtual_machine_proto_rawDescGZIP(), []int{11} +} + +func (x *VirtualMachineGcpOutputs) GetComputeInstanceId() string { + if x != nil { + return x.ComputeInstanceId + } + return "" +} + +func (x *VirtualMachineGcpOutputs) GetServiceAccountEmail() string { + if x != nil { + return x.ServiceAccountEmail + } + return "" +} + type VirtualMachineResource struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -653,14 +842,17 @@ type VirtualMachineResource struct { GcpOverride *VirtualMachineGcpOverride `protobuf:"bytes,17,opt,name=gcp_override,json=gcpOverride,proto3" json:"gcp_override,omitempty"` AvailabilityZone int32 `protobuf:"varint,18,opt,name=availability_zone,json=availabilityZone,proto3" json:"availability_zone,omitempty"` // outputs - PublicIp string `protobuf:"bytes,12,opt,name=public_ip,json=publicIp,proto3" json:"public_ip,omitempty"` - IdentityId string `protobuf:"bytes,13,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` + PublicIp string `protobuf:"bytes,12,opt,name=public_ip,json=publicIp,proto3" json:"public_ip,omitempty"` + IdentityId string `protobuf:"bytes,13,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` + AwsOutputs *VirtualMachineAwsOutputs `protobuf:"bytes,19,opt,name=aws_outputs,json=awsOutputs,proto3" json:"aws_outputs,omitempty"` + AzureOutputs *VirtualMachineAzureOutputs `protobuf:"bytes,20,opt,name=azure_outputs,json=azureOutputs,proto3" json:"azure_outputs,omitempty"` + GcpOutputs *VirtualMachineGcpOutputs `protobuf:"bytes,21,opt,name=gcp_outputs,json=gcpOutputs,proto3" json:"gcp_outputs,omitempty"` } func (x *VirtualMachineResource) Reset() { *x = VirtualMachineResource{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_resourcespb_virtual_machine_proto_msgTypes[9] + mi := &file_api_proto_resourcespb_virtual_machine_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -673,7 +865,7 @@ func (x *VirtualMachineResource) String() string { func (*VirtualMachineResource) ProtoMessage() {} func (x *VirtualMachineResource) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_resourcespb_virtual_machine_proto_msgTypes[9] + mi := &file_api_proto_resourcespb_virtual_machine_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -686,7 +878,7 @@ func (x *VirtualMachineResource) ProtoReflect() protoreflect.Message { // Deprecated: Use VirtualMachineResource.ProtoReflect.Descriptor instead. func (*VirtualMachineResource) Descriptor() ([]byte, []int) { - return file_api_proto_resourcespb_virtual_machine_proto_rawDescGZIP(), []int{9} + return file_api_proto_resourcespb_virtual_machine_proto_rawDescGZIP(), []int{12} } func (x *VirtualMachineResource) GetCommonParameters() *commonpb.CommonResourceParameters { @@ -808,6 +1000,27 @@ func (x *VirtualMachineResource) GetIdentityId() string { return "" } +func (x *VirtualMachineResource) GetAwsOutputs() *VirtualMachineAwsOutputs { + if x != nil { + return x.AwsOutputs + } + return nil +} + +func (x *VirtualMachineResource) GetAzureOutputs() *VirtualMachineAzureOutputs { + if x != nil { + return x.AzureOutputs + } + return nil +} + +func (x *VirtualMachineResource) GetGcpOutputs() *VirtualMachineGcpOutputs { + if x != nil { + return x.GcpOutputs + } + return nil +} + var File_api_proto_resourcespb_virtual_machine_proto protoreflect.FileDescriptor var file_api_proto_resourcespb_virtual_machine_proto_rawDesc = []byte{ @@ -919,72 +1132,117 @@ var file_api_proto_resourcespb_virtual_machine_proto_rawDesc = []byte{ 0x63, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x5a, 0x6f, 0x6e, 0x65, 0x22, 0xa3, 0x07, 0x0a, 0x16, 0x56, 0x69, 0x72, 0x74, - 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x57, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x32, 0x0a, 0x15, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x49, 0x64, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, - 0x12, 0x36, 0x0a, 0x07, 0x76, 0x6d, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x56, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x52, 0x06, 0x76, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x36, 0x34, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x42, 0x61, 0x73, 0x65, - 0x36, 0x34, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x12, - 0x24, 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x53, - 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, - 0x69, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x49, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x10, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x49, 0x70, 0x12, 0x4c, 0x0a, 0x0f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x61, 0x77, 0x73, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, - 0x69, 0x64, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, - 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x41, 0x77, - 0x73, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x0b, 0x61, 0x77, 0x73, 0x4f, 0x76, - 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, - 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, - 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, - 0x69, 0x6e, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, - 0x52, 0x0d, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, - 0x51, 0x0a, 0x0c, 0x67, 0x63, 0x70, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x74, 0x79, 0x5a, 0x6f, 0x6e, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x18, 0x56, 0x69, 0x72, 0x74, + 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x41, 0x77, 0x73, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x65, 0x63, 0x32, 0x5f, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, + 0x63, 0x32, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x18, + 0x69, 0x61, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, + 0x69, 0x61, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x41, 0x72, 0x6e, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x61, 0x6d, 0x5f, 0x72, 0x6f, 0x6c, + 0x65, 0x5f, 0x61, 0x72, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x61, 0x6d, + 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x72, 0x6e, 0x12, 0x20, 0x0a, 0x0c, 0x6b, 0x65, 0x79, 0x5f, 0x70, + 0x61, 0x69, 0x72, 0x5f, 0x61, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6b, + 0x65, 0x79, 0x50, 0x61, 0x69, 0x72, 0x41, 0x72, 0x6e, 0x22, 0x9e, 0x01, 0x0a, 0x1a, 0x56, 0x69, + 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x41, 0x7a, 0x75, 0x72, + 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x76, 0x69, 0x72, 0x74, + 0x75, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, + 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x5f, 0x69, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x49, 0x64, 0x22, 0x7e, 0x0a, 0x18, 0x56, 0x69, + 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x47, 0x63, 0x70, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x99, 0x09, 0x0a, 0x16, 0x56, + 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x10, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x13, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x49, 0x64, 0x73, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x6d, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x79, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x56, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x52, 0x06, 0x76, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x36, 0x34, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x42, + 0x61, 0x73, 0x65, 0x36, 0x34, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, + 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x73, 0x73, 0x68, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x5f, 0x69, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x12, 0x4c, 0x0a, 0x0f, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x61, 0x77, 0x73, 0x5f, 0x6f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x41, 0x77, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x0b, 0x61, 0x77, + 0x73, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x61, 0x7a, 0x75, + 0x72, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x52, 0x0d, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x67, 0x63, 0x70, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x6d, + 0x75, 0x6c, 0x74, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x56, + 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x47, 0x63, 0x70, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x0b, 0x67, 0x63, 0x70, 0x4f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x10, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5a, 0x6f, + 0x6e, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x12, + 0x1f, 0x0a, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, + 0x12, 0x4e, 0x0a, 0x0b, 0x61, 0x77, 0x73, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x56, 0x69, 0x72, 0x74, - 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x47, 0x63, 0x70, 0x4f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x0b, 0x67, 0x63, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, - 0x64, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x61, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5a, 0x6f, 0x6e, 0x65, 0x12, - 0x1b, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x12, 0x1f, 0x0a, 0x0b, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x42, 0x5e, 0x0a, - 0x17, 0x64, 0x65, 0x76, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x41, 0x77, 0x73, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x73, 0x52, 0x0a, 0x61, 0x77, 0x73, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, + 0x12, 0x54, 0x0a, 0x0d, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x6d, 0x75, + 0x6c, 0x74, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x56, 0x69, + 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x41, 0x7a, 0x75, 0x72, + 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x0c, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x4e, 0x0a, 0x0b, 0x67, 0x63, 0x70, 0x5f, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x47, 0x63, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x0a, 0x67, 0x63, 0x70, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x42, 0x5e, 0x0a, 0x17, 0x64, 0x65, 0x76, 0x2e, 0x6d, 0x75, + 0x6c, 0x74, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6d, 0x75, 0x6c, 0x74, 0x79, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x79, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1000,7 +1258,7 @@ func file_api_proto_resourcespb_virtual_machine_proto_rawDescGZIP() []byte { } var file_api_proto_resourcespb_virtual_machine_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_api_proto_resourcespb_virtual_machine_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_api_proto_resourcespb_virtual_machine_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_api_proto_resourcespb_virtual_machine_proto_goTypes = []interface{}{ (ImageReference_OperatingSystemDistribution)(0), // 0: dev.multy.resources.ImageReference.OperatingSystemDistribution (*ImageReference)(nil), // 1: dev.multy.resources.ImageReference @@ -1012,32 +1270,38 @@ var file_api_proto_resourcespb_virtual_machine_proto_goTypes = []interface{}{ (*VirtualMachineAzureOverride)(nil), // 7: dev.multy.resources.VirtualMachineAzureOverride (*VirtualMachineGcpOverride)(nil), // 8: dev.multy.resources.VirtualMachineGcpOverride (*VirtualMachineArgs)(nil), // 9: dev.multy.resources.VirtualMachineArgs - (*VirtualMachineResource)(nil), // 10: dev.multy.resources.VirtualMachineResource - (*commonpb.ResourceCommonArgs)(nil), // 11: dev.multy.common.ResourceCommonArgs - (commonpb.VmSize_Enum)(0), // 12: dev.multy.common.VmSize.Enum - (*commonpb.CommonResourceParameters)(nil), // 13: dev.multy.common.CommonResourceParameters + (*VirtualMachineAwsOutputs)(nil), // 10: dev.multy.resources.VirtualMachineAwsOutputs + (*VirtualMachineAzureOutputs)(nil), // 11: dev.multy.resources.VirtualMachineAzureOutputs + (*VirtualMachineGcpOutputs)(nil), // 12: dev.multy.resources.VirtualMachineGcpOutputs + (*VirtualMachineResource)(nil), // 13: dev.multy.resources.VirtualMachineResource + (*commonpb.ResourceCommonArgs)(nil), // 14: dev.multy.common.ResourceCommonArgs + (commonpb.VmSize_Enum)(0), // 15: dev.multy.common.VmSize.Enum + (*commonpb.CommonResourceParameters)(nil), // 16: dev.multy.common.CommonResourceParameters } var file_api_proto_resourcespb_virtual_machine_proto_depIdxs = []int32{ 0, // 0: dev.multy.resources.ImageReference.os:type_name -> dev.multy.resources.ImageReference.OperatingSystemDistribution 9, // 1: dev.multy.resources.CreateVirtualMachineRequest.resource:type_name -> dev.multy.resources.VirtualMachineArgs 9, // 2: dev.multy.resources.UpdateVirtualMachineRequest.resource:type_name -> dev.multy.resources.VirtualMachineArgs - 11, // 3: dev.multy.resources.VirtualMachineArgs.common_parameters:type_name -> dev.multy.common.ResourceCommonArgs - 12, // 4: dev.multy.resources.VirtualMachineArgs.vm_size:type_name -> dev.multy.common.VmSize.Enum + 14, // 3: dev.multy.resources.VirtualMachineArgs.common_parameters:type_name -> dev.multy.common.ResourceCommonArgs + 15, // 4: dev.multy.resources.VirtualMachineArgs.vm_size:type_name -> dev.multy.common.VmSize.Enum 1, // 5: dev.multy.resources.VirtualMachineArgs.image_reference:type_name -> dev.multy.resources.ImageReference 6, // 6: dev.multy.resources.VirtualMachineArgs.aws_override:type_name -> dev.multy.resources.VirtualMachineAwsOverride 7, // 7: dev.multy.resources.VirtualMachineArgs.azure_override:type_name -> dev.multy.resources.VirtualMachineAzureOverride 8, // 8: dev.multy.resources.VirtualMachineArgs.gcp_override:type_name -> dev.multy.resources.VirtualMachineGcpOverride - 13, // 9: dev.multy.resources.VirtualMachineResource.common_parameters:type_name -> dev.multy.common.CommonResourceParameters - 12, // 10: dev.multy.resources.VirtualMachineResource.vm_size:type_name -> dev.multy.common.VmSize.Enum + 16, // 9: dev.multy.resources.VirtualMachineResource.common_parameters:type_name -> dev.multy.common.CommonResourceParameters + 15, // 10: dev.multy.resources.VirtualMachineResource.vm_size:type_name -> dev.multy.common.VmSize.Enum 1, // 11: dev.multy.resources.VirtualMachineResource.image_reference:type_name -> dev.multy.resources.ImageReference 6, // 12: dev.multy.resources.VirtualMachineResource.aws_override:type_name -> dev.multy.resources.VirtualMachineAwsOverride 7, // 13: dev.multy.resources.VirtualMachineResource.azure_override:type_name -> dev.multy.resources.VirtualMachineAzureOverride 8, // 14: dev.multy.resources.VirtualMachineResource.gcp_override:type_name -> dev.multy.resources.VirtualMachineGcpOverride - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name + 10, // 15: dev.multy.resources.VirtualMachineResource.aws_outputs:type_name -> dev.multy.resources.VirtualMachineAwsOutputs + 11, // 16: dev.multy.resources.VirtualMachineResource.azure_outputs:type_name -> dev.multy.resources.VirtualMachineAzureOutputs + 12, // 17: dev.multy.resources.VirtualMachineResource.gcp_outputs:type_name -> dev.multy.resources.VirtualMachineGcpOutputs + 18, // [18:18] is the sub-list for method output_type + 18, // [18:18] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name } func init() { file_api_proto_resourcespb_virtual_machine_proto_init() } @@ -1155,6 +1419,42 @@ func file_api_proto_resourcespb_virtual_machine_proto_init() { } } file_api_proto_resourcespb_virtual_machine_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VirtualMachineAwsOutputs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_resourcespb_virtual_machine_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VirtualMachineAzureOutputs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_resourcespb_virtual_machine_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VirtualMachineGcpOutputs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_resourcespb_virtual_machine_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VirtualMachineResource); i { case 0: return &v.state @@ -1173,7 +1473,7 @@ func file_api_proto_resourcespb_virtual_machine_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_proto_resourcespb_virtual_machine_proto_rawDesc, NumEnums: 1, - NumMessages: 10, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/api/proto/resourcespb/virtual_machine.proto b/api/proto/resourcespb/virtual_machine.proto index 9bedec96..aa70ec40 100644 --- a/api/proto/resourcespb/virtual_machine.proto +++ b/api/proto/resourcespb/virtual_machine.proto @@ -69,6 +69,25 @@ message VirtualMachineArgs { int32 availability_zone = 16; } +message VirtualMachineAwsOutputs { + string ec2_instance_id = 1; + string iam_instance_profile_arn = 2; + string iam_role_arn = 3; + string key_pair_arn = 4; +} + +message VirtualMachineAzureOutputs { + string virtual_machine_id = 1; + string network_interface_id = 2; + string public_ip_id = 3; +} + + +message VirtualMachineGcpOutputs { + string compute_instance_id = 1; + string service_account_email = 2; +} + message VirtualMachineResource { common.CommonResourceParameters common_parameters = 1; string name = 2; @@ -89,4 +108,7 @@ message VirtualMachineResource { // outputs string public_ip = 12; string identity_id = 13; + VirtualMachineAwsOutputs aws_outputs = 19; + VirtualMachineAzureOutputs azure_outputs = 20; + VirtualMachineGcpOutputs gcp_outputs = 21; } diff --git a/resources/output/iam/aws_iam_role.go b/resources/output/iam/aws_iam_role.go index 5d4f575d..b75c4b8f 100644 --- a/resources/output/iam/aws_iam_role.go +++ b/resources/output/iam/aws_iam_role.go @@ -58,6 +58,8 @@ type AwsIamInstanceProfile struct { *common.AwsResource `hcl:",squash" default:"name=aws_iam_instance_profile"` Name string `hcl:"name"` Role string `hcl:"role,expr"` + + Arn string `json:"arn" hcle:"omitempty"` } func NewAssumeRolePolicy(services ...string) string { diff --git a/resources/output/virtual_machine/aws_virtual_machine.go b/resources/output/virtual_machine/aws_virtual_machine.go index 5f6a5488..5eb2dbff 100644 --- a/resources/output/virtual_machine/aws_virtual_machine.go +++ b/resources/output/virtual_machine/aws_virtual_machine.go @@ -36,6 +36,8 @@ type AwsKeyPair struct { *common.AwsResource `hcl:",squash" default:"name=aws_key_pair"` KeyName string `hcl:"key_name"` PublicKey string `hcl:"public_key"` + + Arn string `json:"arn" hcle:"omitempty"` } type AwsAmi struct { diff --git a/resources/types/aws/virtual_machine.go b/resources/types/aws/virtual_machine.go index 6ca1c010..2bfacb57 100644 --- a/resources/types/aws/virtual_machine.go +++ b/resources/types/aws/virtual_machine.go @@ -24,35 +24,12 @@ func InitVirtualMachine(vn *types.VirtualMachine) resources.ResourceTranslator[* } func (r AwsVirtualMachine) FromState(state *output.TfState) (*resourcespb.VirtualMachineResource, error) { - var ip string - identityId := "dryrun" - if r.Args.GeneratePublicIp { - ip = "dryrun" - } - - if !flags.DryRun { - if r.Args.GeneratePublicIp { - vmResource, err := output.GetParsedById[virtual_machine.AwsEC2](state, r.ResourceId) - if err != nil { - return nil, err - } - ip = vmResource.PublicIp - } - - iamRoleResource, err := output.GetParsedById[iam.AwsIamRole](state, r.ResourceId) - if err != nil { - return nil, err - } - identityId = iamRoleResource.Id - } - - return &resourcespb.VirtualMachineResource{ + out := &resourcespb.VirtualMachineResource{ CommonParameters: &commonpb.CommonResourceParameters{ ResourceId: r.ResourceId, ResourceGroupId: r.Args.CommonParameters.ResourceGroupId, Location: r.Args.CommonParameters.Location, CloudProvider: r.Args.CommonParameters.CloudProvider, - NeedsUpdate: false, }, Name: r.Args.Name, NetworkInterfaceIds: r.Args.NetworkInterfaceIds, @@ -67,10 +44,47 @@ func (r AwsVirtualMachine) FromState(state *output.TfState) (*resourcespb.Virtua AwsOverride: r.Args.AwsOverride, AzureOverride: r.Args.AzureOverride, GcpOverride: r.Args.GcpOverride, - PublicIp: ip, - IdentityId: identityId, AvailabilityZone: r.Args.AvailabilityZone, - }, nil + IdentityId: "dryrun", + } + + if flags.DryRun { + return out, nil + } + + vmResource, err := output.GetParsedById[virtual_machine.AwsEC2](state, r.ResourceId) + if err != nil { + return nil, err + } + out.AwsOutputs = &resourcespb.VirtualMachineAwsOutputs{ + Ec2InstanceId: vmResource.ResourceId, + } + + if r.Args.GeneratePublicIp { + out.PublicIp = vmResource.PublicIp + } + + iamRoleResource, err := output.GetParsedById[iam.AwsIamRole](state, r.ResourceId) + if err != nil { + return nil, err + } + out.IdentityId = iamRoleResource.Id + out.AwsOutputs.IamRoleArn = iamRoleResource.Arn + + iamInstanceProfileResource, err := output.GetParsedById[iam.AwsIamInstanceProfile](state, r.ResourceId) + if err != nil { + return nil, err + } + out.AwsOutputs.IamInstanceProfileArn = iamInstanceProfileResource.Arn + + if stateResource, exists, err := output.MaybeGetParsedById[virtual_machine.AwsKeyPair](state, r.ResourceId); exists { + if err != nil { + return nil, err + } + out.AwsOutputs.KeyPairArn = stateResource.Arn + } + + return out, nil } type AwsCallerIdentityData struct { diff --git a/resources/types/azure/virtual_machine.go b/resources/types/azure/virtual_machine.go index b64fae5d..ffc1530e 100644 --- a/resources/types/azure/virtual_machine.go +++ b/resources/types/azure/virtual_machine.go @@ -27,34 +27,12 @@ func InitVirtualMachine(vn *types.VirtualMachine) resources.ResourceTranslator[* } func (r AzureVirtualMachine) FromState(state *output.TfState) (*resourcespb.VirtualMachineResource, error) { - var ip string - identityId := "dryrun" - if r.Args.GeneratePublicIp { - ip = "dryrun" - } - - if !flags.DryRun { - if r.Args.GeneratePublicIp { - ipResource, err := output.GetParsedById[public_ip.AzurePublicIp](state, r.ResourceId) - if err != nil { - return nil, err - } - ip = ipResource.IpAddress - } - vmResource, err := output.GetParsedById[virtual_machine.AzureVirtualMachine](state, r.ResourceId) - if err != nil { - return nil, err - } - identityId = vmResource.Identities[0].PrincipalId - } - - return &resourcespb.VirtualMachineResource{ + out := &resourcespb.VirtualMachineResource{ CommonParameters: &commonpb.CommonResourceParameters{ ResourceId: r.ResourceId, ResourceGroupId: r.Args.CommonParameters.ResourceGroupId, Location: r.Args.CommonParameters.Location, CloudProvider: r.Args.CommonParameters.CloudProvider, - NeedsUpdate: false, }, Name: r.Args.Name, NetworkInterfaceIds: r.Args.NetworkInterfaceIds, @@ -70,9 +48,40 @@ func (r AzureVirtualMachine) FromState(state *output.TfState) (*resourcespb.Virt AzureOverride: r.Args.AzureOverride, GcpOverride: r.Args.GcpOverride, AvailabilityZone: r.Args.AvailabilityZone, - PublicIp: ip, - IdentityId: identityId, - }, nil + IdentityId: "dryrun", + } + + if flags.DryRun { + return out, nil + } + + vmResource, err := output.GetParsedById[virtual_machine.AzureVirtualMachine](state, r.ResourceId) + if err != nil { + return nil, err + } + out.IdentityId = vmResource.Identities[0].PrincipalId + + out.AzureOutputs = &resourcespb.VirtualMachineAzureOutputs{ + VirtualMachineId: vmResource.ResourceId, + } + + if r.Args.GeneratePublicIp { + ipResource, err := output.GetParsedById[public_ip.AzurePublicIp](state, r.ResourceId) + if err != nil { + return nil, err + } + out.PublicIp = ipResource.IpAddress + out.AzureOutputs.PublicIpId = ipResource.ResourceId + } + + if stateResource, exists, err := output.MaybeGetParsedById[network_interface.AzureNetworkInterface](state, r.ResourceId); exists { + if err != nil { + return nil, err + } + out.AzureOutputs.NetworkInterfaceId = stateResource.ResourceId + } + + return out, nil } func (r AzureVirtualMachine) Translate(resources.MultyContext) ([]output.TfBlock, error) { diff --git a/resources/types/gcp/virtual_machine.go b/resources/types/gcp/virtual_machine.go index 7bd4ea2e..017f7575 100644 --- a/resources/types/gcp/virtual_machine.go +++ b/resources/types/gcp/virtual_machine.go @@ -49,23 +49,31 @@ func (r GcpVirtualMachine) FromState(state *output.TfState) (*resourcespb.Virtua AzureOverride: r.Args.AzureOverride, GcpOverride: r.Args.GcpOverride, AvailabilityZone: r.Args.AvailabilityZone, + IdentityId: "dryrun", } - if !flags.DryRun { - vm, err := output.GetParsedById[virtual_machine.GoogleComputeInstance](state, r.ResourceId) - if err != nil { - return nil, err - } + if flags.DryRun { + return out, nil + } - if r.Args.GeneratePublicIp { - out.PublicIp = vm.NetworkInterface[0].AccessConfig[0].NatIp - } + vm, err := output.GetParsedById[virtual_machine.GoogleComputeInstance](state, r.ResourceId) + if err != nil { + return nil, err + } - sa, err := output.GetParsedById[iam.GoogleServiceAccount](state, r.ResourceId) - if err != nil { - return nil, err - } - out.IdentityId = sa.Email + if r.Args.GeneratePublicIp { + out.PublicIp = vm.NetworkInterface[0].AccessConfig[0].NatIp + } + + sa, err := output.GetParsedById[iam.GoogleServiceAccount](state, r.ResourceId) + if err != nil { + return nil, err + } + out.IdentityId = sa.Email + + out.GcpOutputs = &resourcespb.VirtualMachineGcpOutputs{ + ComputeInstanceId: vm.SelfLink, + ServiceAccountEmail: sa.Email, } return out, nil