github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/docdb/globalCluster.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package docdb 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Manages an DocumentDB Global Cluster. A global cluster consists of one primary region and up to five read-only secondary regions. You issue write operations directly to the primary cluster in the primary region and Amazon DocumentDB automatically replicates the data to the secondary regions using dedicated infrastructure. 16 // 17 // More information about DocumentDB Global Clusters can be found in the [DocumentDB Developer Guide](https://docs.aws.amazon.com/documentdb/latest/developerguide/global-clusters.html). 18 // 19 // ## Example Usage 20 // 21 // ### New DocumentDB Global Cluster 22 // 23 // <!--Start PulumiCodeChooser --> 24 // ```go 25 // package main 26 // 27 // import ( 28 // 29 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/docdb" 30 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 31 // 32 // ) 33 // 34 // func main() { 35 // pulumi.Run(func(ctx *pulumi.Context) error { 36 // example, err := docdb.NewGlobalCluster(ctx, "example", &docdb.GlobalClusterArgs{ 37 // GlobalClusterIdentifier: pulumi.String("global-test"), 38 // Engine: pulumi.String("docdb"), 39 // EngineVersion: pulumi.String("4.0.0"), 40 // }) 41 // if err != nil { 42 // return err 43 // } 44 // primary, err := docdb.NewCluster(ctx, "primary", &docdb.ClusterArgs{ 45 // Engine: example.Engine, 46 // EngineVersion: example.EngineVersion, 47 // ClusterIdentifier: pulumi.String("test-primary-cluster"), 48 // MasterUsername: pulumi.String("username"), 49 // MasterPassword: pulumi.String("somepass123"), 50 // GlobalClusterIdentifier: example.ID(), 51 // DbSubnetGroupName: pulumi.String("default"), 52 // }) 53 // if err != nil { 54 // return err 55 // } 56 // primaryClusterInstance, err := docdb.NewClusterInstance(ctx, "primary", &docdb.ClusterInstanceArgs{ 57 // Engine: example.Engine, 58 // Identifier: pulumi.String("test-primary-cluster-instance"), 59 // ClusterIdentifier: primary.ID(), 60 // InstanceClass: pulumi.String("db.r5.large"), 61 // }) 62 // if err != nil { 63 // return err 64 // } 65 // secondary, err := docdb.NewCluster(ctx, "secondary", &docdb.ClusterArgs{ 66 // Engine: example.Engine, 67 // EngineVersion: example.EngineVersion, 68 // ClusterIdentifier: pulumi.String("test-secondary-cluster"), 69 // GlobalClusterIdentifier: example.ID(), 70 // DbSubnetGroupName: pulumi.String("default"), 71 // }, pulumi.DependsOn([]pulumi.Resource{ 72 // primary, 73 // })) 74 // if err != nil { 75 // return err 76 // } 77 // _, err = docdb.NewClusterInstance(ctx, "secondary", &docdb.ClusterInstanceArgs{ 78 // Engine: example.Engine, 79 // Identifier: pulumi.String("test-secondary-cluster-instance"), 80 // ClusterIdentifier: secondary.ID(), 81 // InstanceClass: pulumi.String("db.r5.large"), 82 // }, pulumi.DependsOn([]pulumi.Resource{ 83 // primaryClusterInstance, 84 // })) 85 // if err != nil { 86 // return err 87 // } 88 // return nil 89 // }) 90 // } 91 // 92 // ``` 93 // <!--End PulumiCodeChooser --> 94 // 95 // ### New Global Cluster From Existing DB Cluster 96 // 97 // <!--Start PulumiCodeChooser --> 98 // ```go 99 // package main 100 // 101 // import ( 102 // 103 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/docdb" 104 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 105 // 106 // ) 107 // 108 // func main() { 109 // pulumi.Run(func(ctx *pulumi.Context) error { 110 // example, err := docdb.NewCluster(ctx, "example", nil) 111 // if err != nil { 112 // return err 113 // } 114 // _, err = docdb.NewGlobalCluster(ctx, "example", &docdb.GlobalClusterArgs{ 115 // GlobalClusterIdentifier: pulumi.String("example"), 116 // SourceDbClusterIdentifier: example.Arn, 117 // }) 118 // if err != nil { 119 // return err 120 // } 121 // return nil 122 // }) 123 // } 124 // 125 // ``` 126 // <!--End PulumiCodeChooser --> 127 // 128 // ## Import 129 // 130 // Using `pulumi import`, import `aws_docdb_global_cluster` using the Global Cluster identifier. For example: 131 // 132 // ```sh 133 // $ pulumi import aws:docdb/globalCluster:GlobalCluster example example 134 // ``` 135 // Certain resource arguments, like `source_db_cluster_identifier`, do not have an API method for reading the information after creation. If the argument is set in the Pulumi program on an imported resource, Pulumi will always show a difference. To workaround this behavior, either omit the argument from the Pulumi program or use `ignore_changes` to hide the difference. For example: 136 type GlobalCluster struct { 137 pulumi.CustomResourceState 138 139 // Global Cluster Amazon Resource Name (ARN) 140 Arn pulumi.StringOutput `pulumi:"arn"` 141 // Name for an automatically created database on cluster creation. 142 DatabaseName pulumi.StringPtrOutput `pulumi:"databaseName"` 143 // If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to `true`. The default is `false`. 144 DeletionProtection pulumi.BoolPtrOutput `pulumi:"deletionProtection"` 145 // Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Current Valid values: `docdb`. Defaults to `docdb`. Conflicts with `sourceDbClusterIdentifier`. 146 Engine pulumi.StringOutput `pulumi:"engine"` 147 // Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will. 148 // * **NOTE:** Upgrading major versions is not supported. 149 EngineVersion pulumi.StringOutput `pulumi:"engineVersion"` 150 // The global cluster identifier. 151 GlobalClusterIdentifier pulumi.StringOutput `pulumi:"globalClusterIdentifier"` 152 // Set of objects containing Global Cluster members. 153 GlobalClusterMembers GlobalClusterGlobalClusterMemberArrayOutput `pulumi:"globalClusterMembers"` 154 // AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed. 155 GlobalClusterResourceId pulumi.StringOutput `pulumi:"globalClusterResourceId"` 156 // Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value. 157 SourceDbClusterIdentifier pulumi.StringOutput `pulumi:"sourceDbClusterIdentifier"` 158 Status pulumi.StringOutput `pulumi:"status"` 159 // Specifies whether the DB cluster is encrypted. The default is `false` unless `sourceDbClusterIdentifier` is specified and encrypted. The provider will only perform drift detection if a configuration value is provided. 160 StorageEncrypted pulumi.BoolOutput `pulumi:"storageEncrypted"` 161 } 162 163 // NewGlobalCluster registers a new resource with the given unique name, arguments, and options. 164 func NewGlobalCluster(ctx *pulumi.Context, 165 name string, args *GlobalClusterArgs, opts ...pulumi.ResourceOption) (*GlobalCluster, error) { 166 if args == nil { 167 return nil, errors.New("missing one or more required arguments") 168 } 169 170 if args.GlobalClusterIdentifier == nil { 171 return nil, errors.New("invalid value for required argument 'GlobalClusterIdentifier'") 172 } 173 opts = internal.PkgResourceDefaultOpts(opts) 174 var resource GlobalCluster 175 err := ctx.RegisterResource("aws:docdb/globalCluster:GlobalCluster", name, args, &resource, opts...) 176 if err != nil { 177 return nil, err 178 } 179 return &resource, nil 180 } 181 182 // GetGlobalCluster gets an existing GlobalCluster resource's state with the given name, ID, and optional 183 // state properties that are used to uniquely qualify the lookup (nil if not required). 184 func GetGlobalCluster(ctx *pulumi.Context, 185 name string, id pulumi.IDInput, state *GlobalClusterState, opts ...pulumi.ResourceOption) (*GlobalCluster, error) { 186 var resource GlobalCluster 187 err := ctx.ReadResource("aws:docdb/globalCluster:GlobalCluster", name, id, state, &resource, opts...) 188 if err != nil { 189 return nil, err 190 } 191 return &resource, nil 192 } 193 194 // Input properties used for looking up and filtering GlobalCluster resources. 195 type globalClusterState struct { 196 // Global Cluster Amazon Resource Name (ARN) 197 Arn *string `pulumi:"arn"` 198 // Name for an automatically created database on cluster creation. 199 DatabaseName *string `pulumi:"databaseName"` 200 // If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to `true`. The default is `false`. 201 DeletionProtection *bool `pulumi:"deletionProtection"` 202 // Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Current Valid values: `docdb`. Defaults to `docdb`. Conflicts with `sourceDbClusterIdentifier`. 203 Engine *string `pulumi:"engine"` 204 // Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will. 205 // * **NOTE:** Upgrading major versions is not supported. 206 EngineVersion *string `pulumi:"engineVersion"` 207 // The global cluster identifier. 208 GlobalClusterIdentifier *string `pulumi:"globalClusterIdentifier"` 209 // Set of objects containing Global Cluster members. 210 GlobalClusterMembers []GlobalClusterGlobalClusterMember `pulumi:"globalClusterMembers"` 211 // AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed. 212 GlobalClusterResourceId *string `pulumi:"globalClusterResourceId"` 213 // Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value. 214 SourceDbClusterIdentifier *string `pulumi:"sourceDbClusterIdentifier"` 215 Status *string `pulumi:"status"` 216 // Specifies whether the DB cluster is encrypted. The default is `false` unless `sourceDbClusterIdentifier` is specified and encrypted. The provider will only perform drift detection if a configuration value is provided. 217 StorageEncrypted *bool `pulumi:"storageEncrypted"` 218 } 219 220 type GlobalClusterState struct { 221 // Global Cluster Amazon Resource Name (ARN) 222 Arn pulumi.StringPtrInput 223 // Name for an automatically created database on cluster creation. 224 DatabaseName pulumi.StringPtrInput 225 // If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to `true`. The default is `false`. 226 DeletionProtection pulumi.BoolPtrInput 227 // Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Current Valid values: `docdb`. Defaults to `docdb`. Conflicts with `sourceDbClusterIdentifier`. 228 Engine pulumi.StringPtrInput 229 // Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will. 230 // * **NOTE:** Upgrading major versions is not supported. 231 EngineVersion pulumi.StringPtrInput 232 // The global cluster identifier. 233 GlobalClusterIdentifier pulumi.StringPtrInput 234 // Set of objects containing Global Cluster members. 235 GlobalClusterMembers GlobalClusterGlobalClusterMemberArrayInput 236 // AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed. 237 GlobalClusterResourceId pulumi.StringPtrInput 238 // Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value. 239 SourceDbClusterIdentifier pulumi.StringPtrInput 240 Status pulumi.StringPtrInput 241 // Specifies whether the DB cluster is encrypted. The default is `false` unless `sourceDbClusterIdentifier` is specified and encrypted. The provider will only perform drift detection if a configuration value is provided. 242 StorageEncrypted pulumi.BoolPtrInput 243 } 244 245 func (GlobalClusterState) ElementType() reflect.Type { 246 return reflect.TypeOf((*globalClusterState)(nil)).Elem() 247 } 248 249 type globalClusterArgs struct { 250 // Name for an automatically created database on cluster creation. 251 DatabaseName *string `pulumi:"databaseName"` 252 // If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to `true`. The default is `false`. 253 DeletionProtection *bool `pulumi:"deletionProtection"` 254 // Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Current Valid values: `docdb`. Defaults to `docdb`. Conflicts with `sourceDbClusterIdentifier`. 255 Engine *string `pulumi:"engine"` 256 // Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will. 257 // * **NOTE:** Upgrading major versions is not supported. 258 EngineVersion *string `pulumi:"engineVersion"` 259 // The global cluster identifier. 260 GlobalClusterIdentifier string `pulumi:"globalClusterIdentifier"` 261 // Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value. 262 SourceDbClusterIdentifier *string `pulumi:"sourceDbClusterIdentifier"` 263 // Specifies whether the DB cluster is encrypted. The default is `false` unless `sourceDbClusterIdentifier` is specified and encrypted. The provider will only perform drift detection if a configuration value is provided. 264 StorageEncrypted *bool `pulumi:"storageEncrypted"` 265 } 266 267 // The set of arguments for constructing a GlobalCluster resource. 268 type GlobalClusterArgs struct { 269 // Name for an automatically created database on cluster creation. 270 DatabaseName pulumi.StringPtrInput 271 // If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to `true`. The default is `false`. 272 DeletionProtection pulumi.BoolPtrInput 273 // Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Current Valid values: `docdb`. Defaults to `docdb`. Conflicts with `sourceDbClusterIdentifier`. 274 Engine pulumi.StringPtrInput 275 // Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will. 276 // * **NOTE:** Upgrading major versions is not supported. 277 EngineVersion pulumi.StringPtrInput 278 // The global cluster identifier. 279 GlobalClusterIdentifier pulumi.StringInput 280 // Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value. 281 SourceDbClusterIdentifier pulumi.StringPtrInput 282 // Specifies whether the DB cluster is encrypted. The default is `false` unless `sourceDbClusterIdentifier` is specified and encrypted. The provider will only perform drift detection if a configuration value is provided. 283 StorageEncrypted pulumi.BoolPtrInput 284 } 285 286 func (GlobalClusterArgs) ElementType() reflect.Type { 287 return reflect.TypeOf((*globalClusterArgs)(nil)).Elem() 288 } 289 290 type GlobalClusterInput interface { 291 pulumi.Input 292 293 ToGlobalClusterOutput() GlobalClusterOutput 294 ToGlobalClusterOutputWithContext(ctx context.Context) GlobalClusterOutput 295 } 296 297 func (*GlobalCluster) ElementType() reflect.Type { 298 return reflect.TypeOf((**GlobalCluster)(nil)).Elem() 299 } 300 301 func (i *GlobalCluster) ToGlobalClusterOutput() GlobalClusterOutput { 302 return i.ToGlobalClusterOutputWithContext(context.Background()) 303 } 304 305 func (i *GlobalCluster) ToGlobalClusterOutputWithContext(ctx context.Context) GlobalClusterOutput { 306 return pulumi.ToOutputWithContext(ctx, i).(GlobalClusterOutput) 307 } 308 309 // GlobalClusterArrayInput is an input type that accepts GlobalClusterArray and GlobalClusterArrayOutput values. 310 // You can construct a concrete instance of `GlobalClusterArrayInput` via: 311 // 312 // GlobalClusterArray{ GlobalClusterArgs{...} } 313 type GlobalClusterArrayInput interface { 314 pulumi.Input 315 316 ToGlobalClusterArrayOutput() GlobalClusterArrayOutput 317 ToGlobalClusterArrayOutputWithContext(context.Context) GlobalClusterArrayOutput 318 } 319 320 type GlobalClusterArray []GlobalClusterInput 321 322 func (GlobalClusterArray) ElementType() reflect.Type { 323 return reflect.TypeOf((*[]*GlobalCluster)(nil)).Elem() 324 } 325 326 func (i GlobalClusterArray) ToGlobalClusterArrayOutput() GlobalClusterArrayOutput { 327 return i.ToGlobalClusterArrayOutputWithContext(context.Background()) 328 } 329 330 func (i GlobalClusterArray) ToGlobalClusterArrayOutputWithContext(ctx context.Context) GlobalClusterArrayOutput { 331 return pulumi.ToOutputWithContext(ctx, i).(GlobalClusterArrayOutput) 332 } 333 334 // GlobalClusterMapInput is an input type that accepts GlobalClusterMap and GlobalClusterMapOutput values. 335 // You can construct a concrete instance of `GlobalClusterMapInput` via: 336 // 337 // GlobalClusterMap{ "key": GlobalClusterArgs{...} } 338 type GlobalClusterMapInput interface { 339 pulumi.Input 340 341 ToGlobalClusterMapOutput() GlobalClusterMapOutput 342 ToGlobalClusterMapOutputWithContext(context.Context) GlobalClusterMapOutput 343 } 344 345 type GlobalClusterMap map[string]GlobalClusterInput 346 347 func (GlobalClusterMap) ElementType() reflect.Type { 348 return reflect.TypeOf((*map[string]*GlobalCluster)(nil)).Elem() 349 } 350 351 func (i GlobalClusterMap) ToGlobalClusterMapOutput() GlobalClusterMapOutput { 352 return i.ToGlobalClusterMapOutputWithContext(context.Background()) 353 } 354 355 func (i GlobalClusterMap) ToGlobalClusterMapOutputWithContext(ctx context.Context) GlobalClusterMapOutput { 356 return pulumi.ToOutputWithContext(ctx, i).(GlobalClusterMapOutput) 357 } 358 359 type GlobalClusterOutput struct{ *pulumi.OutputState } 360 361 func (GlobalClusterOutput) ElementType() reflect.Type { 362 return reflect.TypeOf((**GlobalCluster)(nil)).Elem() 363 } 364 365 func (o GlobalClusterOutput) ToGlobalClusterOutput() GlobalClusterOutput { 366 return o 367 } 368 369 func (o GlobalClusterOutput) ToGlobalClusterOutputWithContext(ctx context.Context) GlobalClusterOutput { 370 return o 371 } 372 373 // Global Cluster Amazon Resource Name (ARN) 374 func (o GlobalClusterOutput) Arn() pulumi.StringOutput { 375 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 376 } 377 378 // Name for an automatically created database on cluster creation. 379 func (o GlobalClusterOutput) DatabaseName() pulumi.StringPtrOutput { 380 return o.ApplyT(func(v *GlobalCluster) pulumi.StringPtrOutput { return v.DatabaseName }).(pulumi.StringPtrOutput) 381 } 382 383 // If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to `true`. The default is `false`. 384 func (o GlobalClusterOutput) DeletionProtection() pulumi.BoolPtrOutput { 385 return o.ApplyT(func(v *GlobalCluster) pulumi.BoolPtrOutput { return v.DeletionProtection }).(pulumi.BoolPtrOutput) 386 } 387 388 // Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Current Valid values: `docdb`. Defaults to `docdb`. Conflicts with `sourceDbClusterIdentifier`. 389 func (o GlobalClusterOutput) Engine() pulumi.StringOutput { 390 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.Engine }).(pulumi.StringOutput) 391 } 392 393 // Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will. 394 // * **NOTE:** Upgrading major versions is not supported. 395 func (o GlobalClusterOutput) EngineVersion() pulumi.StringOutput { 396 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.EngineVersion }).(pulumi.StringOutput) 397 } 398 399 // The global cluster identifier. 400 func (o GlobalClusterOutput) GlobalClusterIdentifier() pulumi.StringOutput { 401 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.GlobalClusterIdentifier }).(pulumi.StringOutput) 402 } 403 404 // Set of objects containing Global Cluster members. 405 func (o GlobalClusterOutput) GlobalClusterMembers() GlobalClusterGlobalClusterMemberArrayOutput { 406 return o.ApplyT(func(v *GlobalCluster) GlobalClusterGlobalClusterMemberArrayOutput { return v.GlobalClusterMembers }).(GlobalClusterGlobalClusterMemberArrayOutput) 407 } 408 409 // AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed. 410 func (o GlobalClusterOutput) GlobalClusterResourceId() pulumi.StringOutput { 411 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.GlobalClusterResourceId }).(pulumi.StringOutput) 412 } 413 414 // Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value. 415 func (o GlobalClusterOutput) SourceDbClusterIdentifier() pulumi.StringOutput { 416 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.SourceDbClusterIdentifier }).(pulumi.StringOutput) 417 } 418 419 func (o GlobalClusterOutput) Status() pulumi.StringOutput { 420 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput) 421 } 422 423 // Specifies whether the DB cluster is encrypted. The default is `false` unless `sourceDbClusterIdentifier` is specified and encrypted. The provider will only perform drift detection if a configuration value is provided. 424 func (o GlobalClusterOutput) StorageEncrypted() pulumi.BoolOutput { 425 return o.ApplyT(func(v *GlobalCluster) pulumi.BoolOutput { return v.StorageEncrypted }).(pulumi.BoolOutput) 426 } 427 428 type GlobalClusterArrayOutput struct{ *pulumi.OutputState } 429 430 func (GlobalClusterArrayOutput) ElementType() reflect.Type { 431 return reflect.TypeOf((*[]*GlobalCluster)(nil)).Elem() 432 } 433 434 func (o GlobalClusterArrayOutput) ToGlobalClusterArrayOutput() GlobalClusterArrayOutput { 435 return o 436 } 437 438 func (o GlobalClusterArrayOutput) ToGlobalClusterArrayOutputWithContext(ctx context.Context) GlobalClusterArrayOutput { 439 return o 440 } 441 442 func (o GlobalClusterArrayOutput) Index(i pulumi.IntInput) GlobalClusterOutput { 443 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GlobalCluster { 444 return vs[0].([]*GlobalCluster)[vs[1].(int)] 445 }).(GlobalClusterOutput) 446 } 447 448 type GlobalClusterMapOutput struct{ *pulumi.OutputState } 449 450 func (GlobalClusterMapOutput) ElementType() reflect.Type { 451 return reflect.TypeOf((*map[string]*GlobalCluster)(nil)).Elem() 452 } 453 454 func (o GlobalClusterMapOutput) ToGlobalClusterMapOutput() GlobalClusterMapOutput { 455 return o 456 } 457 458 func (o GlobalClusterMapOutput) ToGlobalClusterMapOutputWithContext(ctx context.Context) GlobalClusterMapOutput { 459 return o 460 } 461 462 func (o GlobalClusterMapOutput) MapIndex(k pulumi.StringInput) GlobalClusterOutput { 463 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GlobalCluster { 464 return vs[0].(map[string]*GlobalCluster)[vs[1].(string)] 465 }).(GlobalClusterOutput) 466 } 467 468 func init() { 469 pulumi.RegisterInputType(reflect.TypeOf((*GlobalClusterInput)(nil)).Elem(), &GlobalCluster{}) 470 pulumi.RegisterInputType(reflect.TypeOf((*GlobalClusterArrayInput)(nil)).Elem(), GlobalClusterArray{}) 471 pulumi.RegisterInputType(reflect.TypeOf((*GlobalClusterMapInput)(nil)).Elem(), GlobalClusterMap{}) 472 pulumi.RegisterOutputType(GlobalClusterOutput{}) 473 pulumi.RegisterOutputType(GlobalClusterArrayOutput{}) 474 pulumi.RegisterOutputType(GlobalClusterMapOutput{}) 475 }