diff --git a/backend/protos/xyz/block/ftl/v1beta1/provisioner/resource.pb.go b/backend/protos/xyz/block/ftl/v1beta1/provisioner/resource.pb.go index 6a53552d0b..ce2427a9ff 100644 --- a/backend/protos/xyz/block/ftl/v1beta1/provisioner/resource.pb.go +++ b/backend/protos/xyz/block/ftl/v1beta1/provisioner/resource.pb.go @@ -116,9 +116,7 @@ type PostgresResource struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // fields populated after the resource has been created - OutReadEndpoint string `protobuf:"bytes,101,opt,name=out_read_endpoint,json=outReadEndpoint,proto3" json:"out_read_endpoint,omitempty"` - OutWriteEndpoint string `protobuf:"bytes,102,opt,name=out_write_endpoint,json=outWriteEndpoint,proto3" json:"out_write_endpoint,omitempty"` + Output *PostgresResource_PostgresResourceOutput `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` } func (x *PostgresResource) Reset() { @@ -153,18 +151,11 @@ func (*PostgresResource) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1beta1_provisioner_resource_proto_rawDescGZIP(), []int{1} } -func (x *PostgresResource) GetOutReadEndpoint() string { +func (x *PostgresResource) GetOutput() *PostgresResource_PostgresResourceOutput { if x != nil { - return x.OutReadEndpoint + return x.Output } - return "" -} - -func (x *PostgresResource) GetOutWriteEndpoint() string { - if x != nil { - return x.OutWriteEndpoint - } - return "" + return nil } type MysqlResource struct { @@ -172,9 +163,7 @@ type MysqlResource struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // fields populated after the resource has been created - OutReadEndpoint string `protobuf:"bytes,101,opt,name=out_read_endpoint,json=outReadEndpoint,proto3" json:"out_read_endpoint,omitempty"` - OutWriteEndpoint string `protobuf:"bytes,102,opt,name=out_write_endpoint,json=outWriteEndpoint,proto3" json:"out_write_endpoint,omitempty"` + Output *MysqlResource_MysqlResourceOutput `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` } func (x *MysqlResource) Reset() { @@ -209,16 +198,119 @@ func (*MysqlResource) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1beta1_provisioner_resource_proto_rawDescGZIP(), []int{2} } -func (x *MysqlResource) GetOutReadEndpoint() string { +func (x *MysqlResource) GetOutput() *MysqlResource_MysqlResourceOutput { + if x != nil { + return x.Output + } + return nil +} + +type PostgresResource_PostgresResourceOutput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReadEndpoint string `protobuf:"bytes,1,opt,name=read_endpoint,json=readEndpoint,proto3" json:"read_endpoint,omitempty"` + WriteEndpoint string `protobuf:"bytes,2,opt,name=write_endpoint,json=writeEndpoint,proto3" json:"write_endpoint,omitempty"` +} + +func (x *PostgresResource_PostgresResourceOutput) Reset() { + *x = PostgresResource_PostgresResourceOutput{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1beta1_provisioner_resource_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostgresResource_PostgresResourceOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostgresResource_PostgresResourceOutput) ProtoMessage() {} + +func (x *PostgresResource_PostgresResourceOutput) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1beta1_provisioner_resource_proto_msgTypes[3] + 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 PostgresResource_PostgresResourceOutput.ProtoReflect.Descriptor instead. +func (*PostgresResource_PostgresResourceOutput) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1beta1_provisioner_resource_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *PostgresResource_PostgresResourceOutput) GetReadEndpoint() string { if x != nil { - return x.OutReadEndpoint + return x.ReadEndpoint } return "" } -func (x *MysqlResource) GetOutWriteEndpoint() string { +func (x *PostgresResource_PostgresResourceOutput) GetWriteEndpoint() string { if x != nil { - return x.OutWriteEndpoint + return x.WriteEndpoint + } + return "" +} + +type MysqlResource_MysqlResourceOutput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReadEndpoint string `protobuf:"bytes,1,opt,name=read_endpoint,json=readEndpoint,proto3" json:"read_endpoint,omitempty"` + WriteEndpoint string `protobuf:"bytes,2,opt,name=write_endpoint,json=writeEndpoint,proto3" json:"write_endpoint,omitempty"` +} + +func (x *MysqlResource_MysqlResourceOutput) Reset() { + *x = MysqlResource_MysqlResourceOutput{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1beta1_provisioner_resource_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MysqlResource_MysqlResourceOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MysqlResource_MysqlResourceOutput) ProtoMessage() {} + +func (x *MysqlResource_MysqlResourceOutput) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1beta1_provisioner_resource_proto_msgTypes[4] + 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 MysqlResource_MysqlResourceOutput.ProtoReflect.Descriptor instead. +func (*MysqlResource_MysqlResourceOutput) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1beta1_provisioner_resource_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *MysqlResource_MysqlResourceOutput) GetReadEndpoint() string { + if x != nil { + return x.ReadEndpoint + } + return "" +} + +func (x *MysqlResource_MysqlResourceOutput) GetWriteEndpoint() string { + if x != nil { + return x.WriteEndpoint } return "" } @@ -244,27 +336,41 @@ var file_xyz_block_ftl_v1beta1_provisioner_resource_proto_rawDesc = []byte{ 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, - 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x6c, 0x0a, 0x10, - 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x65, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x75, 0x74, - 0x52, 0x65, 0x61, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x12, - 0x6f, 0x75, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x18, 0x66, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x57, 0x72, 0x69, - 0x74, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x69, 0x0a, 0x0d, 0x4d, 0x79, - 0x73, 0x71, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6f, - 0x75, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x18, 0x65, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x61, 0x64, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x75, 0x74, 0x5f, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x66, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x5b, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x42, 0x44, 0x35, 0x34, 0x35, 0x36, 0x36, 0x39, 0x37, - 0x35, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x78, 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, - 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x3b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xdc, 0x01, 0x0a, + 0x10, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x62, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x4a, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x06, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x1a, 0x64, 0x0a, 0x16, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x61, 0x64, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0xd0, 0x01, 0x0a, 0x0d, + 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x5c, 0x0a, + 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, + 0x72, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, + 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x1a, 0x61, 0x0a, 0x13, 0x4d, + 0x79, 0x73, 0x71, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x61, 0x64, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x5b, + 0x50, 0x01, 0x5a, 0x57, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, + 0x42, 0x44, 0x35, 0x34, 0x35, 0x36, 0x36, 0x39, 0x37, 0x35, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x78, 0x79, + 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x3b, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -279,20 +385,24 @@ func file_xyz_block_ftl_v1beta1_provisioner_resource_proto_rawDescGZIP() []byte return file_xyz_block_ftl_v1beta1_provisioner_resource_proto_rawDescData } -var file_xyz_block_ftl_v1beta1_provisioner_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_xyz_block_ftl_v1beta1_provisioner_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_xyz_block_ftl_v1beta1_provisioner_resource_proto_goTypes = []any{ - (*Resource)(nil), // 0: xyz.block.ftl.v1beta1.provisioner.Resource - (*PostgresResource)(nil), // 1: xyz.block.ftl.v1beta1.provisioner.PostgresResource - (*MysqlResource)(nil), // 2: xyz.block.ftl.v1beta1.provisioner.MysqlResource + (*Resource)(nil), // 0: xyz.block.ftl.v1beta1.provisioner.Resource + (*PostgresResource)(nil), // 1: xyz.block.ftl.v1beta1.provisioner.PostgresResource + (*MysqlResource)(nil), // 2: xyz.block.ftl.v1beta1.provisioner.MysqlResource + (*PostgresResource_PostgresResourceOutput)(nil), // 3: xyz.block.ftl.v1beta1.provisioner.PostgresResource.PostgresResourceOutput + (*MysqlResource_MysqlResourceOutput)(nil), // 4: xyz.block.ftl.v1beta1.provisioner.MysqlResource.MysqlResourceOutput } var file_xyz_block_ftl_v1beta1_provisioner_resource_proto_depIdxs = []int32{ 1, // 0: xyz.block.ftl.v1beta1.provisioner.Resource.postgres:type_name -> xyz.block.ftl.v1beta1.provisioner.PostgresResource 2, // 1: xyz.block.ftl.v1beta1.provisioner.Resource.mysql:type_name -> xyz.block.ftl.v1beta1.provisioner.MysqlResource - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 3, // 2: xyz.block.ftl.v1beta1.provisioner.PostgresResource.output:type_name -> xyz.block.ftl.v1beta1.provisioner.PostgresResource.PostgresResourceOutput + 4, // 3: xyz.block.ftl.v1beta1.provisioner.MysqlResource.output:type_name -> xyz.block.ftl.v1beta1.provisioner.MysqlResource.MysqlResourceOutput + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_xyz_block_ftl_v1beta1_provisioner_resource_proto_init() } @@ -337,6 +447,30 @@ func file_xyz_block_ftl_v1beta1_provisioner_resource_proto_init() { return nil } } + file_xyz_block_ftl_v1beta1_provisioner_resource_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*PostgresResource_PostgresResourceOutput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1beta1_provisioner_resource_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*MysqlResource_MysqlResourceOutput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_xyz_block_ftl_v1beta1_provisioner_resource_proto_msgTypes[0].OneofWrappers = []any{ (*Resource_Postgres)(nil), @@ -348,7 +482,7 @@ func file_xyz_block_ftl_v1beta1_provisioner_resource_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_xyz_block_ftl_v1beta1_provisioner_resource_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/backend/protos/xyz/block/ftl/v1beta1/provisioner/resource.proto b/backend/protos/xyz/block/ftl/v1beta1/provisioner/resource.proto index 58cc1d6c30..2738ad4edc 100644 --- a/backend/protos/xyz/block/ftl/v1beta1/provisioner/resource.proto +++ b/backend/protos/xyz/block/ftl/v1beta1/provisioner/resource.proto @@ -18,17 +18,20 @@ message Resource { // Resource types // -// we use convention of prefixing field names with out_ if they are populated -// after being provisioned by the provisioning engine +// any output created by the provisioner is stored in a field called "output" message PostgresResource { - // fields populated after the resource has been created - string out_read_endpoint = 101; - string out_write_endpoint = 102; + message PostgresResourceOutput { + string read_endpoint = 1; + string write_endpoint = 2; + } + PostgresResourceOutput output = 1; } message MysqlResource { - // fields populated after the resource has been created - string out_read_endpoint = 101; - string out_write_endpoint = 102; + message MysqlResourceOutput { + string read_endpoint = 1; + string write_endpoint = 2; + } + MysqlResourceOutput output = 1; } diff --git a/cmd/ftl-provisioner-cloudformation/status.go b/cmd/ftl-provisioner-cloudformation/status.go index 0adb8d5f51..bbf9f97e55 100644 --- a/cmd/ftl-provisioner-cloudformation/status.go +++ b/cmd/ftl-provisioner-cloudformation/status.go @@ -103,16 +103,16 @@ func updateResources(outputs []types.Output, update []*provisioner.Resource) err if postgres, ok := resource.Resource.(*provisioner.Resource_Postgres); ok { switch key.PropertyName { case PropertyDBReadEndpoint: - postgres.Postgres.OutReadEndpoint = *output.OutputValue + postgres.Postgres.Output.ReadEndpoint = *output.OutputValue case PropertyDBWriteEndpoint: - postgres.Postgres.OutWriteEndpoint = *output.OutputValue + postgres.Postgres.Output.WriteEndpoint = *output.OutputValue } } else if mysql, ok := resource.Resource.(*provisioner.Resource_Mysql); ok { switch key.PropertyName { case PropertyDBReadEndpoint: - mysql.Mysql.OutReadEndpoint = *output.OutputValue + mysql.Mysql.Output.ReadEndpoint = *output.OutputValue case PropertyDBWriteEndpoint: - mysql.Mysql.OutWriteEndpoint = *output.OutputValue + mysql.Mysql.Output.WriteEndpoint = *output.OutputValue } } } diff --git a/frontend/console/src/protos/xyz/block/ftl/v1beta1/provisioner/resource_pb.ts b/frontend/console/src/protos/xyz/block/ftl/v1beta1/provisioner/resource_pb.ts index 7d4e064505..d4f46eb1b7 100644 --- a/frontend/console/src/protos/xyz/block/ftl/v1beta1/provisioner/resource_pb.ts +++ b/frontend/console/src/protos/xyz/block/ftl/v1beta1/provisioner/resource_pb.ts @@ -71,16 +71,9 @@ export class Resource extends Message { */ export class PostgresResource extends Message { /** - * fields populated after the resource has been created - * - * @generated from field: string out_read_endpoint = 101; - */ - outReadEndpoint = ""; - - /** - * @generated from field: string out_write_endpoint = 102; + * @generated from field: xyz.block.ftl.v1beta1.provisioner.PostgresResource.PostgresResourceOutput output = 1; */ - outWriteEndpoint = ""; + output?: PostgresResource_PostgresResourceOutput; constructor(data?: PartialMessage) { super(); @@ -90,8 +83,7 @@ export class PostgresResource extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "xyz.block.ftl.v1beta1.provisioner.PostgresResource"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 101, name: "out_read_endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 102, name: "out_write_endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "output", kind: "message", T: PostgresResource_PostgresResourceOutput }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): PostgresResource { @@ -112,20 +104,56 @@ export class PostgresResource extends Message { } /** - * @generated from message xyz.block.ftl.v1beta1.provisioner.MysqlResource + * @generated from message xyz.block.ftl.v1beta1.provisioner.PostgresResource.PostgresResourceOutput */ -export class MysqlResource extends Message { +export class PostgresResource_PostgresResourceOutput extends Message { /** - * fields populated after the resource has been created - * - * @generated from field: string out_read_endpoint = 101; + * @generated from field: string read_endpoint = 1; */ - outReadEndpoint = ""; + readEndpoint = ""; + + /** + * @generated from field: string write_endpoint = 2; + */ + writeEndpoint = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1beta1.provisioner.PostgresResource.PostgresResourceOutput"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "read_endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "write_endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PostgresResource_PostgresResourceOutput { + return new PostgresResource_PostgresResourceOutput().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PostgresResource_PostgresResourceOutput { + return new PostgresResource_PostgresResourceOutput().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PostgresResource_PostgresResourceOutput { + return new PostgresResource_PostgresResourceOutput().fromJsonString(jsonString, options); + } + + static equals(a: PostgresResource_PostgresResourceOutput | PlainMessage | undefined, b: PostgresResource_PostgresResourceOutput | PlainMessage | undefined): boolean { + return proto3.util.equals(PostgresResource_PostgresResourceOutput, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1beta1.provisioner.MysqlResource + */ +export class MysqlResource extends Message { /** - * @generated from field: string out_write_endpoint = 102; + * @generated from field: xyz.block.ftl.v1beta1.provisioner.MysqlResource.MysqlResourceOutput output = 1; */ - outWriteEndpoint = ""; + output?: MysqlResource_MysqlResourceOutput; constructor(data?: PartialMessage) { super(); @@ -135,8 +163,7 @@ export class MysqlResource extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "xyz.block.ftl.v1beta1.provisioner.MysqlResource"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 101, name: "out_read_endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 102, name: "out_write_endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "output", kind: "message", T: MysqlResource_MysqlResourceOutput }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): MysqlResource { @@ -156,3 +183,46 @@ export class MysqlResource extends Message { } } +/** + * @generated from message xyz.block.ftl.v1beta1.provisioner.MysqlResource.MysqlResourceOutput + */ +export class MysqlResource_MysqlResourceOutput extends Message { + /** + * @generated from field: string read_endpoint = 1; + */ + readEndpoint = ""; + + /** + * @generated from field: string write_endpoint = 2; + */ + writeEndpoint = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1beta1.provisioner.MysqlResource.MysqlResourceOutput"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "read_endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "write_endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MysqlResource_MysqlResourceOutput { + return new MysqlResource_MysqlResourceOutput().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MysqlResource_MysqlResourceOutput { + return new MysqlResource_MysqlResourceOutput().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MysqlResource_MysqlResourceOutput { + return new MysqlResource_MysqlResourceOutput().fromJsonString(jsonString, options); + } + + static equals(a: MysqlResource_MysqlResourceOutput | PlainMessage | undefined, b: MysqlResource_MysqlResourceOutput | PlainMessage | undefined): boolean { + return proto3.util.equals(MysqlResource_MysqlResourceOutput, a, b); + } +} +