@@ -1384,6 +1384,10 @@ type InstanceConf struct {
13841384 // latency and more throughput by removing node boundaries. It is optional,
13851385 // with the default being 1X.
13861386 NodeScalingFactor NodeScalingFactor
1387+
1388+ // Tags maps TagKey resource names (e.g., "tagKeys/123") to TagValue
1389+ // resource names (e.g., "tagValues/456") to be associated with the instance.
1390+ Tags map [string ]string
13871391}
13881392
13891393// InstanceWithClustersConfig contains the information necessary to create an Instance
@@ -1392,6 +1396,9 @@ type InstanceWithClustersConfig struct {
13921396 Clusters []ClusterConfig
13931397 InstanceType InstanceType
13941398 Labels map [string ]string
1399+ // Tags maps TagKey resource names (e.g., "tagKeys/123") to TagValue
1400+ // resource names (e.g., "tagValues/456") to be associated with the instance.
1401+ Tags map [string ]string
13951402}
13961403
13971404var instanceNameRegexp = regexp .MustCompile (`^projects/([^/]+)/instances/([a-z][-a-z0-9]*)$` )
@@ -1405,6 +1412,7 @@ func (iac *InstanceAdminClient) CreateInstance(ctx context.Context, conf *Instan
14051412 DisplayName : conf .DisplayName ,
14061413 InstanceType : conf .InstanceType ,
14071414 Labels : conf .Labels ,
1415+ Tags : conf .Tags ,
14081416 Clusters : []ClusterConfig {
14091417 {
14101418 InstanceID : conf .InstanceId ,
@@ -1436,6 +1444,7 @@ func (iac *InstanceAdminClient) CreateInstanceWithClusters(ctx context.Context,
14361444 DisplayName : conf .DisplayName ,
14371445 Type : btapb .Instance_Type (conf .InstanceType ),
14381446 Labels : conf .Labels ,
1447+ Tags : conf .Tags ,
14391448 },
14401449 Clusters : clusters ,
14411450 }
0 commit comments