import * as core from "@terrascript/core"; export interface GlobalClusterMembersArgs extends core.SchemaArgs { dbClusterArn: string | core.StringOut; isWriter: boolean | core.BooleanOut; } export class GlobalClusterMembers extends core.Schema { @core.attr(String, { computed: true }) public dbClusterArn!: string | core.StringOut; @core.attr(Boolean, { computed: true }) public isWriter!: boolean | core.BooleanOut; } export interface GlobalClusterArgs extends core.ResourceArgs { /** * (Optional, Forces new resources) Name for an automatically created database on cluster creation. */ databaseName?: string | core.StringOut; /** * (Optional) If the Global Cluster should have deletion protection enabled. The database can't be dele * ted when this value is set to `true`. The default is `false`. */ deletionProtection?: boolean | core.BooleanOut; /** * (Optional, Forces new resources) Name of the database engine to be used for this DB cluster. Terrafo * rm will only perform drift detection if a configuration value is provided. Valid values: `aurora`, ` * aurora-mysql`, `aurora-postgresql`. Defaults to `aurora`. Conflicts with `source_db_cluster_identifi * er`. */ engine?: string | core.StringOut; /** * (Optional) Engine version of the Aurora global database. The `engine`, `engine_version`, and `instan * ce_class` (on the `aws_rds_cluster_instance`) must together support global databases. See [Using Ama * zon Aurora global databases](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-glo * bal-database.html) for more information. By upgrading the engine version, Terraform will upgrade clu * ster members. **NOTE:** To avoid an `inconsistent final plan` error while upgrading, use the `lifecy * cle` `ignore_changes` for `engine_version` meta argument on the associated `aws_rds_cluster` resourc * e as shown above in [Upgrading Engine Versions](#upgrading-engine-versions) example. */ engineVersion?: string | core.StringOut; /** * (Optional) Enable to remove DB Cluster members from Global Cluster on destroy. Required with `source * _db_cluster_identifier`. */ forceDestroy?: boolean | core.BooleanOut; /** * (Required, Forces new resources) Global cluster identifier. */ globalClusterIdentifier: string | core.StringOut; /** * (Optional) Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on crea * tion. Terraform cannot perform drift detection of this value. */ sourceDbClusterIdentifier?: string | core.StringOut; /** * (Optional, Forces new resources) Specifies whether the DB cluster is encrypted. The default is `fals * e` unless `source_db_cluster_identifier` is specified and encrypted. Terraform will only perform dri * ft detection if a configuration value is provided. */ storageEncrypted?: boolean | core.BooleanOut; } export class GlobalCluster extends core.Resource { /** * RDS Global Cluster Amazon Resource Name (ARN) */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional, Forces new resources) Name for an automatically created database on cluster creation. */ @core.attr(String) public databaseName?: string | core.StringOut; /** * (Optional) If the Global Cluster should have deletion protection enabled. The database can't be dele * ted when this value is set to `true`. The default is `false`. */ @core.attr(Boolean) public deletionProtection?: boolean | core.BooleanOut; /** * (Optional, Forces new resources) Name of the database engine to be used for this DB cluster. Terrafo * rm will only perform drift detection if a configuration value is provided. Valid values: `aurora`, ` * aurora-mysql`, `aurora-postgresql`. Defaults to `aurora`. Conflicts with `source_db_cluster_identifi * er`. */ @core.attr(String, { computed: true }) public engine?: string | core.StringOut; /** * (Optional) Engine version of the Aurora global database. The `engine`, `engine_version`, and `instan * ce_class` (on the `aws_rds_cluster_instance`) must together support global databases. See [Using Ama * zon Aurora global databases](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-glo * bal-database.html) for more information. By upgrading the engine version, Terraform will upgrade clu * ster members. **NOTE:** To avoid an `inconsistent final plan` error while upgrading, use the `lifecy * cle` `ignore_changes` for `engine_version` meta argument on the associated `aws_rds_cluster` resourc * e as shown above in [Upgrading Engine Versions](#upgrading-engine-versions) example. */ @core.attr(String, { computed: true }) public engineVersion?: string | core.StringOut; /** * (Optional) Enable to remove DB Cluster members from Global Cluster on destroy. Required with `source * _db_cluster_identifier`. */ @core.attr(Boolean) public forceDestroy?: boolean | core.BooleanOut; /** * (Required, Forces new resources) Global cluster identifier. */ @core.attr(String) public globalClusterIdentifier!: string | core.StringOut; /** * Set of objects containing Global Cluster members. */ @core.attr(GlobalClusterMembers, { computed: true, kind: "array" }) public globalClusterMembers!: | core.Array | core.ArrayOut; /** * 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 */ @core.attr(String, { computed: true }) public globalClusterResourceId!: string | core.StringOut; /** * RDS Global Cluster identifier */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on crea * tion. Terraform cannot perform drift detection of this value. */ @core.attr(String, { computed: true }) public sourceDbClusterIdentifier?: string | core.StringOut; /** * (Optional, Forces new resources) Specifies whether the DB cluster is encrypted. The default is `fals * e` unless `source_db_cluster_identifier` is specified and encrypted. Terraform will only perform dri * ft detection if a configuration value is provided. */ @core.attr(Boolean, { computed: true }) public storageEncrypted?: boolean | core.BooleanOut; constructor(name: string, args?: GlobalClusterArgs) { super(name, "aws_rds_global_cluster", args); } public override getNamespace(): string { return "aws_rds"; } }