github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/rds/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 rds 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 RDS Global Cluster, which is an Aurora global database spread across multiple regions. The global database contains a single primary cluster with read-write capability, and a read-only secondary cluster that receives data from the primary cluster through high-speed replication performed by the Aurora storage subsystem. 16 // 17 // More information about Aurora global databases can be found in the [Aurora User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html#aurora-global-database-creating). 18 // 19 // ## Example Usage 20 // 21 // ### New MySQL 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/rds" 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 := rds.NewGlobalCluster(ctx, "example", &rds.GlobalClusterArgs{ 37 // GlobalClusterIdentifier: pulumi.String("global-test"), 38 // Engine: pulumi.String("aurora"), 39 // EngineVersion: pulumi.String("5.6.mysql_aurora.1.22.2"), 40 // DatabaseName: pulumi.String("example_db"), 41 // }) 42 // if err != nil { 43 // return err 44 // } 45 // primary, err := rds.NewCluster(ctx, "primary", &rds.ClusterArgs{ 46 // Engine: example.Engine, 47 // EngineVersion: example.EngineVersion, 48 // ClusterIdentifier: pulumi.String("test-primary-cluster"), 49 // MasterUsername: pulumi.String("username"), 50 // MasterPassword: pulumi.String("somepass123"), 51 // DatabaseName: pulumi.String("example_db"), 52 // GlobalClusterIdentifier: example.ID(), 53 // DbSubnetGroupName: pulumi.String("default"), 54 // }) 55 // if err != nil { 56 // return err 57 // } 58 // primaryClusterInstance, err := rds.NewClusterInstance(ctx, "primary", &rds.ClusterInstanceArgs{ 59 // Engine: example.Engine, 60 // EngineVersion: example.EngineVersion, 61 // Identifier: pulumi.String("test-primary-cluster-instance"), 62 // ClusterIdentifier: primary.ID(), 63 // InstanceClass: pulumi.String(rds.InstanceType_R4_Large), 64 // DbSubnetGroupName: pulumi.String("default"), 65 // }) 66 // if err != nil { 67 // return err 68 // } 69 // secondary, err := rds.NewCluster(ctx, "secondary", &rds.ClusterArgs{ 70 // Engine: example.Engine, 71 // EngineVersion: example.EngineVersion, 72 // ClusterIdentifier: pulumi.String("test-secondary-cluster"), 73 // GlobalClusterIdentifier: example.ID(), 74 // DbSubnetGroupName: pulumi.String("default"), 75 // }, pulumi.DependsOn([]pulumi.Resource{ 76 // primaryClusterInstance, 77 // })) 78 // if err != nil { 79 // return err 80 // } 81 // _, err = rds.NewClusterInstance(ctx, "secondary", &rds.ClusterInstanceArgs{ 82 // Engine: example.Engine, 83 // EngineVersion: example.EngineVersion, 84 // Identifier: pulumi.String("test-secondary-cluster-instance"), 85 // ClusterIdentifier: secondary.ID(), 86 // InstanceClass: pulumi.String(rds.InstanceType_R4_Large), 87 // DbSubnetGroupName: pulumi.String("default"), 88 // }) 89 // if err != nil { 90 // return err 91 // } 92 // return nil 93 // }) 94 // } 95 // 96 // ``` 97 // <!--End PulumiCodeChooser --> 98 // 99 // ### New PostgreSQL Global Cluster 100 // 101 // <!--Start PulumiCodeChooser --> 102 // ```go 103 // package main 104 // 105 // import ( 106 // 107 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds" 108 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 109 // 110 // ) 111 // 112 // func main() { 113 // pulumi.Run(func(ctx *pulumi.Context) error { 114 // example, err := rds.NewGlobalCluster(ctx, "example", &rds.GlobalClusterArgs{ 115 // GlobalClusterIdentifier: pulumi.String("global-test"), 116 // Engine: pulumi.String("aurora-postgresql"), 117 // EngineVersion: pulumi.String("11.9"), 118 // DatabaseName: pulumi.String("example_db"), 119 // }) 120 // if err != nil { 121 // return err 122 // } 123 // primary, err := rds.NewCluster(ctx, "primary", &rds.ClusterArgs{ 124 // Engine: example.Engine, 125 // EngineVersion: example.EngineVersion, 126 // ClusterIdentifier: pulumi.String("test-primary-cluster"), 127 // MasterUsername: pulumi.String("username"), 128 // MasterPassword: pulumi.String("somepass123"), 129 // DatabaseName: pulumi.String("example_db"), 130 // GlobalClusterIdentifier: example.ID(), 131 // DbSubnetGroupName: pulumi.String("default"), 132 // }) 133 // if err != nil { 134 // return err 135 // } 136 // primaryClusterInstance, err := rds.NewClusterInstance(ctx, "primary", &rds.ClusterInstanceArgs{ 137 // Engine: example.Engine, 138 // EngineVersion: example.EngineVersion, 139 // Identifier: pulumi.String("test-primary-cluster-instance"), 140 // ClusterIdentifier: primary.ID(), 141 // InstanceClass: pulumi.String(rds.InstanceType_R4_Large), 142 // DbSubnetGroupName: pulumi.String("default"), 143 // }) 144 // if err != nil { 145 // return err 146 // } 147 // secondary, err := rds.NewCluster(ctx, "secondary", &rds.ClusterArgs{ 148 // Engine: example.Engine, 149 // EngineVersion: example.EngineVersion, 150 // ClusterIdentifier: pulumi.String("test-secondary-cluster"), 151 // GlobalClusterIdentifier: example.ID(), 152 // SkipFinalSnapshot: pulumi.Bool(true), 153 // DbSubnetGroupName: pulumi.String("default"), 154 // }, pulumi.DependsOn([]pulumi.Resource{ 155 // primaryClusterInstance, 156 // })) 157 // if err != nil { 158 // return err 159 // } 160 // _, err = rds.NewClusterInstance(ctx, "secondary", &rds.ClusterInstanceArgs{ 161 // Engine: example.Engine, 162 // EngineVersion: example.EngineVersion, 163 // Identifier: pulumi.String("test-secondary-cluster-instance"), 164 // ClusterIdentifier: secondary.ID(), 165 // InstanceClass: pulumi.String(rds.InstanceType_R4_Large), 166 // DbSubnetGroupName: pulumi.String("default"), 167 // }) 168 // if err != nil { 169 // return err 170 // } 171 // return nil 172 // }) 173 // } 174 // 175 // ``` 176 // <!--End PulumiCodeChooser --> 177 // 178 // ### New Global Cluster From Existing DB Cluster 179 // 180 // <!--Start PulumiCodeChooser --> 181 // ```go 182 // package main 183 // 184 // import ( 185 // 186 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds" 187 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 188 // 189 // ) 190 // 191 // func main() { 192 // pulumi.Run(func(ctx *pulumi.Context) error { 193 // example, err := rds.NewCluster(ctx, "example", nil) 194 // if err != nil { 195 // return err 196 // } 197 // _, err = rds.NewGlobalCluster(ctx, "example", &rds.GlobalClusterArgs{ 198 // ForceDestroy: pulumi.Bool(true), 199 // GlobalClusterIdentifier: pulumi.String("example"), 200 // SourceDbClusterIdentifier: example.Arn, 201 // }) 202 // if err != nil { 203 // return err 204 // } 205 // return nil 206 // }) 207 // } 208 // 209 // ``` 210 // <!--End PulumiCodeChooser --> 211 // 212 // ### Upgrading Engine Versions 213 // 214 // When you upgrade the version of an `rds.GlobalCluster`, the provider will attempt to in-place upgrade the engine versions of all associated clusters. Since the `rds.Cluster` resource is being updated through the `rds.GlobalCluster`, you are likely to get an error (`Provider produced inconsistent final plan`). To avoid this, use the `lifecycle` `ignoreChanges` meta argument as shown below on the `rds.Cluster`. 215 // 216 // <!--Start PulumiCodeChooser --> 217 // ```go 218 // package main 219 // 220 // import ( 221 // 222 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds" 223 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 224 // 225 // ) 226 // 227 // func main() { 228 // pulumi.Run(func(ctx *pulumi.Context) error { 229 // example, err := rds.NewGlobalCluster(ctx, "example", &rds.GlobalClusterArgs{ 230 // GlobalClusterIdentifier: pulumi.String("kyivkharkiv"), 231 // Engine: pulumi.String("aurora-mysql"), 232 // EngineVersion: pulumi.String("5.7.mysql_aurora.2.07.5"), 233 // }) 234 // if err != nil { 235 // return err 236 // } 237 // primary, err := rds.NewCluster(ctx, "primary", &rds.ClusterArgs{ 238 // AllowMajorVersionUpgrade: pulumi.Bool(true), 239 // ApplyImmediately: pulumi.Bool(true), 240 // ClusterIdentifier: pulumi.String("odessadnipro"), 241 // DatabaseName: pulumi.String("totoro"), 242 // Engine: example.Engine, 243 // EngineVersion: example.EngineVersion, 244 // GlobalClusterIdentifier: example.ID(), 245 // MasterPassword: pulumi.String("satsukimae"), 246 // MasterUsername: pulumi.String("maesatsuki"), 247 // SkipFinalSnapshot: pulumi.Bool(true), 248 // }) 249 // if err != nil { 250 // return err 251 // } 252 // _, err = rds.NewClusterInstance(ctx, "primary", &rds.ClusterInstanceArgs{ 253 // ApplyImmediately: pulumi.Bool(true), 254 // ClusterIdentifier: primary.ID(), 255 // Engine: primary.Engine, 256 // EngineVersion: primary.EngineVersion, 257 // Identifier: pulumi.String("donetsklviv"), 258 // InstanceClass: pulumi.String(rds.InstanceType_R4_Large), 259 // }) 260 // if err != nil { 261 // return err 262 // } 263 // return nil 264 // }) 265 // } 266 // 267 // ``` 268 // <!--End PulumiCodeChooser --> 269 // 270 // ## Import 271 // 272 // Using `pulumi import`, import `aws_rds_global_cluster` using the RDS Global Cluster identifier. For example: 273 // 274 // ```sh 275 // $ pulumi import aws:rds/globalCluster:GlobalCluster example example 276 // ``` 277 // Certain resource arguments, like `force_destroy`, only exist within this provider. If the argument is set in the the provider configuration on an imported resource, This provider will show a difference on the first plan after import to update the state value. This change is safe to apply immediately so the state matches the desired configuration. 278 // 279 // 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: 280 type GlobalCluster struct { 281 pulumi.CustomResourceState 282 283 // RDS Global Cluster Amazon Resource Name (ARN) 284 Arn pulumi.StringOutput `pulumi:"arn"` 285 // Name for an automatically created database on cluster creation. 286 DatabaseName pulumi.StringPtrOutput `pulumi:"databaseName"` 287 // 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`. 288 DeletionProtection pulumi.BoolPtrOutput `pulumi:"deletionProtection"` 289 // 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. Valid values: `aurora`, `aurora-mysql`, `aurora-postgresql`. Defaults to `aurora`. Conflicts with `sourceDbClusterIdentifier`. 290 Engine pulumi.StringOutput `pulumi:"engine"` 291 // Engine version of the Aurora global database. The `engine`, `engineVersion`, and `instanceClass` (on the `rds.ClusterInstance`) must together support global databases. See [Using Amazon Aurora global databases](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html) for more information. By upgrading the engine version, the provider will upgrade cluster members. **NOTE:** To avoid an `inconsistent final plan` error while upgrading, use the `lifecycle` `ignoreChanges` for `engineVersion` meta argument on the associated `rds.Cluster` resource as shown above in Upgrading Engine Versions example. 292 EngineVersion pulumi.StringOutput `pulumi:"engineVersion"` 293 EngineVersionActual pulumi.StringOutput `pulumi:"engineVersionActual"` 294 // Enable to remove DB Cluster members from Global Cluster on destroy. Required with `sourceDbClusterIdentifier`. 295 ForceDestroy pulumi.BoolPtrOutput `pulumi:"forceDestroy"` 296 // Global cluster identifier. 297 GlobalClusterIdentifier pulumi.StringOutput `pulumi:"globalClusterIdentifier"` 298 // Set of objects containing Global Cluster members. 299 GlobalClusterMembers GlobalClusterGlobalClusterMemberArrayOutput `pulumi:"globalClusterMembers"` 300 // 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 301 GlobalClusterResourceId pulumi.StringOutput `pulumi:"globalClusterResourceId"` 302 // 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. 303 SourceDbClusterIdentifier pulumi.StringOutput `pulumi:"sourceDbClusterIdentifier"` 304 // 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. 305 StorageEncrypted pulumi.BoolOutput `pulumi:"storageEncrypted"` 306 } 307 308 // NewGlobalCluster registers a new resource with the given unique name, arguments, and options. 309 func NewGlobalCluster(ctx *pulumi.Context, 310 name string, args *GlobalClusterArgs, opts ...pulumi.ResourceOption) (*GlobalCluster, error) { 311 if args == nil { 312 return nil, errors.New("missing one or more required arguments") 313 } 314 315 if args.GlobalClusterIdentifier == nil { 316 return nil, errors.New("invalid value for required argument 'GlobalClusterIdentifier'") 317 } 318 opts = internal.PkgResourceDefaultOpts(opts) 319 var resource GlobalCluster 320 err := ctx.RegisterResource("aws:rds/globalCluster:GlobalCluster", name, args, &resource, opts...) 321 if err != nil { 322 return nil, err 323 } 324 return &resource, nil 325 } 326 327 // GetGlobalCluster gets an existing GlobalCluster resource's state with the given name, ID, and optional 328 // state properties that are used to uniquely qualify the lookup (nil if not required). 329 func GetGlobalCluster(ctx *pulumi.Context, 330 name string, id pulumi.IDInput, state *GlobalClusterState, opts ...pulumi.ResourceOption) (*GlobalCluster, error) { 331 var resource GlobalCluster 332 err := ctx.ReadResource("aws:rds/globalCluster:GlobalCluster", name, id, state, &resource, opts...) 333 if err != nil { 334 return nil, err 335 } 336 return &resource, nil 337 } 338 339 // Input properties used for looking up and filtering GlobalCluster resources. 340 type globalClusterState struct { 341 // RDS Global Cluster Amazon Resource Name (ARN) 342 Arn *string `pulumi:"arn"` 343 // Name for an automatically created database on cluster creation. 344 DatabaseName *string `pulumi:"databaseName"` 345 // 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`. 346 DeletionProtection *bool `pulumi:"deletionProtection"` 347 // 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. Valid values: `aurora`, `aurora-mysql`, `aurora-postgresql`. Defaults to `aurora`. Conflicts with `sourceDbClusterIdentifier`. 348 Engine *string `pulumi:"engine"` 349 // Engine version of the Aurora global database. The `engine`, `engineVersion`, and `instanceClass` (on the `rds.ClusterInstance`) must together support global databases. See [Using Amazon Aurora global databases](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html) for more information. By upgrading the engine version, the provider will upgrade cluster members. **NOTE:** To avoid an `inconsistent final plan` error while upgrading, use the `lifecycle` `ignoreChanges` for `engineVersion` meta argument on the associated `rds.Cluster` resource as shown above in Upgrading Engine Versions example. 350 EngineVersion *string `pulumi:"engineVersion"` 351 EngineVersionActual *string `pulumi:"engineVersionActual"` 352 // Enable to remove DB Cluster members from Global Cluster on destroy. Required with `sourceDbClusterIdentifier`. 353 ForceDestroy *bool `pulumi:"forceDestroy"` 354 // Global cluster identifier. 355 GlobalClusterIdentifier *string `pulumi:"globalClusterIdentifier"` 356 // Set of objects containing Global Cluster members. 357 GlobalClusterMembers []GlobalClusterGlobalClusterMember `pulumi:"globalClusterMembers"` 358 // 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 359 GlobalClusterResourceId *string `pulumi:"globalClusterResourceId"` 360 // 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. 361 SourceDbClusterIdentifier *string `pulumi:"sourceDbClusterIdentifier"` 362 // 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. 363 StorageEncrypted *bool `pulumi:"storageEncrypted"` 364 } 365 366 type GlobalClusterState struct { 367 // RDS Global Cluster Amazon Resource Name (ARN) 368 Arn pulumi.StringPtrInput 369 // Name for an automatically created database on cluster creation. 370 DatabaseName pulumi.StringPtrInput 371 // 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`. 372 DeletionProtection pulumi.BoolPtrInput 373 // 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. Valid values: `aurora`, `aurora-mysql`, `aurora-postgresql`. Defaults to `aurora`. Conflicts with `sourceDbClusterIdentifier`. 374 Engine pulumi.StringPtrInput 375 // Engine version of the Aurora global database. The `engine`, `engineVersion`, and `instanceClass` (on the `rds.ClusterInstance`) must together support global databases. See [Using Amazon Aurora global databases](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html) for more information. By upgrading the engine version, the provider will upgrade cluster members. **NOTE:** To avoid an `inconsistent final plan` error while upgrading, use the `lifecycle` `ignoreChanges` for `engineVersion` meta argument on the associated `rds.Cluster` resource as shown above in Upgrading Engine Versions example. 376 EngineVersion pulumi.StringPtrInput 377 EngineVersionActual pulumi.StringPtrInput 378 // Enable to remove DB Cluster members from Global Cluster on destroy. Required with `sourceDbClusterIdentifier`. 379 ForceDestroy pulumi.BoolPtrInput 380 // Global cluster identifier. 381 GlobalClusterIdentifier pulumi.StringPtrInput 382 // Set of objects containing Global Cluster members. 383 GlobalClusterMembers GlobalClusterGlobalClusterMemberArrayInput 384 // 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 385 GlobalClusterResourceId pulumi.StringPtrInput 386 // 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. 387 SourceDbClusterIdentifier pulumi.StringPtrInput 388 // 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. 389 StorageEncrypted pulumi.BoolPtrInput 390 } 391 392 func (GlobalClusterState) ElementType() reflect.Type { 393 return reflect.TypeOf((*globalClusterState)(nil)).Elem() 394 } 395 396 type globalClusterArgs struct { 397 // Name for an automatically created database on cluster creation. 398 DatabaseName *string `pulumi:"databaseName"` 399 // 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`. 400 DeletionProtection *bool `pulumi:"deletionProtection"` 401 // 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. Valid values: `aurora`, `aurora-mysql`, `aurora-postgresql`. Defaults to `aurora`. Conflicts with `sourceDbClusterIdentifier`. 402 Engine *string `pulumi:"engine"` 403 // Engine version of the Aurora global database. The `engine`, `engineVersion`, and `instanceClass` (on the `rds.ClusterInstance`) must together support global databases. See [Using Amazon Aurora global databases](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html) for more information. By upgrading the engine version, the provider will upgrade cluster members. **NOTE:** To avoid an `inconsistent final plan` error while upgrading, use the `lifecycle` `ignoreChanges` for `engineVersion` meta argument on the associated `rds.Cluster` resource as shown above in Upgrading Engine Versions example. 404 EngineVersion *string `pulumi:"engineVersion"` 405 // Enable to remove DB Cluster members from Global Cluster on destroy. Required with `sourceDbClusterIdentifier`. 406 ForceDestroy *bool `pulumi:"forceDestroy"` 407 // Global cluster identifier. 408 GlobalClusterIdentifier string `pulumi:"globalClusterIdentifier"` 409 // 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. 410 SourceDbClusterIdentifier *string `pulumi:"sourceDbClusterIdentifier"` 411 // 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. 412 StorageEncrypted *bool `pulumi:"storageEncrypted"` 413 } 414 415 // The set of arguments for constructing a GlobalCluster resource. 416 type GlobalClusterArgs struct { 417 // Name for an automatically created database on cluster creation. 418 DatabaseName pulumi.StringPtrInput 419 // 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`. 420 DeletionProtection pulumi.BoolPtrInput 421 // 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. Valid values: `aurora`, `aurora-mysql`, `aurora-postgresql`. Defaults to `aurora`. Conflicts with `sourceDbClusterIdentifier`. 422 Engine pulumi.StringPtrInput 423 // Engine version of the Aurora global database. The `engine`, `engineVersion`, and `instanceClass` (on the `rds.ClusterInstance`) must together support global databases. See [Using Amazon Aurora global databases](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html) for more information. By upgrading the engine version, the provider will upgrade cluster members. **NOTE:** To avoid an `inconsistent final plan` error while upgrading, use the `lifecycle` `ignoreChanges` for `engineVersion` meta argument on the associated `rds.Cluster` resource as shown above in Upgrading Engine Versions example. 424 EngineVersion pulumi.StringPtrInput 425 // Enable to remove DB Cluster members from Global Cluster on destroy. Required with `sourceDbClusterIdentifier`. 426 ForceDestroy pulumi.BoolPtrInput 427 // Global cluster identifier. 428 GlobalClusterIdentifier pulumi.StringInput 429 // 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. 430 SourceDbClusterIdentifier pulumi.StringPtrInput 431 // 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. 432 StorageEncrypted pulumi.BoolPtrInput 433 } 434 435 func (GlobalClusterArgs) ElementType() reflect.Type { 436 return reflect.TypeOf((*globalClusterArgs)(nil)).Elem() 437 } 438 439 type GlobalClusterInput interface { 440 pulumi.Input 441 442 ToGlobalClusterOutput() GlobalClusterOutput 443 ToGlobalClusterOutputWithContext(ctx context.Context) GlobalClusterOutput 444 } 445 446 func (*GlobalCluster) ElementType() reflect.Type { 447 return reflect.TypeOf((**GlobalCluster)(nil)).Elem() 448 } 449 450 func (i *GlobalCluster) ToGlobalClusterOutput() GlobalClusterOutput { 451 return i.ToGlobalClusterOutputWithContext(context.Background()) 452 } 453 454 func (i *GlobalCluster) ToGlobalClusterOutputWithContext(ctx context.Context) GlobalClusterOutput { 455 return pulumi.ToOutputWithContext(ctx, i).(GlobalClusterOutput) 456 } 457 458 // GlobalClusterArrayInput is an input type that accepts GlobalClusterArray and GlobalClusterArrayOutput values. 459 // You can construct a concrete instance of `GlobalClusterArrayInput` via: 460 // 461 // GlobalClusterArray{ GlobalClusterArgs{...} } 462 type GlobalClusterArrayInput interface { 463 pulumi.Input 464 465 ToGlobalClusterArrayOutput() GlobalClusterArrayOutput 466 ToGlobalClusterArrayOutputWithContext(context.Context) GlobalClusterArrayOutput 467 } 468 469 type GlobalClusterArray []GlobalClusterInput 470 471 func (GlobalClusterArray) ElementType() reflect.Type { 472 return reflect.TypeOf((*[]*GlobalCluster)(nil)).Elem() 473 } 474 475 func (i GlobalClusterArray) ToGlobalClusterArrayOutput() GlobalClusterArrayOutput { 476 return i.ToGlobalClusterArrayOutputWithContext(context.Background()) 477 } 478 479 func (i GlobalClusterArray) ToGlobalClusterArrayOutputWithContext(ctx context.Context) GlobalClusterArrayOutput { 480 return pulumi.ToOutputWithContext(ctx, i).(GlobalClusterArrayOutput) 481 } 482 483 // GlobalClusterMapInput is an input type that accepts GlobalClusterMap and GlobalClusterMapOutput values. 484 // You can construct a concrete instance of `GlobalClusterMapInput` via: 485 // 486 // GlobalClusterMap{ "key": GlobalClusterArgs{...} } 487 type GlobalClusterMapInput interface { 488 pulumi.Input 489 490 ToGlobalClusterMapOutput() GlobalClusterMapOutput 491 ToGlobalClusterMapOutputWithContext(context.Context) GlobalClusterMapOutput 492 } 493 494 type GlobalClusterMap map[string]GlobalClusterInput 495 496 func (GlobalClusterMap) ElementType() reflect.Type { 497 return reflect.TypeOf((*map[string]*GlobalCluster)(nil)).Elem() 498 } 499 500 func (i GlobalClusterMap) ToGlobalClusterMapOutput() GlobalClusterMapOutput { 501 return i.ToGlobalClusterMapOutputWithContext(context.Background()) 502 } 503 504 func (i GlobalClusterMap) ToGlobalClusterMapOutputWithContext(ctx context.Context) GlobalClusterMapOutput { 505 return pulumi.ToOutputWithContext(ctx, i).(GlobalClusterMapOutput) 506 } 507 508 type GlobalClusterOutput struct{ *pulumi.OutputState } 509 510 func (GlobalClusterOutput) ElementType() reflect.Type { 511 return reflect.TypeOf((**GlobalCluster)(nil)).Elem() 512 } 513 514 func (o GlobalClusterOutput) ToGlobalClusterOutput() GlobalClusterOutput { 515 return o 516 } 517 518 func (o GlobalClusterOutput) ToGlobalClusterOutputWithContext(ctx context.Context) GlobalClusterOutput { 519 return o 520 } 521 522 // RDS Global Cluster Amazon Resource Name (ARN) 523 func (o GlobalClusterOutput) Arn() pulumi.StringOutput { 524 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 525 } 526 527 // Name for an automatically created database on cluster creation. 528 func (o GlobalClusterOutput) DatabaseName() pulumi.StringPtrOutput { 529 return o.ApplyT(func(v *GlobalCluster) pulumi.StringPtrOutput { return v.DatabaseName }).(pulumi.StringPtrOutput) 530 } 531 532 // 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`. 533 func (o GlobalClusterOutput) DeletionProtection() pulumi.BoolPtrOutput { 534 return o.ApplyT(func(v *GlobalCluster) pulumi.BoolPtrOutput { return v.DeletionProtection }).(pulumi.BoolPtrOutput) 535 } 536 537 // 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. Valid values: `aurora`, `aurora-mysql`, `aurora-postgresql`. Defaults to `aurora`. Conflicts with `sourceDbClusterIdentifier`. 538 func (o GlobalClusterOutput) Engine() pulumi.StringOutput { 539 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.Engine }).(pulumi.StringOutput) 540 } 541 542 // Engine version of the Aurora global database. The `engine`, `engineVersion`, and `instanceClass` (on the `rds.ClusterInstance`) must together support global databases. See [Using Amazon Aurora global databases](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html) for more information. By upgrading the engine version, the provider will upgrade cluster members. **NOTE:** To avoid an `inconsistent final plan` error while upgrading, use the `lifecycle` `ignoreChanges` for `engineVersion` meta argument on the associated `rds.Cluster` resource as shown above in Upgrading Engine Versions example. 543 func (o GlobalClusterOutput) EngineVersion() pulumi.StringOutput { 544 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.EngineVersion }).(pulumi.StringOutput) 545 } 546 547 func (o GlobalClusterOutput) EngineVersionActual() pulumi.StringOutput { 548 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.EngineVersionActual }).(pulumi.StringOutput) 549 } 550 551 // Enable to remove DB Cluster members from Global Cluster on destroy. Required with `sourceDbClusterIdentifier`. 552 func (o GlobalClusterOutput) ForceDestroy() pulumi.BoolPtrOutput { 553 return o.ApplyT(func(v *GlobalCluster) pulumi.BoolPtrOutput { return v.ForceDestroy }).(pulumi.BoolPtrOutput) 554 } 555 556 // Global cluster identifier. 557 func (o GlobalClusterOutput) GlobalClusterIdentifier() pulumi.StringOutput { 558 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.GlobalClusterIdentifier }).(pulumi.StringOutput) 559 } 560 561 // Set of objects containing Global Cluster members. 562 func (o GlobalClusterOutput) GlobalClusterMembers() GlobalClusterGlobalClusterMemberArrayOutput { 563 return o.ApplyT(func(v *GlobalCluster) GlobalClusterGlobalClusterMemberArrayOutput { return v.GlobalClusterMembers }).(GlobalClusterGlobalClusterMemberArrayOutput) 564 } 565 566 // 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 567 func (o GlobalClusterOutput) GlobalClusterResourceId() pulumi.StringOutput { 568 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.GlobalClusterResourceId }).(pulumi.StringOutput) 569 } 570 571 // 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. 572 func (o GlobalClusterOutput) SourceDbClusterIdentifier() pulumi.StringOutput { 573 return o.ApplyT(func(v *GlobalCluster) pulumi.StringOutput { return v.SourceDbClusterIdentifier }).(pulumi.StringOutput) 574 } 575 576 // 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. 577 func (o GlobalClusterOutput) StorageEncrypted() pulumi.BoolOutput { 578 return o.ApplyT(func(v *GlobalCluster) pulumi.BoolOutput { return v.StorageEncrypted }).(pulumi.BoolOutput) 579 } 580 581 type GlobalClusterArrayOutput struct{ *pulumi.OutputState } 582 583 func (GlobalClusterArrayOutput) ElementType() reflect.Type { 584 return reflect.TypeOf((*[]*GlobalCluster)(nil)).Elem() 585 } 586 587 func (o GlobalClusterArrayOutput) ToGlobalClusterArrayOutput() GlobalClusterArrayOutput { 588 return o 589 } 590 591 func (o GlobalClusterArrayOutput) ToGlobalClusterArrayOutputWithContext(ctx context.Context) GlobalClusterArrayOutput { 592 return o 593 } 594 595 func (o GlobalClusterArrayOutput) Index(i pulumi.IntInput) GlobalClusterOutput { 596 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GlobalCluster { 597 return vs[0].([]*GlobalCluster)[vs[1].(int)] 598 }).(GlobalClusterOutput) 599 } 600 601 type GlobalClusterMapOutput struct{ *pulumi.OutputState } 602 603 func (GlobalClusterMapOutput) ElementType() reflect.Type { 604 return reflect.TypeOf((*map[string]*GlobalCluster)(nil)).Elem() 605 } 606 607 func (o GlobalClusterMapOutput) ToGlobalClusterMapOutput() GlobalClusterMapOutput { 608 return o 609 } 610 611 func (o GlobalClusterMapOutput) ToGlobalClusterMapOutputWithContext(ctx context.Context) GlobalClusterMapOutput { 612 return o 613 } 614 615 func (o GlobalClusterMapOutput) MapIndex(k pulumi.StringInput) GlobalClusterOutput { 616 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GlobalCluster { 617 return vs[0].(map[string]*GlobalCluster)[vs[1].(string)] 618 }).(GlobalClusterOutput) 619 } 620 621 func init() { 622 pulumi.RegisterInputType(reflect.TypeOf((*GlobalClusterInput)(nil)).Elem(), &GlobalCluster{}) 623 pulumi.RegisterInputType(reflect.TypeOf((*GlobalClusterArrayInput)(nil)).Elem(), GlobalClusterArray{}) 624 pulumi.RegisterInputType(reflect.TypeOf((*GlobalClusterMapInput)(nil)).Elem(), GlobalClusterMap{}) 625 pulumi.RegisterOutputType(GlobalClusterOutput{}) 626 pulumi.RegisterOutputType(GlobalClusterArrayOutput{}) 627 pulumi.RegisterOutputType(GlobalClusterMapOutput{}) 628 }