1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. sql
  5. DatabaseInstance
Google Cloud Classic v7.16.0 published on Wednesday, Mar 27, 2024 by Pulumi

gcp.sql.DatabaseInstance

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.16.0 published on Wednesday, Mar 27, 2024 by Pulumi

    Creates a new Google SQL Database Instance. For more information, see the official documentation, or the JSON API.

    NOTE on gcp.sql.DatabaseInstance: - Second-generation instances include a default ‘root’@’%!’(MISSING) user with no password. This user will be deleted by the provider on instance creation. You should use gcp.sql.User to define a custom user with a restricted host and strong password.

    Note: On newer versions of the provider, you must explicitly set deletion_protection=false (and run pulumi update to write the field to state) in order to destroy an instance. It is recommended to not set this field (or set it to true) until you’re ready to destroy the instance and its databases.

    Example Usage

    SQL Second Generation Instance

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const main = new gcp.sql.DatabaseInstance("main", {
        name: "main-instance",
        databaseVersion: "POSTGRES_15",
        region: "us-central1",
        settings: {
            tier: "db-f1-micro",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    main = gcp.sql.DatabaseInstance("main",
        name="main-instance",
        database_version="POSTGRES_15",
        region="us-central1",
        settings=gcp.sql.DatabaseInstanceSettingsArgs(
            tier="db-f1-micro",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/sql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sql.NewDatabaseInstance(ctx, "main", &sql.DatabaseInstanceArgs{
    			Name:            pulumi.String("main-instance"),
    			DatabaseVersion: pulumi.String("POSTGRES_15"),
    			Region:          pulumi.String("us-central1"),
    			Settings: &sql.DatabaseInstanceSettingsArgs{
    				Tier: pulumi.String("db-f1-micro"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Gcp.Sql.DatabaseInstance("main", new()
        {
            Name = "main-instance",
            DatabaseVersion = "POSTGRES_15",
            Region = "us-central1",
            Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
            {
                Tier = "db-f1-micro",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.sql.DatabaseInstance;
    import com.pulumi.gcp.sql.DatabaseInstanceArgs;
    import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var main = new DatabaseInstance("main", DatabaseInstanceArgs.builder()        
                .name("main-instance")
                .databaseVersion("POSTGRES_15")
                .region("us-central1")
                .settings(DatabaseInstanceSettingsArgs.builder()
                    .tier("db-f1-micro")
                    .build())
                .build());
    
        }
    }
    
    resources:
      main:
        type: gcp:sql:DatabaseInstance
        properties:
          name: main-instance
          databaseVersion: POSTGRES_15
          region: us-central1
          settings:
            tier: db-f1-micro
    

    Private IP Instance

    NOTE: For private IP instance setup, note that the gcp.sql.DatabaseInstance does not actually interpolate values from gcp.servicenetworking.Connection. You must explicitly add a depends_onreference as shown below.

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    import * as random from "@pulumi/random";
    
    const privateNetwork = new gcp.compute.Network("private_network", {name: "private-network"});
    const privateIpAddress = new gcp.compute.GlobalAddress("private_ip_address", {
        name: "private-ip-address",
        purpose: "VPC_PEERING",
        addressType: "INTERNAL",
        prefixLength: 16,
        network: privateNetwork.id,
    });
    const privateVpcConnection = new gcp.servicenetworking.Connection("private_vpc_connection", {
        network: privateNetwork.id,
        service: "servicenetworking.googleapis.com",
        reservedPeeringRanges: [privateIpAddress.name],
    });
    const dbNameSuffix = new random.RandomId("db_name_suffix", {byteLength: 4});
    const instance = new gcp.sql.DatabaseInstance("instance", {
        name: pulumi.interpolate`private-instance-${dbNameSuffix.hex}`,
        region: "us-central1",
        databaseVersion: "MYSQL_5_7",
        settings: {
            tier: "db-f1-micro",
            ipConfiguration: {
                ipv4Enabled: false,
                privateNetwork: privateNetwork.id,
                enablePrivatePathForGoogleCloudServices: true,
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    import pulumi_random as random
    
    private_network = gcp.compute.Network("private_network", name="private-network")
    private_ip_address = gcp.compute.GlobalAddress("private_ip_address",
        name="private-ip-address",
        purpose="VPC_PEERING",
        address_type="INTERNAL",
        prefix_length=16,
        network=private_network.id)
    private_vpc_connection = gcp.servicenetworking.Connection("private_vpc_connection",
        network=private_network.id,
        service="servicenetworking.googleapis.com",
        reserved_peering_ranges=[private_ip_address.name])
    db_name_suffix = random.RandomId("db_name_suffix", byte_length=4)
    instance = gcp.sql.DatabaseInstance("instance",
        name=db_name_suffix.hex.apply(lambda hex: f"private-instance-{hex}"),
        region="us-central1",
        database_version="MYSQL_5_7",
        settings=gcp.sql.DatabaseInstanceSettingsArgs(
            tier="db-f1-micro",
            ip_configuration=gcp.sql.DatabaseInstanceSettingsIpConfigurationArgs(
                ipv4_enabled=False,
                private_network=private_network.id,
                enable_private_path_for_google_cloud_services=True,
            ),
        ))
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/servicenetworking"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/sql"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		privateNetwork, err := compute.NewNetwork(ctx, "private_network", &compute.NetworkArgs{
    			Name: pulumi.String("private-network"),
    		})
    		if err != nil {
    			return err
    		}
    		privateIpAddress, err := compute.NewGlobalAddress(ctx, "private_ip_address", &compute.GlobalAddressArgs{
    			Name:         pulumi.String("private-ip-address"),
    			Purpose:      pulumi.String("VPC_PEERING"),
    			AddressType:  pulumi.String("INTERNAL"),
    			PrefixLength: pulumi.Int(16),
    			Network:      privateNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = servicenetworking.NewConnection(ctx, "private_vpc_connection", &servicenetworking.ConnectionArgs{
    			Network: privateNetwork.ID(),
    			Service: pulumi.String("servicenetworking.googleapis.com"),
    			ReservedPeeringRanges: pulumi.StringArray{
    				privateIpAddress.Name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		dbNameSuffix, err := random.NewRandomId(ctx, "db_name_suffix", &random.RandomIdArgs{
    			ByteLength: pulumi.Int(4),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = sql.NewDatabaseInstance(ctx, "instance", &sql.DatabaseInstanceArgs{
    			Name: dbNameSuffix.Hex.ApplyT(func(hex string) (string, error) {
    				return fmt.Sprintf("private-instance-%v", hex), nil
    			}).(pulumi.StringOutput),
    			Region:          pulumi.String("us-central1"),
    			DatabaseVersion: pulumi.String("MYSQL_5_7"),
    			Settings: &sql.DatabaseInstanceSettingsArgs{
    				Tier: pulumi.String("db-f1-micro"),
    				IpConfiguration: &sql.DatabaseInstanceSettingsIpConfigurationArgs{
    					Ipv4Enabled:                             pulumi.Bool(false),
    					PrivateNetwork:                          privateNetwork.ID(),
    					EnablePrivatePathForGoogleCloudServices: pulumi.Bool(true),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var privateNetwork = new Gcp.Compute.Network("private_network", new()
        {
            Name = "private-network",
        });
    
        var privateIpAddress = new Gcp.Compute.GlobalAddress("private_ip_address", new()
        {
            Name = "private-ip-address",
            Purpose = "VPC_PEERING",
            AddressType = "INTERNAL",
            PrefixLength = 16,
            Network = privateNetwork.Id,
        });
    
        var privateVpcConnection = new Gcp.ServiceNetworking.Connection("private_vpc_connection", new()
        {
            Network = privateNetwork.Id,
            Service = "servicenetworking.googleapis.com",
            ReservedPeeringRanges = new[]
            {
                privateIpAddress.Name,
            },
        });
    
        var dbNameSuffix = new Random.RandomId("db_name_suffix", new()
        {
            ByteLength = 4,
        });
    
        var instance = new Gcp.Sql.DatabaseInstance("instance", new()
        {
            Name = dbNameSuffix.Hex.Apply(hex => $"private-instance-{hex}"),
            Region = "us-central1",
            DatabaseVersion = "MYSQL_5_7",
            Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
            {
                Tier = "db-f1-micro",
                IpConfiguration = new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationArgs
                {
                    Ipv4Enabled = false,
                    PrivateNetwork = privateNetwork.Id,
                    EnablePrivatePathForGoogleCloudServices = true,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.compute.GlobalAddress;
    import com.pulumi.gcp.compute.GlobalAddressArgs;
    import com.pulumi.gcp.servicenetworking.Connection;
    import com.pulumi.gcp.servicenetworking.ConnectionArgs;
    import com.pulumi.random.RandomId;
    import com.pulumi.random.RandomIdArgs;
    import com.pulumi.gcp.sql.DatabaseInstance;
    import com.pulumi.gcp.sql.DatabaseInstanceArgs;
    import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsArgs;
    import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsIpConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var privateNetwork = new Network("privateNetwork", NetworkArgs.builder()        
                .name("private-network")
                .build());
    
            var privateIpAddress = new GlobalAddress("privateIpAddress", GlobalAddressArgs.builder()        
                .name("private-ip-address")
                .purpose("VPC_PEERING")
                .addressType("INTERNAL")
                .prefixLength(16)
                .network(privateNetwork.id())
                .build());
    
            var privateVpcConnection = new Connection("privateVpcConnection", ConnectionArgs.builder()        
                .network(privateNetwork.id())
                .service("servicenetworking.googleapis.com")
                .reservedPeeringRanges(privateIpAddress.name())
                .build());
    
            var dbNameSuffix = new RandomId("dbNameSuffix", RandomIdArgs.builder()        
                .byteLength(4)
                .build());
    
            var instance = new DatabaseInstance("instance", DatabaseInstanceArgs.builder()        
                .name(dbNameSuffix.hex().applyValue(hex -> String.format("private-instance-%s", hex)))
                .region("us-central1")
                .databaseVersion("MYSQL_5_7")
                .settings(DatabaseInstanceSettingsArgs.builder()
                    .tier("db-f1-micro")
                    .ipConfiguration(DatabaseInstanceSettingsIpConfigurationArgs.builder()
                        .ipv4Enabled(false)
                        .privateNetwork(privateNetwork.id())
                        .enablePrivatePathForGoogleCloudServices(true)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      privateNetwork:
        type: gcp:compute:Network
        name: private_network
        properties:
          name: private-network
      privateIpAddress:
        type: gcp:compute:GlobalAddress
        name: private_ip_address
        properties:
          name: private-ip-address
          purpose: VPC_PEERING
          addressType: INTERNAL
          prefixLength: 16
          network: ${privateNetwork.id}
      privateVpcConnection:
        type: gcp:servicenetworking:Connection
        name: private_vpc_connection
        properties:
          network: ${privateNetwork.id}
          service: servicenetworking.googleapis.com
          reservedPeeringRanges:
            - ${privateIpAddress.name}
      dbNameSuffix:
        type: random:RandomId
        name: db_name_suffix
        properties:
          byteLength: 4
      instance:
        type: gcp:sql:DatabaseInstance
        properties:
          name: private-instance-${dbNameSuffix.hex}
          region: us-central1
          databaseVersion: MYSQL_5_7
          settings:
            tier: db-f1-micro
            ipConfiguration:
              ipv4Enabled: false
              privateNetwork: ${privateNetwork.id}
              enablePrivatePathForGoogleCloudServices: true
    

    ENTERPRISE_PLUS Instance with data_cache_config

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const main = new gcp.sql.DatabaseInstance("main", {
        name: "enterprise-plus-main-instance",
        databaseVersion: "MYSQL_8_0_31",
        settings: {
            tier: "db-perf-optimized-N-2",
            edition: "ENTERPRISE_PLUS",
            dataCacheConfig: {
                dataCacheEnabled: true,
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    main = gcp.sql.DatabaseInstance("main",
        name="enterprise-plus-main-instance",
        database_version="MYSQL_8_0_31",
        settings=gcp.sql.DatabaseInstanceSettingsArgs(
            tier="db-perf-optimized-N-2",
            edition="ENTERPRISE_PLUS",
            data_cache_config=gcp.sql.DatabaseInstanceSettingsDataCacheConfigArgs(
                data_cache_enabled=True,
            ),
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/sql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sql.NewDatabaseInstance(ctx, "main", &sql.DatabaseInstanceArgs{
    			Name:            pulumi.String("enterprise-plus-main-instance"),
    			DatabaseVersion: pulumi.String("MYSQL_8_0_31"),
    			Settings: &sql.DatabaseInstanceSettingsArgs{
    				Tier:    pulumi.String("db-perf-optimized-N-2"),
    				Edition: pulumi.String("ENTERPRISE_PLUS"),
    				DataCacheConfig: &sql.DatabaseInstanceSettingsDataCacheConfigArgs{
    					DataCacheEnabled: pulumi.Bool(true),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Gcp.Sql.DatabaseInstance("main", new()
        {
            Name = "enterprise-plus-main-instance",
            DatabaseVersion = "MYSQL_8_0_31",
            Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
            {
                Tier = "db-perf-optimized-N-2",
                Edition = "ENTERPRISE_PLUS",
                DataCacheConfig = new Gcp.Sql.Inputs.DatabaseInstanceSettingsDataCacheConfigArgs
                {
                    DataCacheEnabled = true,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.sql.DatabaseInstance;
    import com.pulumi.gcp.sql.DatabaseInstanceArgs;
    import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsArgs;
    import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsDataCacheConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var main = new DatabaseInstance("main", DatabaseInstanceArgs.builder()        
                .name("enterprise-plus-main-instance")
                .databaseVersion("MYSQL_8_0_31")
                .settings(DatabaseInstanceSettingsArgs.builder()
                    .tier("db-perf-optimized-N-2")
                    .edition("ENTERPRISE_PLUS")
                    .dataCacheConfig(DatabaseInstanceSettingsDataCacheConfigArgs.builder()
                        .dataCacheEnabled(true)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      main:
        type: gcp:sql:DatabaseInstance
        properties:
          name: enterprise-plus-main-instance
          databaseVersion: MYSQL_8_0_31
          settings:
            tier: db-perf-optimized-N-2
            edition: ENTERPRISE_PLUS
            dataCacheConfig:
              dataCacheEnabled: true
    

    Cloud SQL Instance with PSC connectivity

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const main = new gcp.sql.DatabaseInstance("main", {
        name: "psc-enabled-main-instance",
        databaseVersion: "MYSQL_8_0",
        settings: {
            tier: "db-f1-micro",
            ipConfiguration: {
                pscConfigs: [{
                    pscEnabled: true,
                    allowedConsumerProjects: ["allowed-consumer-project-name"],
                }],
                ipv4Enabled: false,
            },
            backupConfiguration: {
                enabled: true,
                binaryLogEnabled: true,
            },
            availabilityType: "REGIONAL",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    main = gcp.sql.DatabaseInstance("main",
        name="psc-enabled-main-instance",
        database_version="MYSQL_8_0",
        settings=gcp.sql.DatabaseInstanceSettingsArgs(
            tier="db-f1-micro",
            ip_configuration=gcp.sql.DatabaseInstanceSettingsIpConfigurationArgs(
                psc_configs=[gcp.sql.DatabaseInstanceSettingsIpConfigurationPscConfigArgs(
                    psc_enabled=True,
                    allowed_consumer_projects=["allowed-consumer-project-name"],
                )],
                ipv4_enabled=False,
            ),
            backup_configuration=gcp.sql.DatabaseInstanceSettingsBackupConfigurationArgs(
                enabled=True,
                binary_log_enabled=True,
            ),
            availability_type="REGIONAL",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/sql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sql.NewDatabaseInstance(ctx, "main", &sql.DatabaseInstanceArgs{
    			Name:            pulumi.String("psc-enabled-main-instance"),
    			DatabaseVersion: pulumi.String("MYSQL_8_0"),
    			Settings: &sql.DatabaseInstanceSettingsArgs{
    				Tier: pulumi.String("db-f1-micro"),
    				IpConfiguration: &sql.DatabaseInstanceSettingsIpConfigurationArgs{
    					PscConfigs: sql.DatabaseInstanceSettingsIpConfigurationPscConfigArray{
    						&sql.DatabaseInstanceSettingsIpConfigurationPscConfigArgs{
    							PscEnabled: pulumi.Bool(true),
    							AllowedConsumerProjects: pulumi.StringArray{
    								pulumi.String("allowed-consumer-project-name"),
    							},
    						},
    					},
    					Ipv4Enabled: pulumi.Bool(false),
    				},
    				BackupConfiguration: &sql.DatabaseInstanceSettingsBackupConfigurationArgs{
    					Enabled:          pulumi.Bool(true),
    					BinaryLogEnabled: pulumi.Bool(true),
    				},
    				AvailabilityType: pulumi.String("REGIONAL"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Gcp.Sql.DatabaseInstance("main", new()
        {
            Name = "psc-enabled-main-instance",
            DatabaseVersion = "MYSQL_8_0",
            Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
            {
                Tier = "db-f1-micro",
                IpConfiguration = new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationArgs
                {
                    PscConfigs = new[]
                    {
                        new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationPscConfigArgs
                        {
                            PscEnabled = true,
                            AllowedConsumerProjects = new[]
                            {
                                "allowed-consumer-project-name",
                            },
                        },
                    },
                    Ipv4Enabled = false,
                },
                BackupConfiguration = new Gcp.Sql.Inputs.DatabaseInstanceSettingsBackupConfigurationArgs
                {
                    Enabled = true,
                    BinaryLogEnabled = true,
                },
                AvailabilityType = "REGIONAL",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.sql.DatabaseInstance;
    import com.pulumi.gcp.sql.DatabaseInstanceArgs;
    import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsArgs;
    import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsIpConfigurationArgs;
    import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsBackupConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var main = new DatabaseInstance("main", DatabaseInstanceArgs.builder()        
                .name("psc-enabled-main-instance")
                .databaseVersion("MYSQL_8_0")
                .settings(DatabaseInstanceSettingsArgs.builder()
                    .tier("db-f1-micro")
                    .ipConfiguration(DatabaseInstanceSettingsIpConfigurationArgs.builder()
                        .pscConfigs(DatabaseInstanceSettingsIpConfigurationPscConfigArgs.builder()
                            .pscEnabled(true)
                            .allowedConsumerProjects("allowed-consumer-project-name")
                            .build())
                        .ipv4Enabled(false)
                        .build())
                    .backupConfiguration(DatabaseInstanceSettingsBackupConfigurationArgs.builder()
                        .enabled(true)
                        .binaryLogEnabled(true)
                        .build())
                    .availabilityType("REGIONAL")
                    .build())
                .build());
    
        }
    }
    
    resources:
      main:
        type: gcp:sql:DatabaseInstance
        properties:
          name: psc-enabled-main-instance
          databaseVersion: MYSQL_8_0
          settings:
            tier: db-f1-micro
            ipConfiguration:
              pscConfigs:
                - pscEnabled: true
                  allowedConsumerProjects:
                    - allowed-consumer-project-name
              ipv4Enabled: false
            backupConfiguration:
              enabled: true
              binaryLogEnabled: true
            availabilityType: REGIONAL
    

    Create DatabaseInstance Resource

    new DatabaseInstance(name: string, args: DatabaseInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def DatabaseInstance(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         clone: Optional[DatabaseInstanceCloneArgs] = None,
                         database_version: Optional[str] = None,
                         deletion_protection: Optional[bool] = None,
                         encryption_key_name: Optional[str] = None,
                         instance_type: Optional[str] = None,
                         maintenance_version: Optional[str] = None,
                         master_instance_name: Optional[str] = None,
                         name: Optional[str] = None,
                         project: Optional[str] = None,
                         region: Optional[str] = None,
                         replica_configuration: Optional[DatabaseInstanceReplicaConfigurationArgs] = None,
                         restore_backup_context: Optional[DatabaseInstanceRestoreBackupContextArgs] = None,
                         root_password: Optional[str] = None,
                         settings: Optional[DatabaseInstanceSettingsArgs] = None)
    @overload
    def DatabaseInstance(resource_name: str,
                         args: DatabaseInstanceArgs,
                         opts: Optional[ResourceOptions] = None)
    func NewDatabaseInstance(ctx *Context, name string, args DatabaseInstanceArgs, opts ...ResourceOption) (*DatabaseInstance, error)
    public DatabaseInstance(string name, DatabaseInstanceArgs args, CustomResourceOptions? opts = null)
    public DatabaseInstance(String name, DatabaseInstanceArgs args)
    public DatabaseInstance(String name, DatabaseInstanceArgs args, CustomResourceOptions options)
    
    type: gcp:sql:DatabaseInstance
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args DatabaseInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DatabaseInstanceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DatabaseInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatabaseInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatabaseInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    DatabaseInstance Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The DatabaseInstance resource accepts the following input properties:

    DatabaseVersion string
    The MySQL, PostgreSQL or SQL Server version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, SQLSERVER_2019_WEB. Database Version Policies includes an up-to-date reference of supported versions.
    Clone DatabaseInstanceClone
    The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.
    DeletionProtection bool
    Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a destroy or update command that deletes the instance will fail. Defaults to true.
    EncryptionKeyName string
    The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see this step. That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your key - please see this step.
    InstanceType string
    The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE.
    MaintenanceVersion string
    The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored.
    MasterInstanceName string
    The name of the existing instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.
    Name string
    The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Region string
    The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.


    ReplicaConfiguration DatabaseInstanceReplicaConfiguration
    The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
    RestoreBackupContext DatabaseInstanceRestoreBackupContext
    The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. NOTE: Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.
    RootPassword string
    Initial root password. Can be updated. Required for MS SQL Server.
    Settings DatabaseInstanceSettings
    The settings to use for the database. The configuration is detailed below. Required if clone is not set.
    DatabaseVersion string
    The MySQL, PostgreSQL or SQL Server version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, SQLSERVER_2019_WEB. Database Version Policies includes an up-to-date reference of supported versions.
    Clone DatabaseInstanceCloneArgs
    The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.
    DeletionProtection bool
    Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a destroy or update command that deletes the instance will fail. Defaults to true.
    EncryptionKeyName string
    The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see this step. That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your key - please see this step.
    InstanceType string
    The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE.
    MaintenanceVersion string
    The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored.
    MasterInstanceName string
    The name of the existing instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.
    Name string
    The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Region string
    The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.


    ReplicaConfiguration DatabaseInstanceReplicaConfigurationArgs
    The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
    RestoreBackupContext DatabaseInstanceRestoreBackupContextArgs
    The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. NOTE: Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.
    RootPassword string
    Initial root password. Can be updated. Required for MS SQL Server.
    Settings DatabaseInstanceSettingsArgs
    The settings to use for the database. The configuration is detailed below. Required if clone is not set.
    databaseVersion String
    The MySQL, PostgreSQL or SQL Server version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, SQLSERVER_2019_WEB. Database Version Policies includes an up-to-date reference of supported versions.
    clone_ DatabaseInstanceClone
    The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.
    deletionProtection Boolean
    Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a destroy or update command that deletes the instance will fail. Defaults to true.
    encryptionKeyName String
    The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see this step. That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your key - please see this step.
    instanceType String
    The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE.
    maintenanceVersion String
    The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored.
    masterInstanceName String
    The name of the existing instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.
    name String
    The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.


    replicaConfiguration DatabaseInstanceReplicaConfiguration
    The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
    restoreBackupContext DatabaseInstanceRestoreBackupContext
    The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. NOTE: Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.
    rootPassword String
    Initial root password. Can be updated. Required for MS SQL Server.
    settings DatabaseInstanceSettings
    The settings to use for the database. The configuration is detailed below. Required if clone is not set.
    databaseVersion string
    The MySQL, PostgreSQL or SQL Server version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, SQLSERVER_2019_WEB. Database Version Policies includes an up-to-date reference of supported versions.
    clone DatabaseInstanceClone
    The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.
    deletionProtection boolean
    Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a destroy or update command that deletes the instance will fail. Defaults to true.
    encryptionKeyName string
    The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see this step. That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your key - please see this step.
    instanceType string
    The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE.
    maintenanceVersion string
    The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored.
    masterInstanceName string
    The name of the existing instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.
    name string
    The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region string
    The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.


    replicaConfiguration DatabaseInstanceReplicaConfiguration
    The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
    restoreBackupContext DatabaseInstanceRestoreBackupContext
    The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. NOTE: Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.
    rootPassword string
    Initial root password. Can be updated. Required for MS SQL Server.
    settings DatabaseInstanceSettings
    The settings to use for the database. The configuration is detailed below. Required if clone is not set.
    database_version str
    The MySQL, PostgreSQL or SQL Server version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, SQLSERVER_2019_WEB. Database Version Policies includes an up-to-date reference of supported versions.
    clone DatabaseInstanceCloneArgs
    The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.
    deletion_protection bool
    Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a destroy or update command that deletes the instance will fail. Defaults to true.
    encryption_key_name str
    The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see this step. That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your key - please see this step.
    instance_type str
    The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE.
    maintenance_version str
    The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored.
    master_instance_name str
    The name of the existing instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.
    name str
    The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region str
    The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.


    replica_configuration DatabaseInstanceReplicaConfigurationArgs
    The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
    restore_backup_context DatabaseInstanceRestoreBackupContextArgs
    The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. NOTE: Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.
    root_password str
    Initial root password. Can be updated. Required for MS SQL Server.
    settings DatabaseInstanceSettingsArgs
    The settings to use for the database. The configuration is detailed below. Required if clone is not set.
    databaseVersion String
    The MySQL, PostgreSQL or SQL Server version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, SQLSERVER_2019_WEB. Database Version Policies includes an up-to-date reference of supported versions.
    clone Property Map
    The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.
    deletionProtection Boolean
    Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a destroy or update command that deletes the instance will fail. Defaults to true.
    encryptionKeyName String
    The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see this step. That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your key - please see this step.
    instanceType String
    The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE.
    maintenanceVersion String
    The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored.
    masterInstanceName String
    The name of the existing instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.
    name String
    The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.


    replicaConfiguration Property Map
    The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
    restoreBackupContext Property Map
    The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. NOTE: Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.
    rootPassword String
    Initial root password. Can be updated. Required for MS SQL Server.
    settings Property Map
    The settings to use for the database. The configuration is detailed below. Required if clone is not set.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DatabaseInstance resource produces the following output properties:

    AvailableMaintenanceVersions List<string>
    The list of all maintenance versions applicable on the instance.
    ConnectionName string
    The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
    DnsName string
    The dns name of the instance.
    FirstIpAddress string
    The first IPv4 address of any type assigned.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddresses List<DatabaseInstanceIpAddress>
    PrivateIpAddress string
    The first private (PRIVATE) IPv4 address assigned.
    PscServiceAttachmentLink string
    the URI that points to the service attachment of the instance.
    PublicIpAddress string
    The first public (PRIMARY) IPv4 address assigned.
    SelfLink string
    The URI of the created resource.
    ServerCaCerts List<DatabaseInstanceServerCaCert>
    ServiceAccountEmailAddress string
    The service account email address assigned to the instance.
    AvailableMaintenanceVersions []string
    The list of all maintenance versions applicable on the instance.
    ConnectionName string
    The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
    DnsName string
    The dns name of the instance.
    FirstIpAddress string
    The first IPv4 address of any type assigned.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddresses []DatabaseInstanceIpAddress
    PrivateIpAddress string
    The first private (PRIVATE) IPv4 address assigned.
    PscServiceAttachmentLink string
    the URI that points to the service attachment of the instance.
    PublicIpAddress string
    The first public (PRIMARY) IPv4 address assigned.
    SelfLink string
    The URI of the created resource.
    ServerCaCerts []DatabaseInstanceServerCaCert
    ServiceAccountEmailAddress string
    The service account email address assigned to the instance.
    availableMaintenanceVersions List<String>
    The list of all maintenance versions applicable on the instance.
    connectionName String
    The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
    dnsName String
    The dns name of the instance.
    firstIpAddress String
    The first IPv4 address of any type assigned.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddresses List<DatabaseInstanceIpAddress>
    privateIpAddress String
    The first private (PRIVATE) IPv4 address assigned.
    pscServiceAttachmentLink String
    the URI that points to the service attachment of the instance.
    publicIpAddress String
    The first public (PRIMARY) IPv4 address assigned.
    selfLink String
    The URI of the created resource.
    serverCaCerts List<DatabaseInstanceServerCaCert>
    serviceAccountEmailAddress String
    The service account email address assigned to the instance.
    availableMaintenanceVersions string[]
    The list of all maintenance versions applicable on the instance.
    connectionName string
    The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
    dnsName string
    The dns name of the instance.
    firstIpAddress string
    The first IPv4 address of any type assigned.
    id string
    The provider-assigned unique ID for this managed resource.
    ipAddresses DatabaseInstanceIpAddress[]
    privateIpAddress string
    The first private (PRIVATE) IPv4 address assigned.
    pscServiceAttachmentLink string
    the URI that points to the service attachment of the instance.
    publicIpAddress string
    The first public (PRIMARY) IPv4 address assigned.
    selfLink string
    The URI of the created resource.
    serverCaCerts DatabaseInstanceServerCaCert[]
    serviceAccountEmailAddress string
    The service account email address assigned to the instance.
    available_maintenance_versions Sequence[str]
    The list of all maintenance versions applicable on the instance.
    connection_name str
    The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
    dns_name str
    The dns name of the instance.
    first_ip_address str
    The first IPv4 address of any type assigned.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_addresses Sequence[DatabaseInstanceIpAddress]
    private_ip_address str
    The first private (PRIVATE) IPv4 address assigned.
    psc_service_attachment_link str
    the URI that points to the service attachment of the instance.
    public_ip_address str
    The first public (PRIMARY) IPv4 address assigned.
    self_link str
    The URI of the created resource.
    server_ca_certs Sequence[DatabaseInstanceServerCaCert]
    service_account_email_address str
    The service account email address assigned to the instance.
    availableMaintenanceVersions List<String>
    The list of all maintenance versions applicable on the instance.
    connectionName String
    The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
    dnsName String
    The dns name of the instance.
    firstIpAddress String
    The first IPv4 address of any type assigned.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddresses List<Property Map>
    privateIpAddress String
    The first private (PRIVATE) IPv4 address assigned.
    pscServiceAttachmentLink String
    the URI that points to the service attachment of the instance.
    publicIpAddress String
    The first public (PRIMARY) IPv4 address assigned.
    selfLink String
    The URI of the created resource.
    serverCaCerts List<Property Map>
    serviceAccountEmailAddress String
    The service account email address assigned to the instance.

    Look up Existing DatabaseInstance Resource

    Get an existing DatabaseInstance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DatabaseInstanceState, opts?: CustomResourceOptions): DatabaseInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            available_maintenance_versions: Optional[Sequence[str]] = None,
            clone: Optional[DatabaseInstanceCloneArgs] = None,
            connection_name: Optional[str] = None,
            database_version: Optional[str] = None,
            deletion_protection: Optional[bool] = None,
            dns_name: Optional[str] = None,
            encryption_key_name: Optional[str] = None,
            first_ip_address: Optional[str] = None,
            instance_type: Optional[str] = None,
            ip_addresses: Optional[Sequence[DatabaseInstanceIpAddressArgs]] = None,
            maintenance_version: Optional[str] = None,
            master_instance_name: Optional[str] = None,
            name: Optional[str] = None,
            private_ip_address: Optional[str] = None,
            project: Optional[str] = None,
            psc_service_attachment_link: Optional[str] = None,
            public_ip_address: Optional[str] = None,
            region: Optional[str] = None,
            replica_configuration: Optional[DatabaseInstanceReplicaConfigurationArgs] = None,
            restore_backup_context: Optional[DatabaseInstanceRestoreBackupContextArgs] = None,
            root_password: Optional[str] = None,
            self_link: Optional[str] = None,
            server_ca_certs: Optional[Sequence[DatabaseInstanceServerCaCertArgs]] = None,
            service_account_email_address: Optional[str] = None,
            settings: Optional[DatabaseInstanceSettingsArgs] = None) -> DatabaseInstance
    func GetDatabaseInstance(ctx *Context, name string, id IDInput, state *DatabaseInstanceState, opts ...ResourceOption) (*DatabaseInstance, error)
    public static DatabaseInstance Get(string name, Input<string> id, DatabaseInstanceState? state, CustomResourceOptions? opts = null)
    public static DatabaseInstance get(String name, Output<String> id, DatabaseInstanceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AvailableMaintenanceVersions List<string>
    The list of all maintenance versions applicable on the instance.
    Clone DatabaseInstanceClone
    The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.
    ConnectionName string
    The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
    DatabaseVersion string
    The MySQL, PostgreSQL or SQL Server version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, SQLSERVER_2019_WEB. Database Version Policies includes an up-to-date reference of supported versions.
    DeletionProtection bool
    Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a destroy or update command that deletes the instance will fail. Defaults to true.
    DnsName string
    The dns name of the instance.
    EncryptionKeyName string
    The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see this step. That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your key - please see this step.
    FirstIpAddress string
    The first IPv4 address of any type assigned.
    InstanceType string
    The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE.
    IpAddresses List<DatabaseInstanceIpAddress>
    MaintenanceVersion string
    The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored.
    MasterInstanceName string
    The name of the existing instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.
    Name string
    The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
    PrivateIpAddress string
    The first private (PRIVATE) IPv4 address assigned.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    PscServiceAttachmentLink string
    the URI that points to the service attachment of the instance.
    PublicIpAddress string
    The first public (PRIMARY) IPv4 address assigned.
    Region string
    The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.


    ReplicaConfiguration DatabaseInstanceReplicaConfiguration
    The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
    RestoreBackupContext DatabaseInstanceRestoreBackupContext
    The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. NOTE: Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.
    RootPassword string
    Initial root password. Can be updated. Required for MS SQL Server.
    SelfLink string
    The URI of the created resource.
    ServerCaCerts List<DatabaseInstanceServerCaCert>
    ServiceAccountEmailAddress string
    The service account email address assigned to the instance.
    Settings DatabaseInstanceSettings
    The settings to use for the database. The configuration is detailed below. Required if clone is not set.
    AvailableMaintenanceVersions []string
    The list of all maintenance versions applicable on the instance.
    Clone DatabaseInstanceCloneArgs
    The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.
    ConnectionName string
    The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
    DatabaseVersion string
    The MySQL, PostgreSQL or SQL Server version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, SQLSERVER_2019_WEB. Database Version Policies includes an up-to-date reference of supported versions.
    DeletionProtection bool
    Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a destroy or update command that deletes the instance will fail. Defaults to true.
    DnsName string
    The dns name of the instance.
    EncryptionKeyName string
    The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see this step. That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your key - please see this step.
    FirstIpAddress string
    The first IPv4 address of any type assigned.
    InstanceType string
    The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE.
    IpAddresses []DatabaseInstanceIpAddressArgs
    MaintenanceVersion string
    The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored.
    MasterInstanceName string
    The name of the existing instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.
    Name string
    The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
    PrivateIpAddress string
    The first private (PRIVATE) IPv4 address assigned.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    PscServiceAttachmentLink string
    the URI that points to the service attachment of the instance.
    PublicIpAddress string
    The first public (PRIMARY) IPv4 address assigned.
    Region string
    The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.


    ReplicaConfiguration DatabaseInstanceReplicaConfigurationArgs
    The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
    RestoreBackupContext DatabaseInstanceRestoreBackupContextArgs
    The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. NOTE: Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.
    RootPassword string
    Initial root password. Can be updated. Required for MS SQL Server.
    SelfLink string
    The URI of the created resource.
    ServerCaCerts []DatabaseInstanceServerCaCertArgs
    ServiceAccountEmailAddress string
    The service account email address assigned to the instance.
    Settings DatabaseInstanceSettingsArgs
    The settings to use for the database. The configuration is detailed below. Required if clone is not set.
    availableMaintenanceVersions List<String>
    The list of all maintenance versions applicable on the instance.
    clone_ DatabaseInstanceClone
    The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.
    connectionName String
    The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
    databaseVersion String
    The MySQL, PostgreSQL or SQL Server version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, SQLSERVER_2019_WEB. Database Version Policies includes an up-to-date reference of supported versions.
    deletionProtection Boolean
    Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a destroy or update command that deletes the instance will fail. Defaults to true.
    dnsName String
    The dns name of the instance.
    encryptionKeyName String
    The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see this step. That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your key - please see this step.
    firstIpAddress String
    The first IPv4 address of any type assigned.
    instanceType String
    The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE.
    ipAddresses List<DatabaseInstanceIpAddress>
    maintenanceVersion String
    The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored.
    masterInstanceName String
    The name of the existing instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.
    name String
    The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
    privateIpAddress String
    The first private (PRIVATE) IPv4 address assigned.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pscServiceAttachmentLink String
    the URI that points to the service attachment of the instance.
    publicIpAddress String
    The first public (PRIMARY) IPv4 address assigned.
    region String
    The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.


    replicaConfiguration DatabaseInstanceReplicaConfiguration
    The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
    restoreBackupContext DatabaseInstanceRestoreBackupContext
    The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. NOTE: Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.
    rootPassword String
    Initial root password. Can be updated. Required for MS SQL Server.
    selfLink String
    The URI of the created resource.
    serverCaCerts List<DatabaseInstanceServerCaCert>
    serviceAccountEmailAddress String
    The service account email address assigned to the instance.
    settings DatabaseInstanceSettings
    The settings to use for the database. The configuration is detailed below. Required if clone is not set.
    availableMaintenanceVersions string[]
    The list of all maintenance versions applicable on the instance.
    clone DatabaseInstanceClone
    The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.
    connectionName string
    The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
    databaseVersion string
    The MySQL, PostgreSQL or SQL Server version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, SQLSERVER_2019_WEB. Database Version Policies includes an up-to-date reference of supported versions.
    deletionProtection boolean
    Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a destroy or update command that deletes the instance will fail. Defaults to true.
    dnsName string
    The dns name of the instance.
    encryptionKeyName string
    The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see this step. That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your key - please see this step.
    firstIpAddress string
    The first IPv4 address of any type assigned.
    instanceType string
    The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE.
    ipAddresses DatabaseInstanceIpAddress[]
    maintenanceVersion string
    The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored.
    masterInstanceName string
    The name of the existing instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.
    name string
    The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
    privateIpAddress string
    The first private (PRIVATE) IPv4 address assigned.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pscServiceAttachmentLink string
    the URI that points to the service attachment of the instance.
    publicIpAddress string
    The first public (PRIMARY) IPv4 address assigned.
    region string
    The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.


    replicaConfiguration DatabaseInstanceReplicaConfiguration
    The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
    restoreBackupContext DatabaseInstanceRestoreBackupContext
    The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. NOTE: Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.
    rootPassword string
    Initial root password. Can be updated. Required for MS SQL Server.
    selfLink string
    The URI of the created resource.
    serverCaCerts DatabaseInstanceServerCaCert[]
    serviceAccountEmailAddress string
    The service account email address assigned to the instance.
    settings DatabaseInstanceSettings
    The settings to use for the database. The configuration is detailed below. Required if clone is not set.
    available_maintenance_versions Sequence[str]
    The list of all maintenance versions applicable on the instance.
    clone DatabaseInstanceCloneArgs
    The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.
    connection_name str
    The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
    database_version str
    The MySQL, PostgreSQL or SQL Server version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, SQLSERVER_2019_WEB. Database Version Policies includes an up-to-date reference of supported versions.
    deletion_protection bool
    Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a destroy or update command that deletes the instance will fail. Defaults to true.
    dns_name str
    The dns name of the instance.
    encryption_key_name str
    The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see this step. That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your key - please see this step.
    first_ip_address str
    The first IPv4 address of any type assigned.
    instance_type str
    The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE.
    ip_addresses Sequence[DatabaseInstanceIpAddressArgs]
    maintenance_version str
    The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored.
    master_instance_name str
    The name of the existing instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.
    name str
    The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
    private_ip_address str
    The first private (PRIVATE) IPv4 address assigned.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    psc_service_attachment_link str
    the URI that points to the service attachment of the instance.
    public_ip_address str
    The first public (PRIMARY) IPv4 address assigned.
    region str
    The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.


    replica_configuration DatabaseInstanceReplicaConfigurationArgs
    The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
    restore_backup_context DatabaseInstanceRestoreBackupContextArgs
    The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. NOTE: Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.
    root_password str
    Initial root password. Can be updated. Required for MS SQL Server.
    self_link str
    The URI of the created resource.
    server_ca_certs Sequence[DatabaseInstanceServerCaCertArgs]
    service_account_email_address str
    The service account email address assigned to the instance.
    settings DatabaseInstanceSettingsArgs
    The settings to use for the database. The configuration is detailed below. Required if clone is not set.
    availableMaintenanceVersions List<String>
    The list of all maintenance versions applicable on the instance.
    clone Property Map
    The context needed to create this instance as a clone of another instance. When this field is set during resource creation, this provider will attempt to clone another instance as indicated in the context. The configuration is detailed below.
    connectionName String
    The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
    databaseVersion String
    The MySQL, PostgreSQL or SQL Server version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, SQLSERVER_2019_WEB. Database Version Policies includes an up-to-date reference of supported versions.
    deletionProtection Boolean
    Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a destroy or update command that deletes the instance will fail. Defaults to true.
    dnsName String
    The dns name of the instance.
    encryptionKeyName String
    The full path to the encryption key used for the CMEK disk encryption. Setting up disk encryption currently requires manual steps outside of this provider. The provided key must be in the same region as the SQL instance. In order to use this feature, a special kind of service account must be created and granted permission on this key. This step can currently only be done manually, please see this step. That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your key - please see this step.
    firstIpAddress String
    The first IPv4 address of any type assigned.
    instanceType String
    The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE.
    ipAddresses List<Property Map>
    maintenanceVersion String
    The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored.
    masterInstanceName String
    The name of the existing instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.
    name String
    The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
    privateIpAddress String
    The first private (PRIVATE) IPv4 address assigned.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pscServiceAttachmentLink String
    the URI that points to the service attachment of the instance.
    publicIpAddress String
    The first public (PRIMARY) IPv4 address assigned.
    region String
    The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.


    replicaConfiguration Property Map
    The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
    restoreBackupContext Property Map
    The context needed to restore the database to a backup run. This field will cause the provider to trigger the database to restore from the backup run indicated. The configuration is detailed below. NOTE: Restoring from a backup is an imperative action and not recommended via this provider. Adding or modifying this block during resource creation/update will trigger the restore action after the resource is created/updated.
    rootPassword String
    Initial root password. Can be updated. Required for MS SQL Server.
    selfLink String
    The URI of the created resource.
    serverCaCerts List<Property Map>
    serviceAccountEmailAddress String
    The service account email address assigned to the instance.
    settings Property Map
    The settings to use for the database. The configuration is detailed below. Required if clone is not set.

    Supporting Types

    DatabaseInstanceClone, DatabaseInstanceCloneArgs

    SourceInstanceName string
    Name of the source instance which will be cloned.
    AllocatedIpRange string
    The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
    DatabaseNames List<string>
    (SQL Server only, use with point_in_time) Clone only the specified databases from the source instance. Clone all databases if empty.
    PointInTime string

    The timestamp of the point in time that should be restored.

    A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

    PreferredZone string
    (Point-in-time recovery for PostgreSQL only) Clone to an instance in the specified zone. If no zone is specified, clone to the same zone as the source instance. clone-unavailable-instance
    SourceInstanceName string
    Name of the source instance which will be cloned.
    AllocatedIpRange string
    The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
    DatabaseNames []string
    (SQL Server only, use with point_in_time) Clone only the specified databases from the source instance. Clone all databases if empty.
    PointInTime string

    The timestamp of the point in time that should be restored.

    A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

    PreferredZone string
    (Point-in-time recovery for PostgreSQL only) Clone to an instance in the specified zone. If no zone is specified, clone to the same zone as the source instance. clone-unavailable-instance
    sourceInstanceName String
    Name of the source instance which will be cloned.
    allocatedIpRange String
    The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
    databaseNames List<String>
    (SQL Server only, use with point_in_time) Clone only the specified databases from the source instance. Clone all databases if empty.
    pointInTime String

    The timestamp of the point in time that should be restored.

    A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

    preferredZone String
    (Point-in-time recovery for PostgreSQL only) Clone to an instance in the specified zone. If no zone is specified, clone to the same zone as the source instance. clone-unavailable-instance
    sourceInstanceName string
    Name of the source instance which will be cloned.
    allocatedIpRange string
    The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
    databaseNames string[]
    (SQL Server only, use with point_in_time) Clone only the specified databases from the source instance. Clone all databases if empty.
    pointInTime string

    The timestamp of the point in time that should be restored.

    A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

    preferredZone string
    (Point-in-time recovery for PostgreSQL only) Clone to an instance in the specified zone. If no zone is specified, clone to the same zone as the source instance. clone-unavailable-instance
    source_instance_name str
    Name of the source instance which will be cloned.
    allocated_ip_range str
    The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
    database_names Sequence[str]
    (SQL Server only, use with point_in_time) Clone only the specified databases from the source instance. Clone all databases if empty.
    point_in_time str

    The timestamp of the point in time that should be restored.

    A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

    preferred_zone str
    (Point-in-time recovery for PostgreSQL only) Clone to an instance in the specified zone. If no zone is specified, clone to the same zone as the source instance. clone-unavailable-instance
    sourceInstanceName String
    Name of the source instance which will be cloned.
    allocatedIpRange String
    The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
    databaseNames List<String>
    (SQL Server only, use with point_in_time) Clone only the specified databases from the source instance. Clone all databases if empty.
    pointInTime String

    The timestamp of the point in time that should be restored.

    A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

    preferredZone String
    (Point-in-time recovery for PostgreSQL only) Clone to an instance in the specified zone. If no zone is specified, clone to the same zone as the source instance. clone-unavailable-instance

    DatabaseInstanceIpAddress, DatabaseInstanceIpAddressArgs

    IpAddress string
    TimeToRetire string
    Type string
    IpAddress string
    TimeToRetire string
    Type string
    ipAddress String
    timeToRetire String
    type String
    ipAddress string
    timeToRetire string
    type string
    ipAddress String
    timeToRetire String
    type String

    DatabaseInstanceReplicaConfiguration, DatabaseInstanceReplicaConfigurationArgs

    CaCertificate string
    PEM representation of the trusted CA's x509 certificate.
    ClientCertificate string
    PEM representation of the replica's x509 certificate.
    ClientKey string
    PEM representation of the replica's private key. The corresponding public key in encoded in the client_certificate.
    ConnectRetryInterval int
    The number of seconds between connect retries. MySQL's default is 60 seconds.
    DumpFilePath string
    Path to a SQL file in GCS from which replica instances are created. Format is gs://bucket/filename.
    FailoverTarget bool

    Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance.

    NOTE: Not supported for Postgres database.

    MasterHeartbeatPeriod int
    Time in ms between replication heartbeats.
    Password string
    Password for the replication connection.
    SslCipher string
    Permissible ciphers for use in SSL encryption.
    Username string
    Username for replication connection.
    VerifyServerCertificate bool
    True if the master's common name value is checked during the SSL handshake.
    CaCertificate string
    PEM representation of the trusted CA's x509 certificate.
    ClientCertificate string
    PEM representation of the replica's x509 certificate.
    ClientKey string
    PEM representation of the replica's private key. The corresponding public key in encoded in the client_certificate.
    ConnectRetryInterval int
    The number of seconds between connect retries. MySQL's default is 60 seconds.
    DumpFilePath string
    Path to a SQL file in GCS from which replica instances are created. Format is gs://bucket/filename.
    FailoverTarget bool

    Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance.

    NOTE: Not supported for Postgres database.

    MasterHeartbeatPeriod int
    Time in ms between replication heartbeats.
    Password string
    Password for the replication connection.
    SslCipher string
    Permissible ciphers for use in SSL encryption.
    Username string
    Username for replication connection.
    VerifyServerCertificate bool
    True if the master's common name value is checked during the SSL handshake.
    caCertificate String
    PEM representation of the trusted CA's x509 certificate.
    clientCertificate String
    PEM representation of the replica's x509 certificate.
    clientKey String
    PEM representation of the replica's private key. The corresponding public key in encoded in the client_certificate.
    connectRetryInterval Integer
    The number of seconds between connect retries. MySQL's default is 60 seconds.
    dumpFilePath String
    Path to a SQL file in GCS from which replica instances are created. Format is gs://bucket/filename.
    failoverTarget Boolean

    Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance.

    NOTE: Not supported for Postgres database.

    masterHeartbeatPeriod Integer
    Time in ms between replication heartbeats.
    password String
    Password for the replication connection.
    sslCipher String
    Permissible ciphers for use in SSL encryption.
    username String
    Username for replication connection.
    verifyServerCertificate Boolean
    True if the master's common name value is checked during the SSL handshake.
    caCertificate string
    PEM representation of the trusted CA's x509 certificate.
    clientCertificate string
    PEM representation of the replica's x509 certificate.
    clientKey string
    PEM representation of the replica's private key. The corresponding public key in encoded in the client_certificate.
    connectRetryInterval number
    The number of seconds between connect retries. MySQL's default is 60 seconds.
    dumpFilePath string
    Path to a SQL file in GCS from which replica instances are created. Format is gs://bucket/filename.
    failoverTarget boolean

    Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance.

    NOTE: Not supported for Postgres database.

    masterHeartbeatPeriod number
    Time in ms between replication heartbeats.
    password string
    Password for the replication connection.
    sslCipher string
    Permissible ciphers for use in SSL encryption.
    username string
    Username for replication connection.
    verifyServerCertificate boolean
    True if the master's common name value is checked during the SSL handshake.
    ca_certificate str
    PEM representation of the trusted CA's x509 certificate.
    client_certificate str
    PEM representation of the replica's x509 certificate.
    client_key str
    PEM representation of the replica's private key. The corresponding public key in encoded in the client_certificate.
    connect_retry_interval int
    The number of seconds between connect retries. MySQL's default is 60 seconds.
    dump_file_path str
    Path to a SQL file in GCS from which replica instances are created. Format is gs://bucket/filename.
    failover_target bool

    Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance.

    NOTE: Not supported for Postgres database.

    master_heartbeat_period int
    Time in ms between replication heartbeats.
    password str
    Password for the replication connection.
    ssl_cipher str
    Permissible ciphers for use in SSL encryption.
    username str
    Username for replication connection.
    verify_server_certificate bool
    True if the master's common name value is checked during the SSL handshake.
    caCertificate String
    PEM representation of the trusted CA's x509 certificate.
    clientCertificate String
    PEM representation of the replica's x509 certificate.
    clientKey String
    PEM representation of the replica's private key. The corresponding public key in encoded in the client_certificate.
    connectRetryInterval Number
    The number of seconds between connect retries. MySQL's default is 60 seconds.
    dumpFilePath String
    Path to a SQL file in GCS from which replica instances are created. Format is gs://bucket/filename.
    failoverTarget Boolean

    Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance.

    NOTE: Not supported for Postgres database.

    masterHeartbeatPeriod Number
    Time in ms between replication heartbeats.
    password String
    Password for the replication connection.
    sslCipher String
    Permissible ciphers for use in SSL encryption.
    username String
    Username for replication connection.
    verifyServerCertificate Boolean
    True if the master's common name value is checked during the SSL handshake.

    DatabaseInstanceRestoreBackupContext, DatabaseInstanceRestoreBackupContextArgs

    BackupRunId int
    The ID of the backup run to restore from.
    InstanceId string
    The ID of the instance that the backup was taken from. If left empty, this instance's ID will be used.
    Project string
    The full project ID of the source instance.`
    BackupRunId int
    The ID of the backup run to restore from.
    InstanceId string
    The ID of the instance that the backup was taken from. If left empty, this instance's ID will be used.
    Project string
    The full project ID of the source instance.`
    backupRunId Integer
    The ID of the backup run to restore from.
    instanceId String
    The ID of the instance that the backup was taken from. If left empty, this instance's ID will be used.
    project String
    The full project ID of the source instance.`
    backupRunId number
    The ID of the backup run to restore from.
    instanceId string
    The ID of the instance that the backup was taken from. If left empty, this instance's ID will be used.
    project string
    The full project ID of the source instance.`
    backup_run_id int
    The ID of the backup run to restore from.
    instance_id str
    The ID of the instance that the backup was taken from. If left empty, this instance's ID will be used.
    project str
    The full project ID of the source instance.`
    backupRunId Number
    The ID of the backup run to restore from.
    instanceId String
    The ID of the instance that the backup was taken from. If left empty, this instance's ID will be used.
    project String
    The full project ID of the source instance.`

    DatabaseInstanceServerCaCert, DatabaseInstanceServerCaCertArgs

    Cert string
    The CA Certificate used to connect to the SQL Instance via SSL.
    CommonName string
    The CN valid for the CA Cert.
    CreateTime string
    Creation time of the CA Cert.
    ExpirationTime string
    The RFC 3339 formatted date time string indicating when this whitelist expires.
    Sha1Fingerprint string
    SHA Fingerprint of the CA Cert.
    Cert string
    The CA Certificate used to connect to the SQL Instance via SSL.
    CommonName string
    The CN valid for the CA Cert.
    CreateTime string
    Creation time of the CA Cert.
    ExpirationTime string
    The RFC 3339 formatted date time string indicating when this whitelist expires.
    Sha1Fingerprint string
    SHA Fingerprint of the CA Cert.
    cert String
    The CA Certificate used to connect to the SQL Instance via SSL.
    commonName String
    The CN valid for the CA Cert.
    createTime String
    Creation time of the CA Cert.
    expirationTime String
    The RFC 3339 formatted date time string indicating when this whitelist expires.
    sha1Fingerprint String
    SHA Fingerprint of the CA Cert.
    cert string
    The CA Certificate used to connect to the SQL Instance via SSL.
    commonName string
    The CN valid for the CA Cert.
    createTime string
    Creation time of the CA Cert.
    expirationTime string
    The RFC 3339 formatted date time string indicating when this whitelist expires.
    sha1Fingerprint string
    SHA Fingerprint of the CA Cert.
    cert str
    The CA Certificate used to connect to the SQL Instance via SSL.
    common_name str
    The CN valid for the CA Cert.
    create_time str
    Creation time of the CA Cert.
    expiration_time str
    The RFC 3339 formatted date time string indicating when this whitelist expires.
    sha1_fingerprint str
    SHA Fingerprint of the CA Cert.
    cert String
    The CA Certificate used to connect to the SQL Instance via SSL.
    commonName String
    The CN valid for the CA Cert.
    createTime String
    Creation time of the CA Cert.
    expirationTime String
    The RFC 3339 formatted date time string indicating when this whitelist expires.
    sha1Fingerprint String
    SHA Fingerprint of the CA Cert.

    DatabaseInstanceSettings, DatabaseInstanceSettingsArgs

    Tier string
    The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.
    ActivationPolicy string
    This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND.
    ActiveDirectoryConfig DatabaseInstanceSettingsActiveDirectoryConfig
    AdvancedMachineFeatures DatabaseInstanceSettingsAdvancedMachineFeatures
    AvailabilityType string
    The availability type of the Cloud SQL instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure that settings.backup_configuration.enabled is set to true. For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. For Postgres and SQL Server instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled is set to true. Defaults to ZONAL.
    BackupConfiguration DatabaseInstanceSettingsBackupConfiguration
    Collation string
    The name of server instance collation.
    ConnectorEnforcement string
    Specifies if connections must use Cloud SQL connectors.
    DataCacheConfig DatabaseInstanceSettingsDataCacheConfig
    Data cache configurations.
    DatabaseFlags List<DatabaseInstanceSettingsDatabaseFlag>
    DeletionProtectionEnabled bool
    Configuration to protect against accidental instance deletion.
    DenyMaintenancePeriod DatabaseInstanceSettingsDenyMaintenancePeriod
    DiskAutoresize bool
    Enables auto-resizing of the storage size. Defaults to true.
    DiskAutoresizeLimit int
    The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
    DiskSize int
    The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB.
    DiskType string
    The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD.
    Edition string
    The edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS.
    InsightsConfig DatabaseInstanceSettingsInsightsConfig
    Configuration of Query Insights.
    IpConfiguration DatabaseInstanceSettingsIpConfiguration
    LocationPreference DatabaseInstanceSettingsLocationPreference
    MaintenanceWindow DatabaseInstanceSettingsMaintenanceWindow
    Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
    PasswordValidationPolicy DatabaseInstanceSettingsPasswordValidationPolicy
    PricingPlan string
    Pricing plan for this instance, can only be PER_USE.
    SqlServerAuditConfig DatabaseInstanceSettingsSqlServerAuditConfig
    TimeZone string
    The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
    UserLabels Dictionary<string, string>
    A set of key/value user label pairs to assign to the instance.
    Version int
    Used to make sure changes to the settings block are atomic.
    Tier string
    The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.
    ActivationPolicy string
    This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND.
    ActiveDirectoryConfig DatabaseInstanceSettingsActiveDirectoryConfig
    AdvancedMachineFeatures DatabaseInstanceSettingsAdvancedMachineFeatures
    AvailabilityType string
    The availability type of the Cloud SQL instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure that settings.backup_configuration.enabled is set to true. For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. For Postgres and SQL Server instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled is set to true. Defaults to ZONAL.
    BackupConfiguration DatabaseInstanceSettingsBackupConfiguration
    Collation string
    The name of server instance collation.
    ConnectorEnforcement string
    Specifies if connections must use Cloud SQL connectors.
    DataCacheConfig DatabaseInstanceSettingsDataCacheConfig
    Data cache configurations.
    DatabaseFlags []DatabaseInstanceSettingsDatabaseFlag
    DeletionProtectionEnabled bool
    Configuration to protect against accidental instance deletion.
    DenyMaintenancePeriod DatabaseInstanceSettingsDenyMaintenancePeriod
    DiskAutoresize bool
    Enables auto-resizing of the storage size. Defaults to true.
    DiskAutoresizeLimit int
    The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
    DiskSize int
    The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB.
    DiskType string
    The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD.
    Edition string
    The edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS.
    InsightsConfig DatabaseInstanceSettingsInsightsConfig
    Configuration of Query Insights.
    IpConfiguration DatabaseInstanceSettingsIpConfiguration
    LocationPreference DatabaseInstanceSettingsLocationPreference
    MaintenanceWindow DatabaseInstanceSettingsMaintenanceWindow
    Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
    PasswordValidationPolicy DatabaseInstanceSettingsPasswordValidationPolicy
    PricingPlan string
    Pricing plan for this instance, can only be PER_USE.
    SqlServerAuditConfig DatabaseInstanceSettingsSqlServerAuditConfig
    TimeZone string
    The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
    UserLabels map[string]string
    A set of key/value user label pairs to assign to the instance.
    Version int
    Used to make sure changes to the settings block are atomic.
    tier String
    The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.
    activationPolicy String
    This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND.
    activeDirectoryConfig DatabaseInstanceSettingsActiveDirectoryConfig
    advancedMachineFeatures DatabaseInstanceSettingsAdvancedMachineFeatures
    availabilityType String
    The availability type of the Cloud SQL instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure that settings.backup_configuration.enabled is set to true. For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. For Postgres and SQL Server instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled is set to true. Defaults to ZONAL.
    backupConfiguration DatabaseInstanceSettingsBackupConfiguration
    collation String
    The name of server instance collation.
    connectorEnforcement String
    Specifies if connections must use Cloud SQL connectors.
    dataCacheConfig DatabaseInstanceSettingsDataCacheConfig
    Data cache configurations.
    databaseFlags List<DatabaseInstanceSettingsDatabaseFlag>
    deletionProtectionEnabled Boolean
    Configuration to protect against accidental instance deletion.
    denyMaintenancePeriod DatabaseInstanceSettingsDenyMaintenancePeriod
    diskAutoresize Boolean
    Enables auto-resizing of the storage size. Defaults to true.
    diskAutoresizeLimit Integer
    The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
    diskSize Integer
    The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB.
    diskType String
    The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD.
    edition String
    The edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS.
    insightsConfig DatabaseInstanceSettingsInsightsConfig
    Configuration of Query Insights.
    ipConfiguration DatabaseInstanceSettingsIpConfiguration
    locationPreference DatabaseInstanceSettingsLocationPreference
    maintenanceWindow DatabaseInstanceSettingsMaintenanceWindow
    Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
    passwordValidationPolicy DatabaseInstanceSettingsPasswordValidationPolicy
    pricingPlan String
    Pricing plan for this instance, can only be PER_USE.
    sqlServerAuditConfig DatabaseInstanceSettingsSqlServerAuditConfig
    timeZone String
    The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
    userLabels Map<String,String>
    A set of key/value user label pairs to assign to the instance.
    version Integer
    Used to make sure changes to the settings block are atomic.
    tier string
    The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.
    activationPolicy string
    This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND.
    activeDirectoryConfig DatabaseInstanceSettingsActiveDirectoryConfig
    advancedMachineFeatures DatabaseInstanceSettingsAdvancedMachineFeatures
    availabilityType string
    The availability type of the Cloud SQL instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure that settings.backup_configuration.enabled is set to true. For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. For Postgres and SQL Server instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled is set to true. Defaults to ZONAL.
    backupConfiguration DatabaseInstanceSettingsBackupConfiguration
    collation string
    The name of server instance collation.
    connectorEnforcement string
    Specifies if connections must use Cloud SQL connectors.
    dataCacheConfig DatabaseInstanceSettingsDataCacheConfig
    Data cache configurations.
    databaseFlags DatabaseInstanceSettingsDatabaseFlag[]
    deletionProtectionEnabled boolean
    Configuration to protect against accidental instance deletion.
    denyMaintenancePeriod DatabaseInstanceSettingsDenyMaintenancePeriod
    diskAutoresize boolean
    Enables auto-resizing of the storage size. Defaults to true.
    diskAutoresizeLimit number
    The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
    diskSize number
    The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB.
    diskType string
    The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD.
    edition string
    The edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS.
    insightsConfig DatabaseInstanceSettingsInsightsConfig
    Configuration of Query Insights.
    ipConfiguration DatabaseInstanceSettingsIpConfiguration
    locationPreference DatabaseInstanceSettingsLocationPreference
    maintenanceWindow DatabaseInstanceSettingsMaintenanceWindow
    Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
    passwordValidationPolicy DatabaseInstanceSettingsPasswordValidationPolicy
    pricingPlan string
    Pricing plan for this instance, can only be PER_USE.
    sqlServerAuditConfig DatabaseInstanceSettingsSqlServerAuditConfig
    timeZone string
    The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
    userLabels {[key: string]: string}
    A set of key/value user label pairs to assign to the instance.
    version number
    Used to make sure changes to the settings block are atomic.
    tier str
    The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.
    activation_policy str
    This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND.
    active_directory_config DatabaseInstanceSettingsActiveDirectoryConfig
    advanced_machine_features DatabaseInstanceSettingsAdvancedMachineFeatures
    availability_type str
    The availability type of the Cloud SQL instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure that settings.backup_configuration.enabled is set to true. For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. For Postgres and SQL Server instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled is set to true. Defaults to ZONAL.
    backup_configuration DatabaseInstanceSettingsBackupConfiguration
    collation str
    The name of server instance collation.
    connector_enforcement str
    Specifies if connections must use Cloud SQL connectors.
    data_cache_config DatabaseInstanceSettingsDataCacheConfig
    Data cache configurations.
    database_flags Sequence[DatabaseInstanceSettingsDatabaseFlag]
    deletion_protection_enabled bool
    Configuration to protect against accidental instance deletion.
    deny_maintenance_period DatabaseInstanceSettingsDenyMaintenancePeriod
    disk_autoresize bool
    Enables auto-resizing of the storage size. Defaults to true.
    disk_autoresize_limit int
    The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
    disk_size int
    The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB.
    disk_type str
    The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD.
    edition str
    The edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS.
    insights_config DatabaseInstanceSettingsInsightsConfig
    Configuration of Query Insights.
    ip_configuration DatabaseInstanceSettingsIpConfiguration
    location_preference DatabaseInstanceSettingsLocationPreference
    maintenance_window DatabaseInstanceSettingsMaintenanceWindow
    Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
    password_validation_policy DatabaseInstanceSettingsPasswordValidationPolicy
    pricing_plan str
    Pricing plan for this instance, can only be PER_USE.
    sql_server_audit_config DatabaseInstanceSettingsSqlServerAuditConfig
    time_zone str
    The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
    user_labels Mapping[str, str]
    A set of key/value user label pairs to assign to the instance.
    version int
    Used to make sure changes to the settings block are atomic.
    tier String
    The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.
    activationPolicy String
    This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND.
    activeDirectoryConfig Property Map
    advancedMachineFeatures Property Map
    availabilityType String
    The availability type of the Cloud SQL instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure that settings.backup_configuration.enabled is set to true. For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. For Postgres and SQL Server instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled is set to true. Defaults to ZONAL.
    backupConfiguration Property Map
    collation String
    The name of server instance collation.
    connectorEnforcement String
    Specifies if connections must use Cloud SQL connectors.
    dataCacheConfig Property Map
    Data cache configurations.
    databaseFlags List<Property Map>
    deletionProtectionEnabled Boolean
    Configuration to protect against accidental instance deletion.
    denyMaintenancePeriod Property Map
    diskAutoresize Boolean
    Enables auto-resizing of the storage size. Defaults to true.
    diskAutoresizeLimit Number
    The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
    diskSize Number
    The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB.
    diskType String
    The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD.
    edition String
    The edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS.
    insightsConfig Property Map
    Configuration of Query Insights.
    ipConfiguration Property Map
    locationPreference Property Map
    maintenanceWindow Property Map
    Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
    passwordValidationPolicy Property Map
    pricingPlan String
    Pricing plan for this instance, can only be PER_USE.
    sqlServerAuditConfig Property Map
    timeZone String
    The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
    userLabels Map<String>
    A set of key/value user label pairs to assign to the instance.
    version Number
    Used to make sure changes to the settings block are atomic.

    DatabaseInstanceSettingsActiveDirectoryConfig, DatabaseInstanceSettingsActiveDirectoryConfigArgs

    Domain string
    The domain name for the active directory (e.g., mydomain.com). Can only be used with SQL Server.
    Domain string
    The domain name for the active directory (e.g., mydomain.com). Can only be used with SQL Server.
    domain String
    The domain name for the active directory (e.g., mydomain.com). Can only be used with SQL Server.
    domain string
    The domain name for the active directory (e.g., mydomain.com). Can only be used with SQL Server.
    domain str
    The domain name for the active directory (e.g., mydomain.com). Can only be used with SQL Server.
    domain String
    The domain name for the active directory (e.g., mydomain.com). Can only be used with SQL Server.

    DatabaseInstanceSettingsAdvancedMachineFeatures, DatabaseInstanceSettingsAdvancedMachineFeaturesArgs

    ThreadsPerCore int
    The number of threads per core. The value of this flag can be 1 or 2. To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances. See smt for more details.
    ThreadsPerCore int
    The number of threads per core. The value of this flag can be 1 or 2. To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances. See smt for more details.
    threadsPerCore Integer
    The number of threads per core. The value of this flag can be 1 or 2. To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances. See smt for more details.
    threadsPerCore number
    The number of threads per core. The value of this flag can be 1 or 2. To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances. See smt for more details.
    threads_per_core int
    The number of threads per core. The value of this flag can be 1 or 2. To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances. See smt for more details.
    threadsPerCore Number
    The number of threads per core. The value of this flag can be 1 or 2. To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances. See smt for more details.

    DatabaseInstanceSettingsBackupConfiguration, DatabaseInstanceSettingsBackupConfigurationArgs

    BackupRetentionSettings DatabaseInstanceSettingsBackupConfigurationBackupRetentionSettings
    Backup retention settings. The configuration is detailed below.
    BinaryLogEnabled bool
    True if binary logging is enabled. Can only be used with MySQL.
    Enabled bool
    True if backup configuration is enabled.
    Location string
    The region where the backup will be stored
    PointInTimeRecoveryEnabled bool
    True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances.
    StartTime string
    HH:MM format time indicating when backup configuration starts.
    TransactionLogRetentionDays int
    The number of days of transaction logs we retain for point in time restore, from 1-7. For PostgreSQL Enterprise Plus instances, the number of days of retained transaction logs can be set from 1 to 35.
    BackupRetentionSettings DatabaseInstanceSettingsBackupConfigurationBackupRetentionSettings
    Backup retention settings. The configuration is detailed below.
    BinaryLogEnabled bool
    True if binary logging is enabled. Can only be used with MySQL.
    Enabled bool
    True if backup configuration is enabled.
    Location string
    The region where the backup will be stored
    PointInTimeRecoveryEnabled bool
    True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances.
    StartTime string
    HH:MM format time indicating when backup configuration starts.
    TransactionLogRetentionDays int
    The number of days of transaction logs we retain for point in time restore, from 1-7. For PostgreSQL Enterprise Plus instances, the number of days of retained transaction logs can be set from 1 to 35.
    backupRetentionSettings DatabaseInstanceSettingsBackupConfigurationBackupRetentionSettings
    Backup retention settings. The configuration is detailed below.
    binaryLogEnabled Boolean
    True if binary logging is enabled. Can only be used with MySQL.
    enabled Boolean
    True if backup configuration is enabled.
    location String
    The region where the backup will be stored
    pointInTimeRecoveryEnabled Boolean
    True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances.
    startTime String
    HH:MM format time indicating when backup configuration starts.
    transactionLogRetentionDays Integer
    The number of days of transaction logs we retain for point in time restore, from 1-7. For PostgreSQL Enterprise Plus instances, the number of days of retained transaction logs can be set from 1 to 35.
    backupRetentionSettings DatabaseInstanceSettingsBackupConfigurationBackupRetentionSettings
    Backup retention settings. The configuration is detailed below.
    binaryLogEnabled boolean
    True if binary logging is enabled. Can only be used with MySQL.
    enabled boolean
    True if backup configuration is enabled.
    location string
    The region where the backup will be stored
    pointInTimeRecoveryEnabled boolean
    True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances.
    startTime string
    HH:MM format time indicating when backup configuration starts.
    transactionLogRetentionDays number
    The number of days of transaction logs we retain for point in time restore, from 1-7. For PostgreSQL Enterprise Plus instances, the number of days of retained transaction logs can be set from 1 to 35.
    backup_retention_settings DatabaseInstanceSettingsBackupConfigurationBackupRetentionSettings
    Backup retention settings. The configuration is detailed below.
    binary_log_enabled bool
    True if binary logging is enabled. Can only be used with MySQL.
    enabled bool
    True if backup configuration is enabled.
    location str
    The region where the backup will be stored
    point_in_time_recovery_enabled bool
    True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances.
    start_time str
    HH:MM format time indicating when backup configuration starts.
    transaction_log_retention_days int
    The number of days of transaction logs we retain for point in time restore, from 1-7. For PostgreSQL Enterprise Plus instances, the number of days of retained transaction logs can be set from 1 to 35.
    backupRetentionSettings Property Map
    Backup retention settings. The configuration is detailed below.
    binaryLogEnabled Boolean
    True if binary logging is enabled. Can only be used with MySQL.
    enabled Boolean
    True if backup configuration is enabled.
    location String
    The region where the backup will be stored
    pointInTimeRecoveryEnabled Boolean
    True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances.
    startTime String
    HH:MM format time indicating when backup configuration starts.
    transactionLogRetentionDays Number
    The number of days of transaction logs we retain for point in time restore, from 1-7. For PostgreSQL Enterprise Plus instances, the number of days of retained transaction logs can be set from 1 to 35.

    DatabaseInstanceSettingsBackupConfigurationBackupRetentionSettings, DatabaseInstanceSettingsBackupConfigurationBackupRetentionSettingsArgs

    RetainedBackups int
    Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.
    RetentionUnit string
    The unit that 'retained_backups' represents. Defaults to COUNT.
    RetainedBackups int
    Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.
    RetentionUnit string
    The unit that 'retained_backups' represents. Defaults to COUNT.
    retainedBackups Integer
    Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.
    retentionUnit String
    The unit that 'retained_backups' represents. Defaults to COUNT.
    retainedBackups number
    Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.
    retentionUnit string
    The unit that 'retained_backups' represents. Defaults to COUNT.
    retained_backups int
    Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.
    retention_unit str
    The unit that 'retained_backups' represents. Defaults to COUNT.
    retainedBackups Number
    Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.
    retentionUnit String
    The unit that 'retained_backups' represents. Defaults to COUNT.

    DatabaseInstanceSettingsDataCacheConfig, DatabaseInstanceSettingsDataCacheConfigArgs

    DataCacheEnabled bool
    Whether data cache is enabled for the instance. Defaults to false. Can be used with MYSQL and PostgreSQL only.
    DataCacheEnabled bool
    Whether data cache is enabled for the instance. Defaults to false. Can be used with MYSQL and PostgreSQL only.
    dataCacheEnabled Boolean
    Whether data cache is enabled for the instance. Defaults to false. Can be used with MYSQL and PostgreSQL only.
    dataCacheEnabled boolean
    Whether data cache is enabled for the instance. Defaults to false. Can be used with MYSQL and PostgreSQL only.
    data_cache_enabled bool
    Whether data cache is enabled for the instance. Defaults to false. Can be used with MYSQL and PostgreSQL only.
    dataCacheEnabled Boolean
    Whether data cache is enabled for the instance. Defaults to false. Can be used with MYSQL and PostgreSQL only.

    DatabaseInstanceSettingsDatabaseFlag, DatabaseInstanceSettingsDatabaseFlagArgs

    Name string
    Name of the flag.
    Value string
    Value of the flag.
    Name string
    Name of the flag.
    Value string
    Value of the flag.
    name String
    Name of the flag.
    value String
    Value of the flag.
    name string
    Name of the flag.
    value string
    Value of the flag.
    name str
    Name of the flag.
    value str
    Value of the flag.
    name String
    Name of the flag.
    value String
    Value of the flag.

    DatabaseInstanceSettingsDenyMaintenancePeriod, DatabaseInstanceSettingsDenyMaintenancePeriodArgs

    EndDate string
    "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
    StartDate string
    "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
    Time string
    Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00
    EndDate string
    "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
    StartDate string
    "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
    Time string
    Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00
    endDate String
    "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
    startDate String
    "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
    time String
    Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00
    endDate string
    "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
    startDate string
    "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
    time string
    Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00
    end_date str
    "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
    start_date str
    "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
    time str
    Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00
    endDate String
    "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
    startDate String
    "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
    time String
    Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00

    DatabaseInstanceSettingsInsightsConfig, DatabaseInstanceSettingsInsightsConfigArgs

    QueryInsightsEnabled bool
    True if Query Insights feature is enabled.
    QueryPlansPerMinute int

    Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.

    The optional settings.password_validation_policy subblock for instances declares Password Validation Policy configuration. It contains:

    QueryStringLength int
    Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. Higher query lengths are more useful for analytical queries, but they also require more memory. Changing the query length requires you to restart the instance. You can still add tags to queries that exceed the length limit.
    RecordApplicationTags bool
    True if Query Insights will record application tags from query when enabled.
    RecordClientAddress bool
    True if Query Insights will record client address when enabled.
    QueryInsightsEnabled bool
    True if Query Insights feature is enabled.
    QueryPlansPerMinute int

    Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.

    The optional settings.password_validation_policy subblock for instances declares Password Validation Policy configuration. It contains:

    QueryStringLength int
    Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. Higher query lengths are more useful for analytical queries, but they also require more memory. Changing the query length requires you to restart the instance. You can still add tags to queries that exceed the length limit.
    RecordApplicationTags bool
    True if Query Insights will record application tags from query when enabled.
    RecordClientAddress bool
    True if Query Insights will record client address when enabled.
    queryInsightsEnabled Boolean
    True if Query Insights feature is enabled.
    queryPlansPerMinute Integer

    Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.

    The optional settings.password_validation_policy subblock for instances declares Password Validation Policy configuration. It contains:

    queryStringLength Integer
    Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. Higher query lengths are more useful for analytical queries, but they also require more memory. Changing the query length requires you to restart the instance. You can still add tags to queries that exceed the length limit.
    recordApplicationTags Boolean
    True if Query Insights will record application tags from query when enabled.
    recordClientAddress Boolean
    True if Query Insights will record client address when enabled.
    queryInsightsEnabled boolean
    True if Query Insights feature is enabled.
    queryPlansPerMinute number

    Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.

    The optional settings.password_validation_policy subblock for instances declares Password Validation Policy configuration. It contains:

    queryStringLength number
    Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. Higher query lengths are more useful for analytical queries, but they also require more memory. Changing the query length requires you to restart the instance. You can still add tags to queries that exceed the length limit.
    recordApplicationTags boolean
    True if Query Insights will record application tags from query when enabled.
    recordClientAddress boolean
    True if Query Insights will record client address when enabled.
    query_insights_enabled bool
    True if Query Insights feature is enabled.
    query_plans_per_minute int

    Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.

    The optional settings.password_validation_policy subblock for instances declares Password Validation Policy configuration. It contains:

    query_string_length int
    Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. Higher query lengths are more useful for analytical queries, but they also require more memory. Changing the query length requires you to restart the instance. You can still add tags to queries that exceed the length limit.
    record_application_tags bool
    True if Query Insights will record application tags from query when enabled.
    record_client_address bool
    True if Query Insights will record client address when enabled.
    queryInsightsEnabled Boolean
    True if Query Insights feature is enabled.
    queryPlansPerMinute Number

    Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.

    The optional settings.password_validation_policy subblock for instances declares Password Validation Policy configuration. It contains:

    queryStringLength Number
    Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. Higher query lengths are more useful for analytical queries, but they also require more memory. Changing the query length requires you to restart the instance. You can still add tags to queries that exceed the length limit.
    recordApplicationTags Boolean
    True if Query Insights will record application tags from query when enabled.
    recordClientAddress Boolean
    True if Query Insights will record client address when enabled.

    DatabaseInstanceSettingsIpConfiguration, DatabaseInstanceSettingsIpConfigurationArgs

    AllocatedIpRange string
    The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
    AuthorizedNetworks List<DatabaseInstanceSettingsIpConfigurationAuthorizedNetwork>
    EnablePrivatePathForGoogleCloudServices bool
    Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported.
    Ipv4Enabled bool
    Whether this Cloud SQL instance should be assigned a public IPV4 address. At least ipv4_enabled must be enabled or a private_network must be configured.
    PrivateNetwork string
    The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set.
    PscConfigs List<DatabaseInstanceSettingsIpConfigurationPscConfig>
    PSC settings for a Cloud SQL instance.
    RequireSsl bool
    Whether SSL connections over IP are enforced or not. To change this field, also set the corresponding value in ssl_mode.
    SslMode string
    Specify how SSL connection should be enforced in DB connections. This field provides more SSL enforcment options compared to require_ssl. To change this field, also set the correspoding value in require_ssl.

    • For PostgreSQL instances, the value pairs are listed in the API reference doc for ssl_mode field.
    • For MySQL instances, use the same value pairs as the PostgreSQL instances.
    • For SQL Server instances, set it to ALLOW_UNENCRYPTED_AND_ENCRYPTED when require_ssl=false and ENCRYPTED_ONLY otherwise.
    AllocatedIpRange string
    The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
    AuthorizedNetworks []DatabaseInstanceSettingsIpConfigurationAuthorizedNetwork
    EnablePrivatePathForGoogleCloudServices bool
    Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported.
    Ipv4Enabled bool
    Whether this Cloud SQL instance should be assigned a public IPV4 address. At least ipv4_enabled must be enabled or a private_network must be configured.
    PrivateNetwork string
    The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set.
    PscConfigs []DatabaseInstanceSettingsIpConfigurationPscConfig
    PSC settings for a Cloud SQL instance.
    RequireSsl bool
    Whether SSL connections over IP are enforced or not. To change this field, also set the corresponding value in ssl_mode.
    SslMode string
    Specify how SSL connection should be enforced in DB connections. This field provides more SSL enforcment options compared to require_ssl. To change this field, also set the correspoding value in require_ssl.

    • For PostgreSQL instances, the value pairs are listed in the API reference doc for ssl_mode field.
    • For MySQL instances, use the same value pairs as the PostgreSQL instances.
    • For SQL Server instances, set it to ALLOW_UNENCRYPTED_AND_ENCRYPTED when require_ssl=false and ENCRYPTED_ONLY otherwise.
    allocatedIpRange String
    The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
    authorizedNetworks List<DatabaseInstanceSettingsIpConfigurationAuthorizedNetwork>
    enablePrivatePathForGoogleCloudServices Boolean
    Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported.
    ipv4Enabled Boolean
    Whether this Cloud SQL instance should be assigned a public IPV4 address. At least ipv4_enabled must be enabled or a private_network must be configured.
    privateNetwork String
    The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set.
    pscConfigs List<DatabaseInstanceSettingsIpConfigurationPscConfig>
    PSC settings for a Cloud SQL instance.
    requireSsl Boolean
    Whether SSL connections over IP are enforced or not. To change this field, also set the corresponding value in ssl_mode.
    sslMode String
    Specify how SSL connection should be enforced in DB connections. This field provides more SSL enforcment options compared to require_ssl. To change this field, also set the correspoding value in require_ssl.

    • For PostgreSQL instances, the value pairs are listed in the API reference doc for ssl_mode field.
    • For MySQL instances, use the same value pairs as the PostgreSQL instances.
    • For SQL Server instances, set it to ALLOW_UNENCRYPTED_AND_ENCRYPTED when require_ssl=false and ENCRYPTED_ONLY otherwise.
    allocatedIpRange string
    The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
    authorizedNetworks DatabaseInstanceSettingsIpConfigurationAuthorizedNetwork[]
    enablePrivatePathForGoogleCloudServices boolean
    Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported.
    ipv4Enabled boolean
    Whether this Cloud SQL instance should be assigned a public IPV4 address. At least ipv4_enabled must be enabled or a private_network must be configured.
    privateNetwork string
    The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set.
    pscConfigs DatabaseInstanceSettingsIpConfigurationPscConfig[]
    PSC settings for a Cloud SQL instance.
    requireSsl boolean
    Whether SSL connections over IP are enforced or not. To change this field, also set the corresponding value in ssl_mode.
    sslMode string
    Specify how SSL connection should be enforced in DB connections. This field provides more SSL enforcment options compared to require_ssl. To change this field, also set the correspoding value in require_ssl.

    • For PostgreSQL instances, the value pairs are listed in the API reference doc for ssl_mode field.
    • For MySQL instances, use the same value pairs as the PostgreSQL instances.
    • For SQL Server instances, set it to ALLOW_UNENCRYPTED_AND_ENCRYPTED when require_ssl=false and ENCRYPTED_ONLY otherwise.
    allocated_ip_range str
    The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
    authorized_networks Sequence[DatabaseInstanceSettingsIpConfigurationAuthorizedNetwork]
    enable_private_path_for_google_cloud_services bool
    Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported.
    ipv4_enabled bool
    Whether this Cloud SQL instance should be assigned a public IPV4 address. At least ipv4_enabled must be enabled or a private_network must be configured.
    private_network str
    The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set.
    psc_configs Sequence[DatabaseInstanceSettingsIpConfigurationPscConfig]
    PSC settings for a Cloud SQL instance.
    require_ssl bool
    Whether SSL connections over IP are enforced or not. To change this field, also set the corresponding value in ssl_mode.
    ssl_mode str
    Specify how SSL connection should be enforced in DB connections. This field provides more SSL enforcment options compared to require_ssl. To change this field, also set the correspoding value in require_ssl.

    • For PostgreSQL instances, the value pairs are listed in the API reference doc for ssl_mode field.
    • For MySQL instances, use the same value pairs as the PostgreSQL instances.
    • For SQL Server instances, set it to ALLOW_UNENCRYPTED_AND_ENCRYPTED when require_ssl=false and ENCRYPTED_ONLY otherwise.
    allocatedIpRange String
    The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
    authorizedNetworks List<Property Map>
    enablePrivatePathForGoogleCloudServices Boolean
    Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported.
    ipv4Enabled Boolean
    Whether this Cloud SQL instance should be assigned a public IPV4 address. At least ipv4_enabled must be enabled or a private_network must be configured.
    privateNetwork String
    The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set.
    pscConfigs List<Property Map>
    PSC settings for a Cloud SQL instance.
    requireSsl Boolean
    Whether SSL connections over IP are enforced or not. To change this field, also set the corresponding value in ssl_mode.
    sslMode String
    Specify how SSL connection should be enforced in DB connections. This field provides more SSL enforcment options compared to require_ssl. To change this field, also set the correspoding value in require_ssl.

    • For PostgreSQL instances, the value pairs are listed in the API reference doc for ssl_mode field.
    • For MySQL instances, use the same value pairs as the PostgreSQL instances.
    • For SQL Server instances, set it to ALLOW_UNENCRYPTED_AND_ENCRYPTED when require_ssl=false and ENCRYPTED_ONLY otherwise.

    DatabaseInstanceSettingsIpConfigurationAuthorizedNetwork, DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs

    Value string
    A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.
    ExpirationTime string
    The RFC 3339 formatted date time string indicating when this whitelist expires.
    Name string
    A name for this whitelist entry.
    Value string
    A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.
    ExpirationTime string
    The RFC 3339 formatted date time string indicating when this whitelist expires.
    Name string
    A name for this whitelist entry.
    value String
    A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.
    expirationTime String
    The RFC 3339 formatted date time string indicating when this whitelist expires.
    name String
    A name for this whitelist entry.
    value string
    A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.
    expirationTime string
    The RFC 3339 formatted date time string indicating when this whitelist expires.
    name string
    A name for this whitelist entry.
    value str
    A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.
    expiration_time str
    The RFC 3339 formatted date time string indicating when this whitelist expires.
    name str
    A name for this whitelist entry.
    value String
    A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.
    expirationTime String
    The RFC 3339 formatted date time string indicating when this whitelist expires.
    name String
    A name for this whitelist entry.

    DatabaseInstanceSettingsIpConfigurationPscConfig, DatabaseInstanceSettingsIpConfigurationPscConfigArgs

    AllowedConsumerProjects List<string>
    List of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects. Each consumer project in this list may be represented by a project number (numeric) or by a project id (alphanumeric).
    PscEnabled bool
    Whether PSC connectivity is enabled for this instance.
    AllowedConsumerProjects []string
    List of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects. Each consumer project in this list may be represented by a project number (numeric) or by a project id (alphanumeric).
    PscEnabled bool
    Whether PSC connectivity is enabled for this instance.
    allowedConsumerProjects List<String>
    List of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects. Each consumer project in this list may be represented by a project number (numeric) or by a project id (alphanumeric).
    pscEnabled Boolean
    Whether PSC connectivity is enabled for this instance.
    allowedConsumerProjects string[]
    List of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects. Each consumer project in this list may be represented by a project number (numeric) or by a project id (alphanumeric).
    pscEnabled boolean
    Whether PSC connectivity is enabled for this instance.
    allowed_consumer_projects Sequence[str]
    List of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects. Each consumer project in this list may be represented by a project number (numeric) or by a project id (alphanumeric).
    psc_enabled bool
    Whether PSC connectivity is enabled for this instance.
    allowedConsumerProjects List<String>
    List of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects. Each consumer project in this list may be represented by a project number (numeric) or by a project id (alphanumeric).
    pscEnabled Boolean
    Whether PSC connectivity is enabled for this instance.

    DatabaseInstanceSettingsLocationPreference, DatabaseInstanceSettingsLocationPreferenceArgs

    FollowGaeApplication string
    A GAE application whose zone to remain in. Must be in the same region as this instance.
    SecondaryZone string

    The preferred Compute Engine zone for the secondary/failover.

    The optional settings.maintenance_window subblock for instances declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. It supports:

    Zone string
    The preferred compute engine zone.
    FollowGaeApplication string
    A GAE application whose zone to remain in. Must be in the same region as this instance.
    SecondaryZone string

    The preferred Compute Engine zone for the secondary/failover.

    The optional settings.maintenance_window subblock for instances declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. It supports:

    Zone string
    The preferred compute engine zone.
    followGaeApplication String
    A GAE application whose zone to remain in. Must be in the same region as this instance.
    secondaryZone String

    The preferred Compute Engine zone for the secondary/failover.

    The optional settings.maintenance_window subblock for instances declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. It supports:

    zone String
    The preferred compute engine zone.
    followGaeApplication string
    A GAE application whose zone to remain in. Must be in the same region as this instance.
    secondaryZone string

    The preferred Compute Engine zone for the secondary/failover.

    The optional settings.maintenance_window subblock for instances declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. It supports:

    zone string
    The preferred compute engine zone.
    follow_gae_application str
    A GAE application whose zone to remain in. Must be in the same region as this instance.
    secondary_zone str

    The preferred Compute Engine zone for the secondary/failover.

    The optional settings.maintenance_window subblock for instances declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. It supports:

    zone str
    The preferred compute engine zone.
    followGaeApplication String
    A GAE application whose zone to remain in. Must be in the same region as this instance.
    secondaryZone String

    The preferred Compute Engine zone for the secondary/failover.

    The optional settings.maintenance_window subblock for instances declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. It supports:

    zone String
    The preferred compute engine zone.

    DatabaseInstanceSettingsMaintenanceWindow, DatabaseInstanceSettingsMaintenanceWindowArgs

    Day int
    Day of week (1-7), starting on Monday
    Hour int
    Hour of day (0-23), ignored if day not set
    UpdateTrack string

    Receive updates earlier (canary) or later (stable)

    The optional settings.insights_config subblock for instances declares Query Insights(MySQL, PostgreSQL) configuration. It contains:

    Day int
    Day of week (1-7), starting on Monday
    Hour int
    Hour of day (0-23), ignored if day not set
    UpdateTrack string

    Receive updates earlier (canary) or later (stable)

    The optional settings.insights_config subblock for instances declares Query Insights(MySQL, PostgreSQL) configuration. It contains:

    day Integer
    Day of week (1-7), starting on Monday
    hour Integer
    Hour of day (0-23), ignored if day not set
    updateTrack String

    Receive updates earlier (canary) or later (stable)

    The optional settings.insights_config subblock for instances declares Query Insights(MySQL, PostgreSQL) configuration. It contains:

    day number
    Day of week (1-7), starting on Monday
    hour number
    Hour of day (0-23), ignored if day not set
    updateTrack string

    Receive updates earlier (canary) or later (stable)

    The optional settings.insights_config subblock for instances declares Query Insights(MySQL, PostgreSQL) configuration. It contains:

    day int
    Day of week (1-7), starting on Monday
    hour int
    Hour of day (0-23), ignored if day not set
    update_track str

    Receive updates earlier (canary) or later (stable)

    The optional settings.insights_config subblock for instances declares Query Insights(MySQL, PostgreSQL) configuration. It contains:

    day Number
    Day of week (1-7), starting on Monday
    hour Number
    Hour of day (0-23), ignored if day not set
    updateTrack String

    Receive updates earlier (canary) or later (stable)

    The optional settings.insights_config subblock for instances declares Query Insights(MySQL, PostgreSQL) configuration. It contains:

    DatabaseInstanceSettingsPasswordValidationPolicy, DatabaseInstanceSettingsPasswordValidationPolicyArgs

    EnablePasswordPolicy bool

    Enables or disable the password validation policy.

    The optional replica_configuration block must have master_instance_name set to work, cannot be updated, and supports:

    Complexity string
    Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
    DisallowUsernameSubstring bool
    Prevents the use of the username in the password.
    MinLength int
    Specifies the minimum number of characters that the password must have.
    PasswordChangeInterval string
    Specifies the minimum duration after which you can change the password.
    ReuseInterval int
    Specifies the number of previous passwords that you can't reuse.
    EnablePasswordPolicy bool

    Enables or disable the password validation policy.

    The optional replica_configuration block must have master_instance_name set to work, cannot be updated, and supports:

    Complexity string
    Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
    DisallowUsernameSubstring bool
    Prevents the use of the username in the password.
    MinLength int
    Specifies the minimum number of characters that the password must have.
    PasswordChangeInterval string
    Specifies the minimum duration after which you can change the password.
    ReuseInterval int
    Specifies the number of previous passwords that you can't reuse.
    enablePasswordPolicy Boolean

    Enables or disable the password validation policy.

    The optional replica_configuration block must have master_instance_name set to work, cannot be updated, and supports:

    complexity String
    Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
    disallowUsernameSubstring Boolean
    Prevents the use of the username in the password.
    minLength Integer
    Specifies the minimum number of characters that the password must have.
    passwordChangeInterval String
    Specifies the minimum duration after which you can change the password.
    reuseInterval Integer
    Specifies the number of previous passwords that you can't reuse.
    enablePasswordPolicy boolean

    Enables or disable the password validation policy.

    The optional replica_configuration block must have master_instance_name set to work, cannot be updated, and supports:

    complexity string
    Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
    disallowUsernameSubstring boolean
    Prevents the use of the username in the password.
    minLength number
    Specifies the minimum number of characters that the password must have.
    passwordChangeInterval string
    Specifies the minimum duration after which you can change the password.
    reuseInterval number
    Specifies the number of previous passwords that you can't reuse.
    enable_password_policy bool

    Enables or disable the password validation policy.

    The optional replica_configuration block must have master_instance_name set to work, cannot be updated, and supports:

    complexity str
    Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
    disallow_username_substring bool
    Prevents the use of the username in the password.
    min_length int
    Specifies the minimum number of characters that the password must have.
    password_change_interval str
    Specifies the minimum duration after which you can change the password.
    reuse_interval int
    Specifies the number of previous passwords that you can't reuse.
    enablePasswordPolicy Boolean

    Enables or disable the password validation policy.

    The optional replica_configuration block must have master_instance_name set to work, cannot be updated, and supports:

    complexity String
    Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
    disallowUsernameSubstring Boolean
    Prevents the use of the username in the password.
    minLength Number
    Specifies the minimum number of characters that the password must have.
    passwordChangeInterval String
    Specifies the minimum duration after which you can change the password.
    reuseInterval Number
    Specifies the number of previous passwords that you can't reuse.

    DatabaseInstanceSettingsSqlServerAuditConfig, DatabaseInstanceSettingsSqlServerAuditConfigArgs

    Bucket string
    The name of the destination bucket (e.g., gs://mybucket).
    RetentionInterval string
    How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    UploadInterval string
    How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    Bucket string
    The name of the destination bucket (e.g., gs://mybucket).
    RetentionInterval string
    How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    UploadInterval string
    How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    bucket String
    The name of the destination bucket (e.g., gs://mybucket).
    retentionInterval String
    How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    uploadInterval String
    How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    bucket string
    The name of the destination bucket (e.g., gs://mybucket).
    retentionInterval string
    How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    uploadInterval string
    How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    bucket str
    The name of the destination bucket (e.g., gs://mybucket).
    retention_interval str
    How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    upload_interval str
    How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    bucket String
    The name of the destination bucket (e.g., gs://mybucket).
    retentionInterval String
    How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    uploadInterval String
    How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

    Import

    Database instances can be imported using one of any of these accepted formats:

    • projects/{{project}}/instances/{{name}}

    • {{project}}/{{name}}

    • {{name}}

    When using the pulumi import command, Database instances can be imported using one of the formats above. For example:

    $ pulumi import gcp:sql/databaseInstance:DatabaseInstance default projects/{{project}}/instances/{{name}}
    
    $ pulumi import gcp:sql/databaseInstance:DatabaseInstance default {{project}}/{{name}}
    
    $ pulumi import gcp:sql/databaseInstance:DatabaseInstance default {{name}}
    

    config and set on the server.

    When importing, double-check that your config has all the fields set that you expect- just seeing

    no diff isn’t sufficient to know that your config could reproduce the imported resource.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.16.0 published on Wednesday, Mar 27, 2024 by Pulumi