gcp.sql.DatabaseInstance
Explore with Pulumi AI
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’@’%’ user with no password. This user will be deleted by the provider on instance creation. You should usegcp.sql.Userto 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 runpulumi updateto 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={
        "tier": "db-f1-micro",
    })
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/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.DatabaseInstancedoes not actually interpolate values fromgcp.servicenetworking.Connection. You must explicitly add adepends_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.selfLink,
            enablePrivatePathForGoogleCloudServices: true,
        },
    },
}, {
    dependsOn: [privateVpcConnection],
});
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={
        "tier": "db-f1-micro",
        "ip_configuration": {
            "ipv4_enabled": False,
            "private_network": private_network.self_link,
            "enable_private_path_for_google_cloud_services": True,
        },
    },
    opts = pulumi.ResourceOptions(depends_on=[private_vpc_connection]))
package main
import (
	"fmt"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/servicenetworking"
	"github.com/pulumi/pulumi-gcp/sdk/v8/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
		}
		privateVpcConnection, 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.SelfLink,
					EnablePrivatePathForGoogleCloudServices: pulumi.Bool(true),
				},
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			privateVpcConnection,
		}))
		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.SelfLink,
                EnablePrivatePathForGoogleCloudServices = true,
            },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            privateVpcConnection,
        },
    });
});
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 com.pulumi.resources.CustomResourceOptions;
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.selfLink())
                    .enablePrivatePathForGoogleCloudServices(true)
                    .build())
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(privateVpcConnection)
                .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.selfLink}
          enablePrivatePathForGoogleCloudServices: true
    options:
      dependsOn:
        - ${privateVpcConnection}
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={
        "tier": "db-perf-optimized-N-2",
        "edition": "ENTERPRISE_PLUS",
        "data_cache_config": {
            "data_cache_enabled": True,
        },
    })
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/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={
        "tier": "db-f1-micro",
        "ip_configuration": {
            "psc_configs": [{
                "psc_enabled": True,
                "allowed_consumer_projects": ["allowed-consumer-project-name"],
            }],
            "ipv4_enabled": False,
        },
        "backup_configuration": {
            "enabled": True,
            "binary_log_enabled": True,
        },
        "availability_type": "REGIONAL",
    })
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/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
Cloud SQL Instance with PSC auto connections
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"],
                pscAutoConnections: [{
                    consumerNetwork: "network-name",
                    consumerServiceProjectId: "project-id",
                }],
            }],
            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={
        "tier": "db-f1-micro",
        "ip_configuration": {
            "psc_configs": [{
                "psc_enabled": True,
                "allowed_consumer_projects": ["allowed-consumer-project-name"],
                "psc_auto_connections": [{
                    "consumer_network": "network-name",
                    "consumer_service_project_id": "project-id",
                }],
            }],
            "ipv4_enabled": False,
        },
        "backup_configuration": {
            "enabled": True,
            "binary_log_enabled": True,
        },
        "availability_type": "REGIONAL",
    })
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/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"),
							},
							PscAutoConnections: sql.DatabaseInstanceSettingsIpConfigurationPscConfigPscAutoConnectionArray{
								&sql.DatabaseInstanceSettingsIpConfigurationPscConfigPscAutoConnectionArgs{
									ConsumerNetwork:          pulumi.String("network-name"),
									ConsumerServiceProjectId: pulumi.String("project-id"),
								},
							},
						},
					},
					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",
                        },
                        PscAutoConnections = new[]
                        {
                            new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationPscConfigPscAutoConnectionArgs
                            {
                                ConsumerNetwork = "network-name",
                                ConsumerServiceProjectId = "project-id",
                            },
                        },
                    },
                },
                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")
                        .pscAutoConnections(DatabaseInstanceSettingsIpConfigurationPscConfigPscAutoConnectionArgs.builder()
                            .consumerNetwork("network-name")
                            .consumerServiceProjectId("project-id")
                            .build())
                        .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
              pscAutoConnections:
                - consumerNetwork: network-name
                  consumerServiceProjectId: project-id
          ipv4Enabled: false
        backupConfiguration:
          enabled: true
          binaryLogEnabled: true
        availabilityType: REGIONAL
Switchover
Users can perform a switchover on a replica by following the steps below.
~>WARNING: Failure to follow these steps can lead to data loss (You will be warned during plan stage). To prevent data loss during a switchover, please verify your plan with the checklist below.
For a more in-depth walkthrough with example code, see the Switchover Guide
Steps to Invoke Switchover
MySQL/PostgreSQL: Create a cross-region, Enterprise Plus edition primary and replica pair, then set the value of primary’s replication_cluster.failover_dr_replica_name as the replica.
SQL Server: Create a cascadable replica in a different region from the primary (cascadable_replica is set to true in replica_configuration)
Invoking switchover in the replica resource:
- Change instance_type from READ_REPLICA_INSTANCEtoCLOUD_SQL_INSTANCE
- Remove master_instance_name
- (SQL Server) Remove replica_configuration
- Add current primary’s name to the replica’s replica_nameslist
- (MySQL/PostgreSQL) Add current primary’s name to the replica’s replication_cluster.failover_dr_replica_name.
- (MySQL/PostgreSQL) Adjust backup_configuration. See Switchover Guide for details.
Updating the primary resource:
- Change instance_typefromCLOUD_SQL_INSTANCEtoREAD_REPLICA_INSTANCE
- Set master_instance_nameto the original replica (which will be primary after switchover)
- (SQL Server) Set replica_configurationand setcascadable_replicatotrue
- Remove original replica from replica_names- NOTE: Do not delete the replica_names field, even if it has no replicas remaining. Set replica_names = [ ] to indicate it having no replicas.
 
- (MySQL/PostgreSQL) Set replication_cluster.failover_dr_replica_nameas the empty string.
- (MySQL/PostgreSQL) Adjust backup_configuration. See Switchover Guide for details.
Plan and verify that:
- pulumi previewoutputs “0 to add, 0 to destroy”
- pulumi previewdoes not say “must be replaced” for any resource
- Every resource “will be updated in-place”
- Only the 2 instances involved in switchover have planned changes
- (Recommended) Use deletion_protectionon instances as a safety measure
Create DatabaseInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DatabaseInstance(name: string, args: DatabaseInstanceArgs, opts?: CustomResourceOptions);@overload
def DatabaseInstance(resource_name: str,
                     args: DatabaseInstanceArgs,
                     opts: Optional[ResourceOptions] = None)
@overload
def DatabaseInstance(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     database_version: Optional[str] = None,
                     project: Optional[str] = None,
                     region: Optional[str] = None,
                     encryption_key_name: Optional[str] = None,
                     instance_type: Optional[str] = None,
                     maintenance_version: Optional[str] = None,
                     master_instance_name: Optional[str] = None,
                     deletion_protection: Optional[bool] = None,
                     clone: Optional[DatabaseInstanceCloneArgs] = None,
                     name: Optional[str] = None,
                     replica_configuration: Optional[DatabaseInstanceReplicaConfigurationArgs] = None,
                     replica_names: Optional[Sequence[str]] = None,
                     replication_cluster: Optional[DatabaseInstanceReplicationClusterArgs] = None,
                     restore_backup_context: Optional[DatabaseInstanceRestoreBackupContextArgs] = None,
                     root_password: Optional[str] = None,
                     settings: Optional[DatabaseInstanceSettingsArgs] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var gcpDatabaseInstanceResource = new Gcp.Sql.DatabaseInstance("gcpDatabaseInstanceResource", new()
{
    DatabaseVersion = "string",
    Project = "string",
    Region = "string",
    EncryptionKeyName = "string",
    InstanceType = "string",
    MaintenanceVersion = "string",
    MasterInstanceName = "string",
    DeletionProtection = false,
    Clone = new Gcp.Sql.Inputs.DatabaseInstanceCloneArgs
    {
        SourceInstanceName = "string",
        AllocatedIpRange = "string",
        DatabaseNames = new[]
        {
            "string",
        },
        PointInTime = "string",
        PreferredZone = "string",
    },
    Name = "string",
    ReplicaConfiguration = new Gcp.Sql.Inputs.DatabaseInstanceReplicaConfigurationArgs
    {
        CaCertificate = "string",
        CascadableReplica = false,
        ClientCertificate = "string",
        ClientKey = "string",
        ConnectRetryInterval = 0,
        DumpFilePath = "string",
        FailoverTarget = false,
        MasterHeartbeatPeriod = 0,
        Password = "string",
        SslCipher = "string",
        Username = "string",
        VerifyServerCertificate = false,
    },
    ReplicaNames = new[]
    {
        "string",
    },
    ReplicationCluster = new Gcp.Sql.Inputs.DatabaseInstanceReplicationClusterArgs
    {
        DrReplica = false,
        FailoverDrReplicaName = "string",
    },
    RestoreBackupContext = new Gcp.Sql.Inputs.DatabaseInstanceRestoreBackupContextArgs
    {
        BackupRunId = 0,
        InstanceId = "string",
        Project = "string",
    },
    RootPassword = "string",
    Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
    {
        Tier = "string",
        DiskType = "string",
        TimeZone = "string",
        AvailabilityType = "string",
        BackupConfiguration = new Gcp.Sql.Inputs.DatabaseInstanceSettingsBackupConfigurationArgs
        {
            BackupRetentionSettings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsBackupConfigurationBackupRetentionSettingsArgs
            {
                RetainedBackups = 0,
                RetentionUnit = "string",
            },
            BinaryLogEnabled = false,
            Enabled = false,
            Location = "string",
            PointInTimeRecoveryEnabled = false,
            StartTime = "string",
            TransactionLogRetentionDays = 0,
        },
        Collation = "string",
        ConnectorEnforcement = "string",
        DataCacheConfig = new Gcp.Sql.Inputs.DatabaseInstanceSettingsDataCacheConfigArgs
        {
            DataCacheEnabled = false,
        },
        DatabaseFlags = new[]
        {
            new Gcp.Sql.Inputs.DatabaseInstanceSettingsDatabaseFlagArgs
            {
                Name = "string",
                Value = "string",
            },
        },
        DeletionProtectionEnabled = false,
        DenyMaintenancePeriod = new Gcp.Sql.Inputs.DatabaseInstanceSettingsDenyMaintenancePeriodArgs
        {
            EndDate = "string",
            StartDate = "string",
            Time = "string",
        },
        DiskAutoresize = false,
        DiskAutoresizeLimit = 0,
        Version = 0,
        AdvancedMachineFeatures = new Gcp.Sql.Inputs.DatabaseInstanceSettingsAdvancedMachineFeaturesArgs
        {
            ThreadsPerCore = 0,
        },
        IpConfiguration = new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationArgs
        {
            AllocatedIpRange = "string",
            AuthorizedNetworks = new[]
            {
                new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs
                {
                    Value = "string",
                    ExpirationTime = "string",
                    Name = "string",
                },
            },
            EnablePrivatePathForGoogleCloudServices = false,
            Ipv4Enabled = false,
            PrivateNetwork = "string",
            PscConfigs = new[]
            {
                new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationPscConfigArgs
                {
                    AllowedConsumerProjects = new[]
                    {
                        "string",
                    },
                    PscAutoConnections = new[]
                    {
                        new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationPscConfigPscAutoConnectionArgs
                        {
                            ConsumerNetwork = "string",
                            ConsumerServiceProjectId = "string",
                        },
                    },
                    PscEnabled = false,
                },
            },
            ServerCaMode = "string",
            ServerCaPool = "string",
            SslMode = "string",
        },
        EnableDataplexIntegration = false,
        EnableGoogleMlIntegration = false,
        InsightsConfig = new Gcp.Sql.Inputs.DatabaseInstanceSettingsInsightsConfigArgs
        {
            QueryInsightsEnabled = false,
            QueryPlansPerMinute = 0,
            QueryStringLength = 0,
            RecordApplicationTags = false,
            RecordClientAddress = false,
        },
        Edition = "string",
        LocationPreference = new Gcp.Sql.Inputs.DatabaseInstanceSettingsLocationPreferenceArgs
        {
            FollowGaeApplication = "string",
            SecondaryZone = "string",
            Zone = "string",
        },
        MaintenanceWindow = new Gcp.Sql.Inputs.DatabaseInstanceSettingsMaintenanceWindowArgs
        {
            Day = 0,
            Hour = 0,
            UpdateTrack = "string",
        },
        PasswordValidationPolicy = new Gcp.Sql.Inputs.DatabaseInstanceSettingsPasswordValidationPolicyArgs
        {
            EnablePasswordPolicy = false,
            Complexity = "string",
            DisallowUsernameSubstring = false,
            MinLength = 0,
            PasswordChangeInterval = "string",
            ReuseInterval = 0,
        },
        PricingPlan = "string",
        SqlServerAuditConfig = new Gcp.Sql.Inputs.DatabaseInstanceSettingsSqlServerAuditConfigArgs
        {
            Bucket = "string",
            RetentionInterval = "string",
            UploadInterval = "string",
        },
        ActiveDirectoryConfig = new Gcp.Sql.Inputs.DatabaseInstanceSettingsActiveDirectoryConfigArgs
        {
            Domain = "string",
        },
        ActivationPolicy = "string",
        UserLabels = 
        {
            { "string", "string" },
        },
        DiskSize = 0,
    },
});
example, err := sql.NewDatabaseInstance(ctx, "gcpDatabaseInstanceResource", &sql.DatabaseInstanceArgs{
	DatabaseVersion:    pulumi.String("string"),
	Project:            pulumi.String("string"),
	Region:             pulumi.String("string"),
	EncryptionKeyName:  pulumi.String("string"),
	InstanceType:       pulumi.String("string"),
	MaintenanceVersion: pulumi.String("string"),
	MasterInstanceName: pulumi.String("string"),
	DeletionProtection: pulumi.Bool(false),
	Clone: &sql.DatabaseInstanceCloneArgs{
		SourceInstanceName: pulumi.String("string"),
		AllocatedIpRange:   pulumi.String("string"),
		DatabaseNames: pulumi.StringArray{
			pulumi.String("string"),
		},
		PointInTime:   pulumi.String("string"),
		PreferredZone: pulumi.String("string"),
	},
	Name: pulumi.String("string"),
	ReplicaConfiguration: &sql.DatabaseInstanceReplicaConfigurationArgs{
		CaCertificate:           pulumi.String("string"),
		CascadableReplica:       pulumi.Bool(false),
		ClientCertificate:       pulumi.String("string"),
		ClientKey:               pulumi.String("string"),
		ConnectRetryInterval:    pulumi.Int(0),
		DumpFilePath:            pulumi.String("string"),
		FailoverTarget:          pulumi.Bool(false),
		MasterHeartbeatPeriod:   pulumi.Int(0),
		Password:                pulumi.String("string"),
		SslCipher:               pulumi.String("string"),
		Username:                pulumi.String("string"),
		VerifyServerCertificate: pulumi.Bool(false),
	},
	ReplicaNames: pulumi.StringArray{
		pulumi.String("string"),
	},
	ReplicationCluster: &sql.DatabaseInstanceReplicationClusterArgs{
		DrReplica:             pulumi.Bool(false),
		FailoverDrReplicaName: pulumi.String("string"),
	},
	RestoreBackupContext: &sql.DatabaseInstanceRestoreBackupContextArgs{
		BackupRunId: pulumi.Int(0),
		InstanceId:  pulumi.String("string"),
		Project:     pulumi.String("string"),
	},
	RootPassword: pulumi.String("string"),
	Settings: &sql.DatabaseInstanceSettingsArgs{
		Tier:             pulumi.String("string"),
		DiskType:         pulumi.String("string"),
		TimeZone:         pulumi.String("string"),
		AvailabilityType: pulumi.String("string"),
		BackupConfiguration: &sql.DatabaseInstanceSettingsBackupConfigurationArgs{
			BackupRetentionSettings: &sql.DatabaseInstanceSettingsBackupConfigurationBackupRetentionSettingsArgs{
				RetainedBackups: pulumi.Int(0),
				RetentionUnit:   pulumi.String("string"),
			},
			BinaryLogEnabled:            pulumi.Bool(false),
			Enabled:                     pulumi.Bool(false),
			Location:                    pulumi.String("string"),
			PointInTimeRecoveryEnabled:  pulumi.Bool(false),
			StartTime:                   pulumi.String("string"),
			TransactionLogRetentionDays: pulumi.Int(0),
		},
		Collation:            pulumi.String("string"),
		ConnectorEnforcement: pulumi.String("string"),
		DataCacheConfig: &sql.DatabaseInstanceSettingsDataCacheConfigArgs{
			DataCacheEnabled: pulumi.Bool(false),
		},
		DatabaseFlags: sql.DatabaseInstanceSettingsDatabaseFlagArray{
			&sql.DatabaseInstanceSettingsDatabaseFlagArgs{
				Name:  pulumi.String("string"),
				Value: pulumi.String("string"),
			},
		},
		DeletionProtectionEnabled: pulumi.Bool(false),
		DenyMaintenancePeriod: &sql.DatabaseInstanceSettingsDenyMaintenancePeriodArgs{
			EndDate:   pulumi.String("string"),
			StartDate: pulumi.String("string"),
			Time:      pulumi.String("string"),
		},
		DiskAutoresize:      pulumi.Bool(false),
		DiskAutoresizeLimit: pulumi.Int(0),
		Version:             pulumi.Int(0),
		AdvancedMachineFeatures: &sql.DatabaseInstanceSettingsAdvancedMachineFeaturesArgs{
			ThreadsPerCore: pulumi.Int(0),
		},
		IpConfiguration: &sql.DatabaseInstanceSettingsIpConfigurationArgs{
			AllocatedIpRange: pulumi.String("string"),
			AuthorizedNetworks: sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArray{
				&sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs{
					Value:          pulumi.String("string"),
					ExpirationTime: pulumi.String("string"),
					Name:           pulumi.String("string"),
				},
			},
			EnablePrivatePathForGoogleCloudServices: pulumi.Bool(false),
			Ipv4Enabled:                             pulumi.Bool(false),
			PrivateNetwork:                          pulumi.String("string"),
			PscConfigs: sql.DatabaseInstanceSettingsIpConfigurationPscConfigArray{
				&sql.DatabaseInstanceSettingsIpConfigurationPscConfigArgs{
					AllowedConsumerProjects: pulumi.StringArray{
						pulumi.String("string"),
					},
					PscAutoConnections: sql.DatabaseInstanceSettingsIpConfigurationPscConfigPscAutoConnectionArray{
						&sql.DatabaseInstanceSettingsIpConfigurationPscConfigPscAutoConnectionArgs{
							ConsumerNetwork:          pulumi.String("string"),
							ConsumerServiceProjectId: pulumi.String("string"),
						},
					},
					PscEnabled: pulumi.Bool(false),
				},
			},
			ServerCaMode: pulumi.String("string"),
			ServerCaPool: pulumi.String("string"),
			SslMode:      pulumi.String("string"),
		},
		EnableDataplexIntegration: pulumi.Bool(false),
		EnableGoogleMlIntegration: pulumi.Bool(false),
		InsightsConfig: &sql.DatabaseInstanceSettingsInsightsConfigArgs{
			QueryInsightsEnabled:  pulumi.Bool(false),
			QueryPlansPerMinute:   pulumi.Int(0),
			QueryStringLength:     pulumi.Int(0),
			RecordApplicationTags: pulumi.Bool(false),
			RecordClientAddress:   pulumi.Bool(false),
		},
		Edition: pulumi.String("string"),
		LocationPreference: &sql.DatabaseInstanceSettingsLocationPreferenceArgs{
			FollowGaeApplication: pulumi.String("string"),
			SecondaryZone:        pulumi.String("string"),
			Zone:                 pulumi.String("string"),
		},
		MaintenanceWindow: &sql.DatabaseInstanceSettingsMaintenanceWindowArgs{
			Day:         pulumi.Int(0),
			Hour:        pulumi.Int(0),
			UpdateTrack: pulumi.String("string"),
		},
		PasswordValidationPolicy: &sql.DatabaseInstanceSettingsPasswordValidationPolicyArgs{
			EnablePasswordPolicy:      pulumi.Bool(false),
			Complexity:                pulumi.String("string"),
			DisallowUsernameSubstring: pulumi.Bool(false),
			MinLength:                 pulumi.Int(0),
			PasswordChangeInterval:    pulumi.String("string"),
			ReuseInterval:             pulumi.Int(0),
		},
		PricingPlan: pulumi.String("string"),
		SqlServerAuditConfig: &sql.DatabaseInstanceSettingsSqlServerAuditConfigArgs{
			Bucket:            pulumi.String("string"),
			RetentionInterval: pulumi.String("string"),
			UploadInterval:    pulumi.String("string"),
		},
		ActiveDirectoryConfig: &sql.DatabaseInstanceSettingsActiveDirectoryConfigArgs{
			Domain: pulumi.String("string"),
		},
		ActivationPolicy: pulumi.String("string"),
		UserLabels: pulumi.StringMap{
			"string": pulumi.String("string"),
		},
		DiskSize: pulumi.Int(0),
	},
})
var gcpDatabaseInstanceResource = new DatabaseInstance("gcpDatabaseInstanceResource", DatabaseInstanceArgs.builder()
    .databaseVersion("string")
    .project("string")
    .region("string")
    .encryptionKeyName("string")
    .instanceType("string")
    .maintenanceVersion("string")
    .masterInstanceName("string")
    .deletionProtection(false)
    .clone(DatabaseInstanceCloneArgs.builder()
        .sourceInstanceName("string")
        .allocatedIpRange("string")
        .databaseNames("string")
        .pointInTime("string")
        .preferredZone("string")
        .build())
    .name("string")
    .replicaConfiguration(DatabaseInstanceReplicaConfigurationArgs.builder()
        .caCertificate("string")
        .cascadableReplica(false)
        .clientCertificate("string")
        .clientKey("string")
        .connectRetryInterval(0)
        .dumpFilePath("string")
        .failoverTarget(false)
        .masterHeartbeatPeriod(0)
        .password("string")
        .sslCipher("string")
        .username("string")
        .verifyServerCertificate(false)
        .build())
    .replicaNames("string")
    .replicationCluster(DatabaseInstanceReplicationClusterArgs.builder()
        .drReplica(false)
        .failoverDrReplicaName("string")
        .build())
    .restoreBackupContext(DatabaseInstanceRestoreBackupContextArgs.builder()
        .backupRunId(0)
        .instanceId("string")
        .project("string")
        .build())
    .rootPassword("string")
    .settings(DatabaseInstanceSettingsArgs.builder()
        .tier("string")
        .diskType("string")
        .timeZone("string")
        .availabilityType("string")
        .backupConfiguration(DatabaseInstanceSettingsBackupConfigurationArgs.builder()
            .backupRetentionSettings(DatabaseInstanceSettingsBackupConfigurationBackupRetentionSettingsArgs.builder()
                .retainedBackups(0)
                .retentionUnit("string")
                .build())
            .binaryLogEnabled(false)
            .enabled(false)
            .location("string")
            .pointInTimeRecoveryEnabled(false)
            .startTime("string")
            .transactionLogRetentionDays(0)
            .build())
        .collation("string")
        .connectorEnforcement("string")
        .dataCacheConfig(DatabaseInstanceSettingsDataCacheConfigArgs.builder()
            .dataCacheEnabled(false)
            .build())
        .databaseFlags(DatabaseInstanceSettingsDatabaseFlagArgs.builder()
            .name("string")
            .value("string")
            .build())
        .deletionProtectionEnabled(false)
        .denyMaintenancePeriod(DatabaseInstanceSettingsDenyMaintenancePeriodArgs.builder()
            .endDate("string")
            .startDate("string")
            .time("string")
            .build())
        .diskAutoresize(false)
        .diskAutoresizeLimit(0)
        .version(0)
        .advancedMachineFeatures(DatabaseInstanceSettingsAdvancedMachineFeaturesArgs.builder()
            .threadsPerCore(0)
            .build())
        .ipConfiguration(DatabaseInstanceSettingsIpConfigurationArgs.builder()
            .allocatedIpRange("string")
            .authorizedNetworks(DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs.builder()
                .value("string")
                .expirationTime("string")
                .name("string")
                .build())
            .enablePrivatePathForGoogleCloudServices(false)
            .ipv4Enabled(false)
            .privateNetwork("string")
            .pscConfigs(DatabaseInstanceSettingsIpConfigurationPscConfigArgs.builder()
                .allowedConsumerProjects("string")
                .pscAutoConnections(DatabaseInstanceSettingsIpConfigurationPscConfigPscAutoConnectionArgs.builder()
                    .consumerNetwork("string")
                    .consumerServiceProjectId("string")
                    .build())
                .pscEnabled(false)
                .build())
            .serverCaMode("string")
            .serverCaPool("string")
            .sslMode("string")
            .build())
        .enableDataplexIntegration(false)
        .enableGoogleMlIntegration(false)
        .insightsConfig(DatabaseInstanceSettingsInsightsConfigArgs.builder()
            .queryInsightsEnabled(false)
            .queryPlansPerMinute(0)
            .queryStringLength(0)
            .recordApplicationTags(false)
            .recordClientAddress(false)
            .build())
        .edition("string")
        .locationPreference(DatabaseInstanceSettingsLocationPreferenceArgs.builder()
            .followGaeApplication("string")
            .secondaryZone("string")
            .zone("string")
            .build())
        .maintenanceWindow(DatabaseInstanceSettingsMaintenanceWindowArgs.builder()
            .day(0)
            .hour(0)
            .updateTrack("string")
            .build())
        .passwordValidationPolicy(DatabaseInstanceSettingsPasswordValidationPolicyArgs.builder()
            .enablePasswordPolicy(false)
            .complexity("string")
            .disallowUsernameSubstring(false)
            .minLength(0)
            .passwordChangeInterval("string")
            .reuseInterval(0)
            .build())
        .pricingPlan("string")
        .sqlServerAuditConfig(DatabaseInstanceSettingsSqlServerAuditConfigArgs.builder()
            .bucket("string")
            .retentionInterval("string")
            .uploadInterval("string")
            .build())
        .activeDirectoryConfig(DatabaseInstanceSettingsActiveDirectoryConfigArgs.builder()
            .domain("string")
            .build())
        .activationPolicy("string")
        .userLabels(Map.of("string", "string"))
        .diskSize(0)
        .build())
    .build());
gcp_database_instance_resource = gcp.sql.DatabaseInstance("gcpDatabaseInstanceResource",
    database_version="string",
    project="string",
    region="string",
    encryption_key_name="string",
    instance_type="string",
    maintenance_version="string",
    master_instance_name="string",
    deletion_protection=False,
    clone={
        "source_instance_name": "string",
        "allocated_ip_range": "string",
        "database_names": ["string"],
        "point_in_time": "string",
        "preferred_zone": "string",
    },
    name="string",
    replica_configuration={
        "ca_certificate": "string",
        "cascadable_replica": False,
        "client_certificate": "string",
        "client_key": "string",
        "connect_retry_interval": 0,
        "dump_file_path": "string",
        "failover_target": False,
        "master_heartbeat_period": 0,
        "password": "string",
        "ssl_cipher": "string",
        "username": "string",
        "verify_server_certificate": False,
    },
    replica_names=["string"],
    replication_cluster={
        "dr_replica": False,
        "failover_dr_replica_name": "string",
    },
    restore_backup_context={
        "backup_run_id": 0,
        "instance_id": "string",
        "project": "string",
    },
    root_password="string",
    settings={
        "tier": "string",
        "disk_type": "string",
        "time_zone": "string",
        "availability_type": "string",
        "backup_configuration": {
            "backup_retention_settings": {
                "retained_backups": 0,
                "retention_unit": "string",
            },
            "binary_log_enabled": False,
            "enabled": False,
            "location": "string",
            "point_in_time_recovery_enabled": False,
            "start_time": "string",
            "transaction_log_retention_days": 0,
        },
        "collation": "string",
        "connector_enforcement": "string",
        "data_cache_config": {
            "data_cache_enabled": False,
        },
        "database_flags": [{
            "name": "string",
            "value": "string",
        }],
        "deletion_protection_enabled": False,
        "deny_maintenance_period": {
            "end_date": "string",
            "start_date": "string",
            "time": "string",
        },
        "disk_autoresize": False,
        "disk_autoresize_limit": 0,
        "version": 0,
        "advanced_machine_features": {
            "threads_per_core": 0,
        },
        "ip_configuration": {
            "allocated_ip_range": "string",
            "authorized_networks": [{
                "value": "string",
                "expiration_time": "string",
                "name": "string",
            }],
            "enable_private_path_for_google_cloud_services": False,
            "ipv4_enabled": False,
            "private_network": "string",
            "psc_configs": [{
                "allowed_consumer_projects": ["string"],
                "psc_auto_connections": [{
                    "consumer_network": "string",
                    "consumer_service_project_id": "string",
                }],
                "psc_enabled": False,
            }],
            "server_ca_mode": "string",
            "server_ca_pool": "string",
            "ssl_mode": "string",
        },
        "enable_dataplex_integration": False,
        "enable_google_ml_integration": False,
        "insights_config": {
            "query_insights_enabled": False,
            "query_plans_per_minute": 0,
            "query_string_length": 0,
            "record_application_tags": False,
            "record_client_address": False,
        },
        "edition": "string",
        "location_preference": {
            "follow_gae_application": "string",
            "secondary_zone": "string",
            "zone": "string",
        },
        "maintenance_window": {
            "day": 0,
            "hour": 0,
            "update_track": "string",
        },
        "password_validation_policy": {
            "enable_password_policy": False,
            "complexity": "string",
            "disallow_username_substring": False,
            "min_length": 0,
            "password_change_interval": "string",
            "reuse_interval": 0,
        },
        "pricing_plan": "string",
        "sql_server_audit_config": {
            "bucket": "string",
            "retention_interval": "string",
            "upload_interval": "string",
        },
        "active_directory_config": {
            "domain": "string",
        },
        "activation_policy": "string",
        "user_labels": {
            "string": "string",
        },
        "disk_size": 0,
    })
const gcpDatabaseInstanceResource = new gcp.sql.DatabaseInstance("gcpDatabaseInstanceResource", {
    databaseVersion: "string",
    project: "string",
    region: "string",
    encryptionKeyName: "string",
    instanceType: "string",
    maintenanceVersion: "string",
    masterInstanceName: "string",
    deletionProtection: false,
    clone: {
        sourceInstanceName: "string",
        allocatedIpRange: "string",
        databaseNames: ["string"],
        pointInTime: "string",
        preferredZone: "string",
    },
    name: "string",
    replicaConfiguration: {
        caCertificate: "string",
        cascadableReplica: false,
        clientCertificate: "string",
        clientKey: "string",
        connectRetryInterval: 0,
        dumpFilePath: "string",
        failoverTarget: false,
        masterHeartbeatPeriod: 0,
        password: "string",
        sslCipher: "string",
        username: "string",
        verifyServerCertificate: false,
    },
    replicaNames: ["string"],
    replicationCluster: {
        drReplica: false,
        failoverDrReplicaName: "string",
    },
    restoreBackupContext: {
        backupRunId: 0,
        instanceId: "string",
        project: "string",
    },
    rootPassword: "string",
    settings: {
        tier: "string",
        diskType: "string",
        timeZone: "string",
        availabilityType: "string",
        backupConfiguration: {
            backupRetentionSettings: {
                retainedBackups: 0,
                retentionUnit: "string",
            },
            binaryLogEnabled: false,
            enabled: false,
            location: "string",
            pointInTimeRecoveryEnabled: false,
            startTime: "string",
            transactionLogRetentionDays: 0,
        },
        collation: "string",
        connectorEnforcement: "string",
        dataCacheConfig: {
            dataCacheEnabled: false,
        },
        databaseFlags: [{
            name: "string",
            value: "string",
        }],
        deletionProtectionEnabled: false,
        denyMaintenancePeriod: {
            endDate: "string",
            startDate: "string",
            time: "string",
        },
        diskAutoresize: false,
        diskAutoresizeLimit: 0,
        version: 0,
        advancedMachineFeatures: {
            threadsPerCore: 0,
        },
        ipConfiguration: {
            allocatedIpRange: "string",
            authorizedNetworks: [{
                value: "string",
                expirationTime: "string",
                name: "string",
            }],
            enablePrivatePathForGoogleCloudServices: false,
            ipv4Enabled: false,
            privateNetwork: "string",
            pscConfigs: [{
                allowedConsumerProjects: ["string"],
                pscAutoConnections: [{
                    consumerNetwork: "string",
                    consumerServiceProjectId: "string",
                }],
                pscEnabled: false,
            }],
            serverCaMode: "string",
            serverCaPool: "string",
            sslMode: "string",
        },
        enableDataplexIntegration: false,
        enableGoogleMlIntegration: false,
        insightsConfig: {
            queryInsightsEnabled: false,
            queryPlansPerMinute: 0,
            queryStringLength: 0,
            recordApplicationTags: false,
            recordClientAddress: false,
        },
        edition: "string",
        locationPreference: {
            followGaeApplication: "string",
            secondaryZone: "string",
            zone: "string",
        },
        maintenanceWindow: {
            day: 0,
            hour: 0,
            updateTrack: "string",
        },
        passwordValidationPolicy: {
            enablePasswordPolicy: false,
            complexity: "string",
            disallowUsernameSubstring: false,
            minLength: 0,
            passwordChangeInterval: "string",
            reuseInterval: 0,
        },
        pricingPlan: "string",
        sqlServerAuditConfig: {
            bucket: "string",
            retentionInterval: "string",
            uploadInterval: "string",
        },
        activeDirectoryConfig: {
            domain: "string",
        },
        activationPolicy: "string",
        userLabels: {
            string: "string",
        },
        diskSize: 0,
    },
});
type: gcp:sql:DatabaseInstance
properties:
    clone:
        allocatedIpRange: string
        databaseNames:
            - string
        pointInTime: string
        preferredZone: string
        sourceInstanceName: string
    databaseVersion: string
    deletionProtection: false
    encryptionKeyName: string
    instanceType: string
    maintenanceVersion: string
    masterInstanceName: string
    name: string
    project: string
    region: string
    replicaConfiguration:
        caCertificate: string
        cascadableReplica: false
        clientCertificate: string
        clientKey: string
        connectRetryInterval: 0
        dumpFilePath: string
        failoverTarget: false
        masterHeartbeatPeriod: 0
        password: string
        sslCipher: string
        username: string
        verifyServerCertificate: false
    replicaNames:
        - string
    replicationCluster:
        drReplica: false
        failoverDrReplicaName: string
    restoreBackupContext:
        backupRunId: 0
        instanceId: string
        project: string
    rootPassword: string
    settings:
        activationPolicy: string
        activeDirectoryConfig:
            domain: string
        advancedMachineFeatures:
            threadsPerCore: 0
        availabilityType: string
        backupConfiguration:
            backupRetentionSettings:
                retainedBackups: 0
                retentionUnit: string
            binaryLogEnabled: false
            enabled: false
            location: string
            pointInTimeRecoveryEnabled: false
            startTime: string
            transactionLogRetentionDays: 0
        collation: string
        connectorEnforcement: string
        dataCacheConfig:
            dataCacheEnabled: false
        databaseFlags:
            - name: string
              value: string
        deletionProtectionEnabled: false
        denyMaintenancePeriod:
            endDate: string
            startDate: string
            time: string
        diskAutoresize: false
        diskAutoresizeLimit: 0
        diskSize: 0
        diskType: string
        edition: string
        enableDataplexIntegration: false
        enableGoogleMlIntegration: false
        insightsConfig:
            queryInsightsEnabled: false
            queryPlansPerMinute: 0
            queryStringLength: 0
            recordApplicationTags: false
            recordClientAddress: false
        ipConfiguration:
            allocatedIpRange: string
            authorizedNetworks:
                - expirationTime: string
                  name: string
                  value: string
            enablePrivatePathForGoogleCloudServices: false
            ipv4Enabled: false
            privateNetwork: string
            pscConfigs:
                - allowedConsumerProjects:
                    - string
                  pscAutoConnections:
                    - consumerNetwork: string
                      consumerServiceProjectId: string
                  pscEnabled: false
            serverCaMode: string
            serverCaPool: string
            sslMode: string
        locationPreference:
            followGaeApplication: string
            secondaryZone: string
            zone: string
        maintenanceWindow:
            day: 0
            hour: 0
            updateTrack: string
        passwordValidationPolicy:
            complexity: string
            disallowUsernameSubstring: false
            enablePasswordPolicy: false
            minLength: 0
            passwordChangeInterval: string
            reuseInterval: 0
        pricingPlan: string
        sqlServerAuditConfig:
            bucket: string
            retentionInterval: string
            uploadInterval: string
        tier: string
        timeZone: string
        userLabels:
            string: string
        version: 0
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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,MYSQL_8_4,POSTGRES_9_6,POSTGRES_10,POSTGRES_11,POSTGRES_12,POSTGRES_13,POSTGRES_14,POSTGRES_15,POSTGRES_16,POSTGRES_17,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
DatabaseInstance Clone 
- 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 destroyorupdatecommand that deletes the instance will fail. Defaults totrue.
- EncryptionKey stringName 
- 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/Decrypterrole 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_INSTANCEandREAD_REPLICA_INSTANCE.
- MaintenanceVersion string
- The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versionsattribute to see whatmaintenance_versionare available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_versionvalue that is older than the current one on the instance will be ignored.
- MasterInstance stringName 
- 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_enabledset, 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 DatabaseInstance Replica Configuration 
- The configuration for replication. The configuration is detailed below.
- ReplicaNames List<string>
- List of replica names. Can be updated.
- ReplicationCluster DatabaseInstance Replication Cluster 
- A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.
- RestoreBackup DatabaseContext Instance Restore Backup Context 
- 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
DatabaseInstance Settings 
- The settings to use for the database. The
configuration is detailed below. Required if cloneis 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,MYSQL_8_4,POSTGRES_9_6,POSTGRES_10,POSTGRES_11,POSTGRES_12,POSTGRES_13,POSTGRES_14,POSTGRES_15,POSTGRES_16,POSTGRES_17,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
DatabaseInstance Clone Args 
- 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 destroyorupdatecommand that deletes the instance will fail. Defaults totrue.
- EncryptionKey stringName 
- 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/Decrypterrole 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_INSTANCEandREAD_REPLICA_INSTANCE.
- MaintenanceVersion string
- The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versionsattribute to see whatmaintenance_versionare available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_versionvalue that is older than the current one on the instance will be ignored.
- MasterInstance stringName 
- 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_enabledset, 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 DatabaseInstance Replica Configuration Args 
- The configuration for replication. The configuration is detailed below.
- ReplicaNames []string
- List of replica names. Can be updated.
- ReplicationCluster DatabaseInstance Replication Cluster Args 
- A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.
- RestoreBackup DatabaseContext Instance Restore Backup Context Args 
- 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
DatabaseInstance Settings Args 
- The settings to use for the database. The
configuration is detailed below. Required if cloneis 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,MYSQL_8_4,POSTGRES_9_6,POSTGRES_10,POSTGRES_11,POSTGRES_12,POSTGRES_13,POSTGRES_14,POSTGRES_15,POSTGRES_16,POSTGRES_17,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_
DatabaseInstance Clone 
- 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 destroyorupdatecommand that deletes the instance will fail. Defaults totrue.
- encryptionKey StringName 
- 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/Decrypterrole 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_INSTANCEandREAD_REPLICA_INSTANCE.
- maintenanceVersion String
- The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versionsattribute to see whatmaintenance_versionare available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_versionvalue that is older than the current one on the instance will be ignored.
- masterInstance StringName 
- 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_enabledset, 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 DatabaseInstance Replica Configuration 
- The configuration for replication. The configuration is detailed below.
- replicaNames List<String>
- List of replica names. Can be updated.
- replicationCluster DatabaseInstance Replication Cluster 
- A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.
- restoreBackup DatabaseContext Instance Restore Backup Context 
- 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
DatabaseInstance Settings 
- The settings to use for the database. The
configuration is detailed below. Required if cloneis 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,MYSQL_8_4,POSTGRES_9_6,POSTGRES_10,POSTGRES_11,POSTGRES_12,POSTGRES_13,POSTGRES_14,POSTGRES_15,POSTGRES_16,POSTGRES_17,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
DatabaseInstance Clone 
- 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 destroyorupdatecommand that deletes the instance will fail. Defaults totrue.
- encryptionKey stringName 
- 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/Decrypterrole 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_INSTANCEandREAD_REPLICA_INSTANCE.
- maintenanceVersion string
- The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versionsattribute to see whatmaintenance_versionare available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_versionvalue that is older than the current one on the instance will be ignored.
- masterInstance stringName 
- 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_enabledset, 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 DatabaseInstance Replica Configuration 
- The configuration for replication. The configuration is detailed below.
- replicaNames string[]
- List of replica names. Can be updated.
- replicationCluster DatabaseInstance Replication Cluster 
- A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.
- restoreBackup DatabaseContext Instance Restore Backup Context 
- 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
DatabaseInstance Settings 
- The settings to use for the database. The
configuration is detailed below. Required if cloneis 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,MYSQL_8_4,POSTGRES_9_6,POSTGRES_10,POSTGRES_11,POSTGRES_12,POSTGRES_13,POSTGRES_14,POSTGRES_15,POSTGRES_16,POSTGRES_17,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
DatabaseInstance Clone Args 
- 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 destroyorupdatecommand that deletes the instance will fail. Defaults totrue.
- encryption_key_ strname 
- 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/Decrypterrole 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_INSTANCEandREAD_REPLICA_INSTANCE.
- maintenance_version str
- The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versionsattribute to see whatmaintenance_versionare available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_versionvalue that is older than the current one on the instance will be ignored.
- master_instance_ strname 
- 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_enabledset, 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 DatabaseInstance Replica Configuration Args 
- The configuration for replication. The configuration is detailed below.
- replica_names Sequence[str]
- List of replica names. Can be updated.
- replication_cluster DatabaseInstance Replication Cluster Args 
- A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.
- restore_backup_ Databasecontext Instance Restore Backup Context Args 
- 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
DatabaseInstance Settings Args 
- The settings to use for the database. The
configuration is detailed below. Required if cloneis 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,MYSQL_8_4,POSTGRES_9_6,POSTGRES_10,POSTGRES_11,POSTGRES_12,POSTGRES_13,POSTGRES_14,POSTGRES_15,POSTGRES_16,POSTGRES_17,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 destroyorupdatecommand that deletes the instance will fail. Defaults totrue.
- encryptionKey StringName 
- 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/Decrypterrole 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_INSTANCEandREAD_REPLICA_INSTANCE.
- maintenanceVersion String
- The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versionsattribute to see whatmaintenance_versionare available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_versionvalue that is older than the current one on the instance will be ignored.
- masterInstance StringName 
- 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_enabledset, 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.
- replicaNames List<String>
- List of replica names. Can be updated.
- replicationCluster Property Map
- A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.
- restoreBackup Property MapContext 
- 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 cloneis not set.
Outputs
All input properties are implicitly available as output properties. Additionally, the DatabaseInstance resource produces the following output properties:
- AvailableMaintenance List<string>Versions 
- 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. See Connect to an instance using Private Service Connect for more details.
- FirstIp stringAddress 
- The first IPv4 address of any type assigned.
- Id string
- The provider-assigned unique ID for this managed resource.
- IpAddresses List<DatabaseInstance Ip Address> 
- PrivateIp stringAddress 
- The first private (PRIVATE) IPv4 address assigned.
- PscService stringAttachment Link 
- the URI that points to the service attachment of the instance.
- PublicIp stringAddress 
- The first public (PRIMARY) IPv4 address assigned.
- SelfLink string
- The URI of the created resource.
- ServerCa List<DatabaseCerts Instance Server Ca Cert> 
- ServiceAccount stringEmail Address 
- The service account email address assigned to the instance.
- AvailableMaintenance []stringVersions 
- 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. See Connect to an instance using Private Service Connect for more details.
- FirstIp stringAddress 
- The first IPv4 address of any type assigned.
- Id string
- The provider-assigned unique ID for this managed resource.
- IpAddresses []DatabaseInstance Ip Address 
- PrivateIp stringAddress 
- The first private (PRIVATE) IPv4 address assigned.
- PscService stringAttachment Link 
- the URI that points to the service attachment of the instance.
- PublicIp stringAddress 
- The first public (PRIMARY) IPv4 address assigned.
- SelfLink string
- The URI of the created resource.
- ServerCa []DatabaseCerts Instance Server Ca Cert 
- ServiceAccount stringEmail Address 
- The service account email address assigned to the instance.
- availableMaintenance List<String>Versions 
- 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. See Connect to an instance using Private Service Connect for more details.
- firstIp StringAddress 
- The first IPv4 address of any type assigned.
- id String
- The provider-assigned unique ID for this managed resource.
- ipAddresses List<DatabaseInstance Ip Address> 
- privateIp StringAddress 
- The first private (PRIVATE) IPv4 address assigned.
- pscService StringAttachment Link 
- the URI that points to the service attachment of the instance.
- publicIp StringAddress 
- The first public (PRIMARY) IPv4 address assigned.
- selfLink String
- The URI of the created resource.
- serverCa List<DatabaseCerts Instance Server Ca Cert> 
- serviceAccount StringEmail Address 
- The service account email address assigned to the instance.
- availableMaintenance string[]Versions 
- 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. See Connect to an instance using Private Service Connect for more details.
- firstIp stringAddress 
- The first IPv4 address of any type assigned.
- id string
- The provider-assigned unique ID for this managed resource.
- ipAddresses DatabaseInstance Ip Address[] 
- privateIp stringAddress 
- The first private (PRIVATE) IPv4 address assigned.
- pscService stringAttachment Link 
- the URI that points to the service attachment of the instance.
- publicIp stringAddress 
- The first public (PRIMARY) IPv4 address assigned.
- selfLink string
- The URI of the created resource.
- serverCa DatabaseCerts Instance Server Ca Cert[] 
- serviceAccount stringEmail Address 
- The service account email address assigned to the instance.
- available_maintenance_ Sequence[str]versions 
- 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. See Connect to an instance using Private Service Connect for more details.
- first_ip_ straddress 
- The first IPv4 address of any type assigned.
- id str
- The provider-assigned unique ID for this managed resource.
- ip_addresses Sequence[DatabaseInstance Ip Address] 
- private_ip_ straddress 
- The first private (PRIVATE) IPv4 address assigned.
- psc_service_ strattachment_ link 
- the URI that points to the service attachment of the instance.
- public_ip_ straddress 
- The first public (PRIMARY) IPv4 address assigned.
- self_link str
- The URI of the created resource.
- server_ca_ Sequence[Databasecerts Instance Server Ca Cert] 
- service_account_ stremail_ address 
- The service account email address assigned to the instance.
- availableMaintenance List<String>Versions 
- 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. See Connect to an instance using Private Service Connect for more details.
- firstIp StringAddress 
- The first IPv4 address of any type assigned.
- id String
- The provider-assigned unique ID for this managed resource.
- ipAddresses List<Property Map>
- privateIp StringAddress 
- The first private (PRIVATE) IPv4 address assigned.
- pscService StringAttachment Link 
- the URI that points to the service attachment of the instance.
- publicIp StringAddress 
- The first public (PRIMARY) IPv4 address assigned.
- selfLink String
- The URI of the created resource.
- serverCa List<Property Map>Certs 
- serviceAccount StringEmail Address 
- 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,
        replica_names: Optional[Sequence[str]] = None,
        replication_cluster: Optional[DatabaseInstanceReplicationClusterArgs] = 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) -> DatabaseInstancefunc 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)resources:  _:    type: gcp:sql:DatabaseInstance    get:      id: ${id}- 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.
- AvailableMaintenance List<string>Versions 
- The list of all maintenance versions applicable on the instance.
- Clone
DatabaseInstance Clone 
- 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,MYSQL_8_4,POSTGRES_9_6,POSTGRES_10,POSTGRES_11,POSTGRES_12,POSTGRES_13,POSTGRES_14,POSTGRES_15,POSTGRES_16,POSTGRES_17,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 destroyorupdatecommand that deletes the instance will fail. Defaults totrue.
- DnsName string
- The DNS name of the instance. See Connect to an instance using Private Service Connect for more details.
- EncryptionKey stringName 
- 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/Decrypterrole on your key - please see this step.
- FirstIp stringAddress 
- 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_INSTANCEandREAD_REPLICA_INSTANCE.
- IpAddresses List<DatabaseInstance Ip Address> 
- MaintenanceVersion string
- The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versionsattribute to see whatmaintenance_versionare available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_versionvalue that is older than the current one on the instance will be ignored.
- MasterInstance stringName 
- 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_enabledset, 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.
- PrivateIp stringAddress 
- 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.
- PscService stringAttachment Link 
- the URI that points to the service attachment of the instance.
- PublicIp stringAddress 
- 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 DatabaseInstance Replica Configuration 
- The configuration for replication. The configuration is detailed below.
- ReplicaNames List<string>
- List of replica names. Can be updated.
- ReplicationCluster DatabaseInstance Replication Cluster 
- A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.
- RestoreBackup DatabaseContext Instance Restore Backup Context 
- 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.
- ServerCa List<DatabaseCerts Instance Server Ca Cert> 
- ServiceAccount stringEmail Address 
- The service account email address assigned to the instance.
- Settings
DatabaseInstance Settings 
- The settings to use for the database. The
configuration is detailed below. Required if cloneis not set.
- AvailableMaintenance []stringVersions 
- The list of all maintenance versions applicable on the instance.
- Clone
DatabaseInstance Clone Args 
- 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,MYSQL_8_4,POSTGRES_9_6,POSTGRES_10,POSTGRES_11,POSTGRES_12,POSTGRES_13,POSTGRES_14,POSTGRES_15,POSTGRES_16,POSTGRES_17,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 destroyorupdatecommand that deletes the instance will fail. Defaults totrue.
- DnsName string
- The DNS name of the instance. See Connect to an instance using Private Service Connect for more details.
- EncryptionKey stringName 
- 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/Decrypterrole on your key - please see this step.
- FirstIp stringAddress 
- 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_INSTANCEandREAD_REPLICA_INSTANCE.
- IpAddresses []DatabaseInstance Ip Address Args 
- MaintenanceVersion string
- The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versionsattribute to see whatmaintenance_versionare available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_versionvalue that is older than the current one on the instance will be ignored.
- MasterInstance stringName 
- 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_enabledset, 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.
- PrivateIp stringAddress 
- 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.
- PscService stringAttachment Link 
- the URI that points to the service attachment of the instance.
- PublicIp stringAddress 
- 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 DatabaseInstance Replica Configuration Args 
- The configuration for replication. The configuration is detailed below.
- ReplicaNames []string
- List of replica names. Can be updated.
- ReplicationCluster DatabaseInstance Replication Cluster Args 
- A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.
- RestoreBackup DatabaseContext Instance Restore Backup Context Args 
- 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.
- ServerCa []DatabaseCerts Instance Server Ca Cert Args 
- ServiceAccount stringEmail Address 
- The service account email address assigned to the instance.
- Settings
DatabaseInstance Settings Args 
- The settings to use for the database. The
configuration is detailed below. Required if cloneis not set.
- availableMaintenance List<String>Versions 
- The list of all maintenance versions applicable on the instance.
- clone_
DatabaseInstance Clone 
- 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,MYSQL_8_4,POSTGRES_9_6,POSTGRES_10,POSTGRES_11,POSTGRES_12,POSTGRES_13,POSTGRES_14,POSTGRES_15,POSTGRES_16,POSTGRES_17,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 destroyorupdatecommand that deletes the instance will fail. Defaults totrue.
- dnsName String
- The DNS name of the instance. See Connect to an instance using Private Service Connect for more details.
- encryptionKey StringName 
- 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/Decrypterrole on your key - please see this step.
- firstIp StringAddress 
- 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_INSTANCEandREAD_REPLICA_INSTANCE.
- ipAddresses List<DatabaseInstance Ip Address> 
- maintenanceVersion String
- The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versionsattribute to see whatmaintenance_versionare available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_versionvalue that is older than the current one on the instance will be ignored.
- masterInstance StringName 
- 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_enabledset, 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.
- privateIp StringAddress 
- 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.
- pscService StringAttachment Link 
- the URI that points to the service attachment of the instance.
- publicIp StringAddress 
- 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 DatabaseInstance Replica Configuration 
- The configuration for replication. The configuration is detailed below.
- replicaNames List<String>
- List of replica names. Can be updated.
- replicationCluster DatabaseInstance Replication Cluster 
- A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.
- restoreBackup DatabaseContext Instance Restore Backup Context 
- 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.
- serverCa List<DatabaseCerts Instance Server Ca Cert> 
- serviceAccount StringEmail Address 
- The service account email address assigned to the instance.
- settings
DatabaseInstance Settings 
- The settings to use for the database. The
configuration is detailed below. Required if cloneis not set.
- availableMaintenance string[]Versions 
- The list of all maintenance versions applicable on the instance.
- clone
DatabaseInstance Clone 
- 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,MYSQL_8_4,POSTGRES_9_6,POSTGRES_10,POSTGRES_11,POSTGRES_12,POSTGRES_13,POSTGRES_14,POSTGRES_15,POSTGRES_16,POSTGRES_17,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 destroyorupdatecommand that deletes the instance will fail. Defaults totrue.
- dnsName string
- The DNS name of the instance. See Connect to an instance using Private Service Connect for more details.
- encryptionKey stringName 
- 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/Decrypterrole on your key - please see this step.
- firstIp stringAddress 
- 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_INSTANCEandREAD_REPLICA_INSTANCE.
- ipAddresses DatabaseInstance Ip Address[] 
- maintenanceVersion string
- The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versionsattribute to see whatmaintenance_versionare available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_versionvalue that is older than the current one on the instance will be ignored.
- masterInstance stringName 
- 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_enabledset, 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.
- privateIp stringAddress 
- 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.
- pscService stringAttachment Link 
- the URI that points to the service attachment of the instance.
- publicIp stringAddress 
- 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 DatabaseInstance Replica Configuration 
- The configuration for replication. The configuration is detailed below.
- replicaNames string[]
- List of replica names. Can be updated.
- replicationCluster DatabaseInstance Replication Cluster 
- A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.
- restoreBackup DatabaseContext Instance Restore Backup Context 
- 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.
- serverCa DatabaseCerts Instance Server Ca Cert[] 
- serviceAccount stringEmail Address 
- The service account email address assigned to the instance.
- settings
DatabaseInstance Settings 
- The settings to use for the database. The
configuration is detailed below. Required if cloneis not set.
- available_maintenance_ Sequence[str]versions 
- The list of all maintenance versions applicable on the instance.
- clone
DatabaseInstance Clone Args 
- 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,MYSQL_8_4,POSTGRES_9_6,POSTGRES_10,POSTGRES_11,POSTGRES_12,POSTGRES_13,POSTGRES_14,POSTGRES_15,POSTGRES_16,POSTGRES_17,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 destroyorupdatecommand that deletes the instance will fail. Defaults totrue.
- dns_name str
- The DNS name of the instance. See Connect to an instance using Private Service Connect for more details.
- encryption_key_ strname 
- 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/Decrypterrole on your key - please see this step.
- first_ip_ straddress 
- 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_INSTANCEandREAD_REPLICA_INSTANCE.
- ip_addresses Sequence[DatabaseInstance Ip Address Args] 
- maintenance_version str
- The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versionsattribute to see whatmaintenance_versionare available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_versionvalue that is older than the current one on the instance will be ignored.
- master_instance_ strname 
- 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_enabledset, 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_ straddress 
- 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_ strattachment_ link 
- the URI that points to the service attachment of the instance.
- public_ip_ straddress 
- 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 DatabaseInstance Replica Configuration Args 
- The configuration for replication. The configuration is detailed below.
- replica_names Sequence[str]
- List of replica names. Can be updated.
- replication_cluster DatabaseInstance Replication Cluster Args 
- A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.
- restore_backup_ Databasecontext Instance Restore Backup Context Args 
- 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_ Sequence[Databasecerts Instance Server Ca Cert Args] 
- service_account_ stremail_ address 
- The service account email address assigned to the instance.
- settings
DatabaseInstance Settings Args 
- The settings to use for the database. The
configuration is detailed below. Required if cloneis not set.
- availableMaintenance List<String>Versions 
- 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,MYSQL_8_4,POSTGRES_9_6,POSTGRES_10,POSTGRES_11,POSTGRES_12,POSTGRES_13,POSTGRES_14,POSTGRES_15,POSTGRES_16,POSTGRES_17,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 destroyorupdatecommand that deletes the instance will fail. Defaults totrue.
- dnsName String
- The DNS name of the instance. See Connect to an instance using Private Service Connect for more details.
- encryptionKey StringName 
- 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/Decrypterrole on your key - please see this step.
- firstIp StringAddress 
- 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_INSTANCEandREAD_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_versionsattribute to see whatmaintenance_versionare available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_versionvalue that is older than the current one on the instance will be ignored.
- masterInstance StringName 
- 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_enabledset, 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.
- privateIp StringAddress 
- 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.
- pscService StringAttachment Link 
- the URI that points to the service attachment of the instance.
- publicIp StringAddress 
- 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.
- replicaNames List<String>
- List of replica names. Can be updated.
- replicationCluster Property Map
- A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.
- restoreBackup Property MapContext 
- 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.
- serverCa List<Property Map>Certs 
- serviceAccount StringEmail Address 
- 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 cloneis not set.
Supporting Types
DatabaseInstanceClone, DatabaseInstanceCloneArgs      
- SourceInstance stringName 
- Name of the source instance which will be cloned.
- AllocatedIp stringRange 
- 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.
- PointIn stringTime 
- 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
- SourceInstance stringName 
- Name of the source instance which will be cloned.
- AllocatedIp stringRange 
- 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.
- PointIn stringTime 
- 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
- sourceInstance StringName 
- Name of the source instance which will be cloned.
- allocatedIp StringRange 
- 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.
- pointIn StringTime 
- 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
- sourceInstance stringName 
- Name of the source instance which will be cloned.
- allocatedIp stringRange 
- 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.
- pointIn stringTime 
- 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_ strname 
- Name of the source instance which will be cloned.
- allocated_ip_ strrange 
- 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_ strtime 
- 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
- sourceInstance StringName 
- Name of the source instance which will be cloned.
- allocatedIp StringRange 
- 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.
- pointIn StringTime 
- 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
- The IPv4 address assigned.
- TimeTo stringRetire 
- The time this IP address will be retired, in RFC 3339 format.
- Type string
- The type of this IP address.
- IpAddress string
- The IPv4 address assigned.
- TimeTo stringRetire 
- The time this IP address will be retired, in RFC 3339 format.
- Type string
- The type of this IP address.
- ipAddress String
- The IPv4 address assigned.
- timeTo StringRetire 
- The time this IP address will be retired, in RFC 3339 format.
- type String
- The type of this IP address.
- ipAddress string
- The IPv4 address assigned.
- timeTo stringRetire 
- The time this IP address will be retired, in RFC 3339 format.
- type string
- The type of this IP address.
- ip_address str
- The IPv4 address assigned.
- time_to_ strretire 
- The time this IP address will be retired, in RFC 3339 format.
- type str
- The type of this IP address.
- ipAddress String
- The IPv4 address assigned.
- timeTo StringRetire 
- The time this IP address will be retired, in RFC 3339 format.
- type String
- The type of this IP address.
DatabaseInstanceReplicaConfiguration, DatabaseInstanceReplicaConfigurationArgs        
- CaCertificate string
- PEM representation of the trusted CA's x509 certificate.
- CascadableReplica bool
- Specifies if the replica is a cascadable replica. If true, instance must be in different region from primary. - NOTE: Only supported for SQL Server database. 
- 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.
- ConnectRetry intInterval 
- The number of seconds between connect retries. MySQL's default is 60 seconds.
- DumpFile stringPath 
- Path to a SQL file in GCS from which replica
instances are created. Format is gs://bucket/filename. Note, if the master instance is a source representation instance this field must be present.
- 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. 
- MasterHeartbeat intPeriod 
- 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.
- VerifyServer boolCertificate 
- 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.
- CascadableReplica bool
- Specifies if the replica is a cascadable replica. If true, instance must be in different region from primary. - NOTE: Only supported for SQL Server database. 
- 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.
- ConnectRetry intInterval 
- The number of seconds between connect retries. MySQL's default is 60 seconds.
- DumpFile stringPath 
- Path to a SQL file in GCS from which replica
instances are created. Format is gs://bucket/filename. Note, if the master instance is a source representation instance this field must be present.
- 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. 
- MasterHeartbeat intPeriod 
- 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.
- VerifyServer boolCertificate 
- 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.
- cascadableReplica Boolean
- Specifies if the replica is a cascadable replica. If true, instance must be in different region from primary. - NOTE: Only supported for SQL Server database. 
- 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.
- connectRetry IntegerInterval 
- The number of seconds between connect retries. MySQL's default is 60 seconds.
- dumpFile StringPath 
- Path to a SQL file in GCS from which replica
instances are created. Format is gs://bucket/filename. Note, if the master instance is a source representation instance this field must be present.
- 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. 
- masterHeartbeat IntegerPeriod 
- 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.
- verifyServer BooleanCertificate 
- 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.
- cascadableReplica boolean
- Specifies if the replica is a cascadable replica. If true, instance must be in different region from primary. - NOTE: Only supported for SQL Server database. 
- 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.
- connectRetry numberInterval 
- The number of seconds between connect retries. MySQL's default is 60 seconds.
- dumpFile stringPath 
- Path to a SQL file in GCS from which replica
instances are created. Format is gs://bucket/filename. Note, if the master instance is a source representation instance this field must be present.
- 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. 
- masterHeartbeat numberPeriod 
- 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.
- verifyServer booleanCertificate 
- 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.
- cascadable_replica bool
- Specifies if the replica is a cascadable replica. If true, instance must be in different region from primary. - NOTE: Only supported for SQL Server database. 
- 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_ intinterval 
- The number of seconds between connect retries. MySQL's default is 60 seconds.
- dump_file_ strpath 
- Path to a SQL file in GCS from which replica
instances are created. Format is gs://bucket/filename. Note, if the master instance is a source representation instance this field must be present.
- 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_ intperiod 
- 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_ boolcertificate 
- 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.
- cascadableReplica Boolean
- Specifies if the replica is a cascadable replica. If true, instance must be in different region from primary. - NOTE: Only supported for SQL Server database. 
- 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.
- connectRetry NumberInterval 
- The number of seconds between connect retries. MySQL's default is 60 seconds.
- dumpFile StringPath 
- Path to a SQL file in GCS from which replica
instances are created. Format is gs://bucket/filename. Note, if the master instance is a source representation instance this field must be present.
- 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. 
- masterHeartbeat NumberPeriod 
- 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.
- verifyServer BooleanCertificate 
- True if the master's common name value is checked during the SSL handshake.
DatabaseInstanceReplicationCluster, DatabaseInstanceReplicationClusterArgs        
- DrReplica bool
- Read-only field that indicates whether the replica is a DR replica.
- FailoverDr stringReplica Name 
- If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. The standard format of this field is "your-project:your-instance". You can also set this field to "your-instance", but cloud SQL backend will convert it to the aforementioned standard format.
- DrReplica bool
- Read-only field that indicates whether the replica is a DR replica.
- FailoverDr stringReplica Name 
- If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. The standard format of this field is "your-project:your-instance". You can also set this field to "your-instance", but cloud SQL backend will convert it to the aforementioned standard format.
- drReplica Boolean
- Read-only field that indicates whether the replica is a DR replica.
- failoverDr StringReplica Name 
- If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. The standard format of this field is "your-project:your-instance". You can also set this field to "your-instance", but cloud SQL backend will convert it to the aforementioned standard format.
- drReplica boolean
- Read-only field that indicates whether the replica is a DR replica.
- failoverDr stringReplica Name 
- If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. The standard format of this field is "your-project:your-instance". You can also set this field to "your-instance", but cloud SQL backend will convert it to the aforementioned standard format.
- dr_replica bool
- Read-only field that indicates whether the replica is a DR replica.
- failover_dr_ strreplica_ name 
- If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. The standard format of this field is "your-project:your-instance". You can also set this field to "your-instance", but cloud SQL backend will convert it to the aforementioned standard format.
- drReplica Boolean
- Read-only field that indicates whether the replica is a DR replica.
- failoverDr StringReplica Name 
- If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. The standard format of this field is "your-project:your-instance". You can also set this field to "your-instance", but cloud SQL backend will convert it to the aforementioned standard format.
DatabaseInstanceRestoreBackupContext, DatabaseInstanceRestoreBackupContextArgs          
- BackupRun intId 
- 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.`
- BackupRun intId 
- 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.`
- backupRun IntegerId 
- 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.`
- backupRun numberId 
- 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_ intid 
- 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.`
- backupRun NumberId 
- 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
- Expiration time of the CA Cert.
- 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
- Expiration time of the CA Cert.
- 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
- Expiration time of the CA Cert.
- 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
- Expiration time of the CA Cert.
- 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
- Expiration time of the CA Cert.
- 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
- Expiration time of the CA Cert.
- 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,NEVERorON_DEMAND.
- ActiveDirectory DatabaseConfig Instance Settings Active Directory Config 
- AdvancedMachine DatabaseFeatures Instance Settings Advanced Machine Features 
- AvailabilityType string
- The availability type of the Cloud SQL
instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure thatsettings.backup_configuration.enabledis set totrue. For MySQL instances, ensure thatsettings.backup_configuration.binary_log_enabledis set totrue. For Postgres and SQL Server instances, ensure thatsettings.backup_configuration.point_in_time_recovery_enabledis set totrue. Defaults toZONAL.
- BackupConfiguration DatabaseInstance Settings Backup Configuration 
- Collation string
- The name of server instance collation.
- ConnectorEnforcement string
- Control the enforcement of Cloud SQL Auth Proxy or Cloud SQL connectors for all the connections, can be REQUIREDorNOT_REQUIRED. If enabled, all the direct connections are rejected.
- DataCache DatabaseConfig Instance Settings Data Cache Config 
- Data cache configurations.
- DatabaseFlags List<DatabaseInstance Settings Database Flag> 
- DeletionProtection boolEnabled 
- Configuration to protect against accidental instance deletion.
- DenyMaintenance DatabasePeriod Instance Settings Deny Maintenance Period 
- DiskAutoresize bool
- Enables auto-resizing of the storage size. Defaults to true. Note that ifdisk_sizeis set, futurepulumi upcalls will attempt to delete the instance in order to resize the disk to the value specified in disk_size if it has been resized. To avoid this, ensure thatlifecycle.ignore_changesis applied todisk_size.
- DiskAutoresize intLimit 
- 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. Note that this value will override the resizing from disk_autoresizeif that feature is enabled. To avoid this, setlifecycle.ignore_changeson this field.
- 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 ENTERPRISEorENTERPRISE_PLUS.
- EnableDataplex boolIntegration 
- Enables Cloud SQL instance integration with Dataplex. MySQL, Postgres and SQL Server instances are supported for this feature. Defaults to false.
- EnableGoogle boolMl Integration 
- Enables Cloud SQL instances to connect to Vertex AI and pass requests for real-time predictions and insights. Defaults to false.
- InsightsConfig DatabaseInstance Settings Insights Config 
- Configuration of Query Insights.
- IpConfiguration DatabaseInstance Settings Ip Configuration 
- LocationPreference DatabaseInstance Settings Location Preference 
- MaintenanceWindow DatabaseInstance Settings Maintenance Window 
- Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
- PasswordValidation DatabasePolicy Instance Settings Password Validation Policy 
- PricingPlan string
- Pricing plan for this instance, can only be PER_USE.
- SqlServer DatabaseAudit Config Instance Settings Sql Server Audit Config 
- 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 settingsblock 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,NEVERorON_DEMAND.
- ActiveDirectory DatabaseConfig Instance Settings Active Directory Config 
- AdvancedMachine DatabaseFeatures Instance Settings Advanced Machine Features 
- AvailabilityType string
- The availability type of the Cloud SQL
instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure thatsettings.backup_configuration.enabledis set totrue. For MySQL instances, ensure thatsettings.backup_configuration.binary_log_enabledis set totrue. For Postgres and SQL Server instances, ensure thatsettings.backup_configuration.point_in_time_recovery_enabledis set totrue. Defaults toZONAL.
- BackupConfiguration DatabaseInstance Settings Backup Configuration 
- Collation string
- The name of server instance collation.
- ConnectorEnforcement string
- Control the enforcement of Cloud SQL Auth Proxy or Cloud SQL connectors for all the connections, can be REQUIREDorNOT_REQUIRED. If enabled, all the direct connections are rejected.
- DataCache DatabaseConfig Instance Settings Data Cache Config 
- Data cache configurations.
- DatabaseFlags []DatabaseInstance Settings Database Flag 
- DeletionProtection boolEnabled 
- Configuration to protect against accidental instance deletion.
- DenyMaintenance DatabasePeriod Instance Settings Deny Maintenance Period 
- DiskAutoresize bool
- Enables auto-resizing of the storage size. Defaults to true. Note that ifdisk_sizeis set, futurepulumi upcalls will attempt to delete the instance in order to resize the disk to the value specified in disk_size if it has been resized. To avoid this, ensure thatlifecycle.ignore_changesis applied todisk_size.
- DiskAutoresize intLimit 
- 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. Note that this value will override the resizing from disk_autoresizeif that feature is enabled. To avoid this, setlifecycle.ignore_changeson this field.
- 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 ENTERPRISEorENTERPRISE_PLUS.
- EnableDataplex boolIntegration 
- Enables Cloud SQL instance integration with Dataplex. MySQL, Postgres and SQL Server instances are supported for this feature. Defaults to false.
- EnableGoogle boolMl Integration 
- Enables Cloud SQL instances to connect to Vertex AI and pass requests for real-time predictions and insights. Defaults to false.
- InsightsConfig DatabaseInstance Settings Insights Config 
- Configuration of Query Insights.
- IpConfiguration DatabaseInstance Settings Ip Configuration 
- LocationPreference DatabaseInstance Settings Location Preference 
- MaintenanceWindow DatabaseInstance Settings Maintenance Window 
- Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
- PasswordValidation DatabasePolicy Instance Settings Password Validation Policy 
- PricingPlan string
- Pricing plan for this instance, can only be PER_USE.
- SqlServer DatabaseAudit Config Instance Settings Sql Server Audit Config 
- 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 settingsblock 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,NEVERorON_DEMAND.
- activeDirectory DatabaseConfig Instance Settings Active Directory Config 
- advancedMachine DatabaseFeatures Instance Settings Advanced Machine Features 
- availabilityType String
- The availability type of the Cloud SQL
instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure thatsettings.backup_configuration.enabledis set totrue. For MySQL instances, ensure thatsettings.backup_configuration.binary_log_enabledis set totrue. For Postgres and SQL Server instances, ensure thatsettings.backup_configuration.point_in_time_recovery_enabledis set totrue. Defaults toZONAL.
- backupConfiguration DatabaseInstance Settings Backup Configuration 
- collation String
- The name of server instance collation.
- connectorEnforcement String
- Control the enforcement of Cloud SQL Auth Proxy or Cloud SQL connectors for all the connections, can be REQUIREDorNOT_REQUIRED. If enabled, all the direct connections are rejected.
- dataCache DatabaseConfig Instance Settings Data Cache Config 
- Data cache configurations.
- databaseFlags List<DatabaseInstance Settings Database Flag> 
- deletionProtection BooleanEnabled 
- Configuration to protect against accidental instance deletion.
- denyMaintenance DatabasePeriod Instance Settings Deny Maintenance Period 
- diskAutoresize Boolean
- Enables auto-resizing of the storage size. Defaults to true. Note that ifdisk_sizeis set, futurepulumi upcalls will attempt to delete the instance in order to resize the disk to the value specified in disk_size if it has been resized. To avoid this, ensure thatlifecycle.ignore_changesis applied todisk_size.
- diskAutoresize IntegerLimit 
- 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. Note that this value will override the resizing from disk_autoresizeif that feature is enabled. To avoid this, setlifecycle.ignore_changeson this field.
- 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 ENTERPRISEorENTERPRISE_PLUS.
- enableDataplex BooleanIntegration 
- Enables Cloud SQL instance integration with Dataplex. MySQL, Postgres and SQL Server instances are supported for this feature. Defaults to false.
- enableGoogle BooleanMl Integration 
- Enables Cloud SQL instances to connect to Vertex AI and pass requests for real-time predictions and insights. Defaults to false.
- insightsConfig DatabaseInstance Settings Insights Config 
- Configuration of Query Insights.
- ipConfiguration DatabaseInstance Settings Ip Configuration 
- locationPreference DatabaseInstance Settings Location Preference 
- maintenanceWindow DatabaseInstance Settings Maintenance Window 
- Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
- passwordValidation DatabasePolicy Instance Settings Password Validation Policy 
- pricingPlan String
- Pricing plan for this instance, can only be PER_USE.
- sqlServer DatabaseAudit Config Instance Settings Sql Server Audit Config 
- 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 settingsblock 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,NEVERorON_DEMAND.
- activeDirectory DatabaseConfig Instance Settings Active Directory Config 
- advancedMachine DatabaseFeatures Instance Settings Advanced Machine Features 
- availabilityType string
- The availability type of the Cloud SQL
instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure thatsettings.backup_configuration.enabledis set totrue. For MySQL instances, ensure thatsettings.backup_configuration.binary_log_enabledis set totrue. For Postgres and SQL Server instances, ensure thatsettings.backup_configuration.point_in_time_recovery_enabledis set totrue. Defaults toZONAL.
- backupConfiguration DatabaseInstance Settings Backup Configuration 
- collation string
- The name of server instance collation.
- connectorEnforcement string
- Control the enforcement of Cloud SQL Auth Proxy or Cloud SQL connectors for all the connections, can be REQUIREDorNOT_REQUIRED. If enabled, all the direct connections are rejected.
- dataCache DatabaseConfig Instance Settings Data Cache Config 
- Data cache configurations.
- databaseFlags DatabaseInstance Settings Database Flag[] 
- deletionProtection booleanEnabled 
- Configuration to protect against accidental instance deletion.
- denyMaintenance DatabasePeriod Instance Settings Deny Maintenance Period 
- diskAutoresize boolean
- Enables auto-resizing of the storage size. Defaults to true. Note that ifdisk_sizeis set, futurepulumi upcalls will attempt to delete the instance in order to resize the disk to the value specified in disk_size if it has been resized. To avoid this, ensure thatlifecycle.ignore_changesis applied todisk_size.
- diskAutoresize numberLimit 
- 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. Note that this value will override the resizing from disk_autoresizeif that feature is enabled. To avoid this, setlifecycle.ignore_changeson this field.
- 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 ENTERPRISEorENTERPRISE_PLUS.
- enableDataplex booleanIntegration 
- Enables Cloud SQL instance integration with Dataplex. MySQL, Postgres and SQL Server instances are supported for this feature. Defaults to false.
- enableGoogle booleanMl Integration 
- Enables Cloud SQL instances to connect to Vertex AI and pass requests for real-time predictions and insights. Defaults to false.
- insightsConfig DatabaseInstance Settings Insights Config 
- Configuration of Query Insights.
- ipConfiguration DatabaseInstance Settings Ip Configuration 
- locationPreference DatabaseInstance Settings Location Preference 
- maintenanceWindow DatabaseInstance Settings Maintenance Window 
- Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
- passwordValidation DatabasePolicy Instance Settings Password Validation Policy 
- pricingPlan string
- Pricing plan for this instance, can only be PER_USE.
- sqlServer DatabaseAudit Config Instance Settings Sql Server Audit Config 
- 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 settingsblock 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,NEVERorON_DEMAND.
- active_directory_ Databaseconfig Instance Settings Active Directory Config 
- advanced_machine_ Databasefeatures Instance Settings Advanced Machine Features 
- availability_type str
- The availability type of the Cloud SQL
instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure thatsettings.backup_configuration.enabledis set totrue. For MySQL instances, ensure thatsettings.backup_configuration.binary_log_enabledis set totrue. For Postgres and SQL Server instances, ensure thatsettings.backup_configuration.point_in_time_recovery_enabledis set totrue. Defaults toZONAL.
- backup_configuration DatabaseInstance Settings Backup Configuration 
- collation str
- The name of server instance collation.
- connector_enforcement str
- Control the enforcement of Cloud SQL Auth Proxy or Cloud SQL connectors for all the connections, can be REQUIREDorNOT_REQUIRED. If enabled, all the direct connections are rejected.
- data_cache_ Databaseconfig Instance Settings Data Cache Config 
- Data cache configurations.
- database_flags Sequence[DatabaseInstance Settings Database Flag] 
- deletion_protection_ boolenabled 
- Configuration to protect against accidental instance deletion.
- deny_maintenance_ Databaseperiod Instance Settings Deny Maintenance Period 
- disk_autoresize bool
- Enables auto-resizing of the storage size. Defaults to true. Note that ifdisk_sizeis set, futurepulumi upcalls will attempt to delete the instance in order to resize the disk to the value specified in disk_size if it has been resized. To avoid this, ensure thatlifecycle.ignore_changesis applied todisk_size.
- disk_autoresize_ intlimit 
- 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. Note that this value will override the resizing from disk_autoresizeif that feature is enabled. To avoid this, setlifecycle.ignore_changeson this field.
- 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 ENTERPRISEorENTERPRISE_PLUS.
- enable_dataplex_ boolintegration 
- Enables Cloud SQL instance integration with Dataplex. MySQL, Postgres and SQL Server instances are supported for this feature. Defaults to false.
- enable_google_ boolml_ integration 
- Enables Cloud SQL instances to connect to Vertex AI and pass requests for real-time predictions and insights. Defaults to false.
- insights_config DatabaseInstance Settings Insights Config 
- Configuration of Query Insights.
- ip_configuration DatabaseInstance Settings Ip Configuration 
- location_preference DatabaseInstance Settings Location Preference 
- maintenance_window DatabaseInstance Settings Maintenance Window 
- 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_ Databasepolicy Instance Settings Password Validation Policy 
- pricing_plan str
- Pricing plan for this instance, can only be PER_USE.
- sql_server_ Databaseaudit_ config Instance Settings Sql Server Audit Config 
- 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 settingsblock 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,NEVERorON_DEMAND.
- activeDirectory Property MapConfig 
- advancedMachine Property MapFeatures 
- availabilityType String
- The availability type of the Cloud SQL
instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure thatsettings.backup_configuration.enabledis set totrue. For MySQL instances, ensure thatsettings.backup_configuration.binary_log_enabledis set totrue. For Postgres and SQL Server instances, ensure thatsettings.backup_configuration.point_in_time_recovery_enabledis set totrue. Defaults toZONAL.
- backupConfiguration Property Map
- collation String
- The name of server instance collation.
- connectorEnforcement String
- Control the enforcement of Cloud SQL Auth Proxy or Cloud SQL connectors for all the connections, can be REQUIREDorNOT_REQUIRED. If enabled, all the direct connections are rejected.
- dataCache Property MapConfig 
- Data cache configurations.
- databaseFlags List<Property Map>
- deletionProtection BooleanEnabled 
- Configuration to protect against accidental instance deletion.
- denyMaintenance Property MapPeriod 
- diskAutoresize Boolean
- Enables auto-resizing of the storage size. Defaults to true. Note that ifdisk_sizeis set, futurepulumi upcalls will attempt to delete the instance in order to resize the disk to the value specified in disk_size if it has been resized. To avoid this, ensure thatlifecycle.ignore_changesis applied todisk_size.
- diskAutoresize NumberLimit 
- 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. Note that this value will override the resizing from disk_autoresizeif that feature is enabled. To avoid this, setlifecycle.ignore_changeson this field.
- 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 ENTERPRISEorENTERPRISE_PLUS.
- enableDataplex BooleanIntegration 
- Enables Cloud SQL instance integration with Dataplex. MySQL, Postgres and SQL Server instances are supported for this feature. Defaults to false.
- enableGoogle BooleanMl Integration 
- Enables Cloud SQL instances to connect to Vertex AI and pass requests for real-time predictions and insights. Defaults to false.
- 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.
- passwordValidation Property MapPolicy 
- pricingPlan String
- Pricing plan for this instance, can only be PER_USE.
- sqlServer Property MapAudit Config 
- 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 settingsblock 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            
- ThreadsPer intCore 
- 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.
- ThreadsPer intCore 
- 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.
- threadsPer IntegerCore 
- 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.
- threadsPer numberCore 
- 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_ intcore 
- 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.
- threadsPer NumberCore 
- 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          
- BackupRetention DatabaseSettings Instance Settings Backup Configuration Backup Retention Settings 
- Backup retention settings. The configuration is detailed below.
- BinaryLog boolEnabled 
- 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
- PointIn boolTime Recovery Enabled 
- True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances. Enabled by default for PostgreSQL Enterprise Plus and SQL Server Enterprise Plus instances.
- StartTime string
- HH:MMformat time indicating when backup configuration starts.
- TransactionLog intRetention Days 
- The number of days of transaction logs we retain for point in time restore, from 1-7. For PostgreSQL Enterprise Plus and SQL Server Enterprise Plus instances, the number of days of retained transaction logs can be set from 1 to 35.
- BackupRetention DatabaseSettings Instance Settings Backup Configuration Backup Retention Settings 
- Backup retention settings. The configuration is detailed below.
- BinaryLog boolEnabled 
- 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
- PointIn boolTime Recovery Enabled 
- True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances. Enabled by default for PostgreSQL Enterprise Plus and SQL Server Enterprise Plus instances.
- StartTime string
- HH:MMformat time indicating when backup configuration starts.
- TransactionLog intRetention Days 
- The number of days of transaction logs we retain for point in time restore, from 1-7. For PostgreSQL Enterprise Plus and SQL Server Enterprise Plus instances, the number of days of retained transaction logs can be set from 1 to 35.
- backupRetention DatabaseSettings Instance Settings Backup Configuration Backup Retention Settings 
- Backup retention settings. The configuration is detailed below.
- binaryLog BooleanEnabled 
- 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
- pointIn BooleanTime Recovery Enabled 
- True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances. Enabled by default for PostgreSQL Enterprise Plus and SQL Server Enterprise Plus instances.
- startTime String
- HH:MMformat time indicating when backup configuration starts.
- transactionLog IntegerRetention Days 
- The number of days of transaction logs we retain for point in time restore, from 1-7. For PostgreSQL Enterprise Plus and SQL Server Enterprise Plus instances, the number of days of retained transaction logs can be set from 1 to 35.
- backupRetention DatabaseSettings Instance Settings Backup Configuration Backup Retention Settings 
- Backup retention settings. The configuration is detailed below.
- binaryLog booleanEnabled 
- 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
- pointIn booleanTime Recovery Enabled 
- True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances. Enabled by default for PostgreSQL Enterprise Plus and SQL Server Enterprise Plus instances.
- startTime string
- HH:MMformat time indicating when backup configuration starts.
- transactionLog numberRetention Days 
- The number of days of transaction logs we retain for point in time restore, from 1-7. For PostgreSQL Enterprise Plus and SQL Server Enterprise Plus instances, the number of days of retained transaction logs can be set from 1 to 35.
- backup_retention_ Databasesettings Instance Settings Backup Configuration Backup Retention Settings 
- Backup retention settings. The configuration is detailed below.
- binary_log_ boolenabled 
- 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_ booltime_ recovery_ enabled 
- True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances. Enabled by default for PostgreSQL Enterprise Plus and SQL Server Enterprise Plus instances.
- start_time str
- HH:MMformat time indicating when backup configuration starts.
- transaction_log_ intretention_ days 
- The number of days of transaction logs we retain for point in time restore, from 1-7. For PostgreSQL Enterprise Plus and SQL Server Enterprise Plus instances, the number of days of retained transaction logs can be set from 1 to 35.
- backupRetention Property MapSettings 
- Backup retention settings. The configuration is detailed below.
- binaryLog BooleanEnabled 
- 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
- pointIn BooleanTime Recovery Enabled 
- True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances. Enabled by default for PostgreSQL Enterprise Plus and SQL Server Enterprise Plus instances.
- startTime String
- HH:MMformat time indicating when backup configuration starts.
- transactionLog NumberRetention Days 
- The number of days of transaction logs we retain for point in time restore, from 1-7. For PostgreSQL Enterprise Plus and SQL Server 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            
- DataCache boolEnabled 
- Whether data cache is enabled for the instance. Defaults to false. Can be used with MYSQL and PostgreSQL only.
- DataCache boolEnabled 
- Whether data cache is enabled for the instance. Defaults to false. Can be used with MYSQL and PostgreSQL only.
- dataCache BooleanEnabled 
- Whether data cache is enabled for the instance. Defaults to false. Can be used with MYSQL and PostgreSQL only.
- dataCache booleanEnabled 
- Whether data cache is enabled for the instance. Defaults to false. Can be used with MYSQL and PostgreSQL only.
- data_cache_ boolenabled 
- Whether data cache is enabled for the instance. Defaults to false. Can be used with MYSQL and PostgreSQL only.
- dataCache BooleanEnabled 
- Whether data cache is enabled for the instance. Defaults to false. Can be used with MYSQL and PostgreSQL only.
DatabaseInstanceSettingsDatabaseFlag, DatabaseInstanceSettingsDatabaseFlagArgs          
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-m-dd (the month is without leading zeros)i.e., 2020-1-01, or 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-m-dd (the month is without leading zeros)i.e., 2020-1-01, or 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-m-dd (the month is without leading zeros)i.e., 2020-1-01, or 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-m-dd (the month is without leading zeros)i.e., 2020-1-01, or 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-m-dd (the month is without leading zeros)i.e., 2020-1-01, or 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-m-dd (the month is without leading zeros)i.e., 2020-1-01, or 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-m-dd (the month is without leading zeros)i.e., 2020-1-01, or 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-m-dd (the month is without leading zeros)i.e., 2020-1-01, or 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-m-dd (the month is without leading zeros)i.e., 2020-1-01, or 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-m-dd (the month is without leading zeros)i.e., 2020-1-01, or 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-m-dd (the month is without leading zeros)i.e., 2020-1-01, or 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-m-dd (the month is without leading zeros)i.e., 2020-1-01, or 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          
- QueryInsights boolEnabled 
- True if Query Insights feature is enabled.
- QueryPlans intPer Minute 
- Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.
- QueryString intLength 
- 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.
- bool
- True if Query Insights will record application tags from query when enabled.
- RecordClient boolAddress 
- True if Query Insights will record client address when enabled.
- QueryInsights boolEnabled 
- True if Query Insights feature is enabled.
- QueryPlans intPer Minute 
- Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.
- QueryString intLength 
- 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.
- bool
- True if Query Insights will record application tags from query when enabled.
- RecordClient boolAddress 
- True if Query Insights will record client address when enabled.
- queryInsights BooleanEnabled 
- True if Query Insights feature is enabled.
- queryPlans IntegerPer Minute 
- Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.
- queryString IntegerLength 
- 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.
- Boolean
- True if Query Insights will record application tags from query when enabled.
- recordClient BooleanAddress 
- True if Query Insights will record client address when enabled.
- queryInsights booleanEnabled 
- True if Query Insights feature is enabled.
- queryPlans numberPer Minute 
- Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.
- queryString numberLength 
- 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.
- boolean
- True if Query Insights will record application tags from query when enabled.
- recordClient booleanAddress 
- True if Query Insights will record client address when enabled.
- query_insights_ boolenabled 
- True if Query Insights feature is enabled.
- query_plans_ intper_ minute 
- Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.
- query_string_ intlength 
- 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.
- bool
- True if Query Insights will record application tags from query when enabled.
- record_client_ booladdress 
- True if Query Insights will record client address when enabled.
- queryInsights BooleanEnabled 
- True if Query Insights feature is enabled.
- queryPlans NumberPer Minute 
- Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.
- queryString NumberLength 
- 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.
- Boolean
- True if Query Insights will record application tags from query when enabled.
- recordClient BooleanAddress 
- True if Query Insights will record client address when enabled.
DatabaseInstanceSettingsIpConfiguration, DatabaseInstanceSettingsIpConfigurationArgs          
- AllocatedIp stringRange 
- 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?.
- 
List<DatabaseInstance Settings Ip Configuration Authorized Network> 
- EnablePrivate boolPath For Google Cloud Services 
- 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_enabledmust be enabled or aprivate_networkmust 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_enabledmust be enabled or aprivate_networkmust be configured. This setting can be updated, but it cannot be removed after it is set.
- PscConfigs List<DatabaseInstance Settings Ip Configuration Psc Config> 
- PSC settings for a Cloud SQL instance.
- ServerCa stringMode 
- Specify how the server certificate's Certificate Authority is hosted. Supported values are GOOGLE_MANAGED_INTERNAL_CAandGOOGLE_MANAGED_CAS_CA.
- ServerCa stringPool 
- The resource name of the server CA pool for an instance with CUSTOMER_MANAGED_CAS_CAas theserver_ca_mode.
- SslMode string
- Specify how SSL connection should be enforced in DB connections. Supported values are ALLOW_UNENCRYPTED_AND_ENCRYPTED,ENCRYPTED_ONLY, andTRUSTED_CLIENT_CERTIFICATE_REQUIRED(not supported for SQL Server). See API reference doc for details.
- AllocatedIp stringRange 
- 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?.
- 
[]DatabaseInstance Settings Ip Configuration Authorized Network 
- EnablePrivate boolPath For Google Cloud Services 
- 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_enabledmust be enabled or aprivate_networkmust 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_enabledmust be enabled or aprivate_networkmust be configured. This setting can be updated, but it cannot be removed after it is set.
- PscConfigs []DatabaseInstance Settings Ip Configuration Psc Config 
- PSC settings for a Cloud SQL instance.
- ServerCa stringMode 
- Specify how the server certificate's Certificate Authority is hosted. Supported values are GOOGLE_MANAGED_INTERNAL_CAandGOOGLE_MANAGED_CAS_CA.
- ServerCa stringPool 
- The resource name of the server CA pool for an instance with CUSTOMER_MANAGED_CAS_CAas theserver_ca_mode.
- SslMode string
- Specify how SSL connection should be enforced in DB connections. Supported values are ALLOW_UNENCRYPTED_AND_ENCRYPTED,ENCRYPTED_ONLY, andTRUSTED_CLIENT_CERTIFICATE_REQUIRED(not supported for SQL Server). See API reference doc for details.
- allocatedIp StringRange 
- 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?.
- 
List<DatabaseInstance Settings Ip Configuration Authorized Network> 
- enablePrivate BooleanPath For Google Cloud Services 
- 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_enabledmust be enabled or aprivate_networkmust 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_enabledmust be enabled or aprivate_networkmust be configured. This setting can be updated, but it cannot be removed after it is set.
- pscConfigs List<DatabaseInstance Settings Ip Configuration Psc Config> 
- PSC settings for a Cloud SQL instance.
- serverCa StringMode 
- Specify how the server certificate's Certificate Authority is hosted. Supported values are GOOGLE_MANAGED_INTERNAL_CAandGOOGLE_MANAGED_CAS_CA.
- serverCa StringPool 
- The resource name of the server CA pool for an instance with CUSTOMER_MANAGED_CAS_CAas theserver_ca_mode.
- sslMode String
- Specify how SSL connection should be enforced in DB connections. Supported values are ALLOW_UNENCRYPTED_AND_ENCRYPTED,ENCRYPTED_ONLY, andTRUSTED_CLIENT_CERTIFICATE_REQUIRED(not supported for SQL Server). See API reference doc for details.
- allocatedIp stringRange 
- 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?.
- 
DatabaseInstance Settings Ip Configuration Authorized Network[] 
- enablePrivate booleanPath For Google Cloud Services 
- 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_enabledmust be enabled or aprivate_networkmust 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_enabledmust be enabled or aprivate_networkmust be configured. This setting can be updated, but it cannot be removed after it is set.
- pscConfigs DatabaseInstance Settings Ip Configuration Psc Config[] 
- PSC settings for a Cloud SQL instance.
- serverCa stringMode 
- Specify how the server certificate's Certificate Authority is hosted. Supported values are GOOGLE_MANAGED_INTERNAL_CAandGOOGLE_MANAGED_CAS_CA.
- serverCa stringPool 
- The resource name of the server CA pool for an instance with CUSTOMER_MANAGED_CAS_CAas theserver_ca_mode.
- sslMode string
- Specify how SSL connection should be enforced in DB connections. Supported values are ALLOW_UNENCRYPTED_AND_ENCRYPTED,ENCRYPTED_ONLY, andTRUSTED_CLIENT_CERTIFICATE_REQUIRED(not supported for SQL Server). See API reference doc for details.
- allocated_ip_ strrange 
- 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?.
- 
Sequence[DatabaseInstance Settings Ip Configuration Authorized Network] 
- enable_private_ boolpath_ for_ google_ cloud_ services 
- 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_enabledmust be enabled or aprivate_networkmust 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_enabledmust be enabled or aprivate_networkmust be configured. This setting can be updated, but it cannot be removed after it is set.
- psc_configs Sequence[DatabaseInstance Settings Ip Configuration Psc Config] 
- PSC settings for a Cloud SQL instance.
- server_ca_ strmode 
- Specify how the server certificate's Certificate Authority is hosted. Supported values are GOOGLE_MANAGED_INTERNAL_CAandGOOGLE_MANAGED_CAS_CA.
- server_ca_ strpool 
- The resource name of the server CA pool for an instance with CUSTOMER_MANAGED_CAS_CAas theserver_ca_mode.
- ssl_mode str
- Specify how SSL connection should be enforced in DB connections. Supported values are ALLOW_UNENCRYPTED_AND_ENCRYPTED,ENCRYPTED_ONLY, andTRUSTED_CLIENT_CERTIFICATE_REQUIRED(not supported for SQL Server). See API reference doc for details.
- allocatedIp StringRange 
- 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?.
- List<Property Map>
- enablePrivate BooleanPath For Google Cloud Services 
- 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_enabledmust be enabled or aprivate_networkmust 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_enabledmust be enabled or aprivate_networkmust 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.
- serverCa StringMode 
- Specify how the server certificate's Certificate Authority is hosted. Supported values are GOOGLE_MANAGED_INTERNAL_CAandGOOGLE_MANAGED_CAS_CA.
- serverCa StringPool 
- The resource name of the server CA pool for an instance with CUSTOMER_MANAGED_CAS_CAas theserver_ca_mode.
- sslMode String
- Specify how SSL connection should be enforced in DB connections. Supported values are ALLOW_UNENCRYPTED_AND_ENCRYPTED,ENCRYPTED_ONLY, andTRUSTED_CLIENT_CERTIFICATE_REQUIRED(not supported for SQL Server). See API reference doc for details.
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              
- AllowedConsumer List<string>Projects 
- 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).
- PscAuto List<DatabaseConnections Instance Settings Ip Configuration Psc Config Psc Auto Connection> 
- A comma-separated list of networks or a comma-separated list of network-project pairs. Each project in this list is represented by a project number (numeric) or by a project ID (alphanumeric). This allows Private Service Connect connections to be created automatically for the specified networks.
- PscEnabled bool
- Whether PSC connectivity is enabled for this instance.
- AllowedConsumer []stringProjects 
- 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).
- PscAuto []DatabaseConnections Instance Settings Ip Configuration Psc Config Psc Auto Connection 
- A comma-separated list of networks or a comma-separated list of network-project pairs. Each project in this list is represented by a project number (numeric) or by a project ID (alphanumeric). This allows Private Service Connect connections to be created automatically for the specified networks.
- PscEnabled bool
- Whether PSC connectivity is enabled for this instance.
- allowedConsumer List<String>Projects 
- 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).
- pscAuto List<DatabaseConnections Instance Settings Ip Configuration Psc Config Psc Auto Connection> 
- A comma-separated list of networks or a comma-separated list of network-project pairs. Each project in this list is represented by a project number (numeric) or by a project ID (alphanumeric). This allows Private Service Connect connections to be created automatically for the specified networks.
- pscEnabled Boolean
- Whether PSC connectivity is enabled for this instance.
- allowedConsumer string[]Projects 
- 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).
- pscAuto DatabaseConnections Instance Settings Ip Configuration Psc Config Psc Auto Connection[] 
- A comma-separated list of networks or a comma-separated list of network-project pairs. Each project in this list is represented by a project number (numeric) or by a project ID (alphanumeric). This allows Private Service Connect connections to be created automatically for the specified networks.
- pscEnabled boolean
- Whether PSC connectivity is enabled for this instance.
- allowed_consumer_ Sequence[str]projects 
- 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_auto_ Sequence[Databaseconnections Instance Settings Ip Configuration Psc Config Psc Auto Connection] 
- A comma-separated list of networks or a comma-separated list of network-project pairs. Each project in this list is represented by a project number (numeric) or by a project ID (alphanumeric). This allows Private Service Connect connections to be created automatically for the specified networks.
- psc_enabled bool
- Whether PSC connectivity is enabled for this instance.
- allowedConsumer List<String>Projects 
- 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).
- pscAuto List<Property Map>Connections 
- A comma-separated list of networks or a comma-separated list of network-project pairs. Each project in this list is represented by a project number (numeric) or by a project ID (alphanumeric). This allows Private Service Connect connections to be created automatically for the specified networks.
- pscEnabled Boolean
- Whether PSC connectivity is enabled for this instance.
DatabaseInstanceSettingsIpConfigurationPscConfigPscAutoConnection, DatabaseInstanceSettingsIpConfigurationPscConfigPscAutoConnectionArgs                    
- ConsumerNetwork string
- "The consumer network of this consumer endpoint. This must be a resource path that includes both the host project and the network name. For example, projects/project1/global/networks/network1. The consumer host project of this network might be different from the consumer service project."
- ConsumerService stringProject Id 
- The project ID of consumer service project of this consumer endpoint.
- ConsumerNetwork string
- "The consumer network of this consumer endpoint. This must be a resource path that includes both the host project and the network name. For example, projects/project1/global/networks/network1. The consumer host project of this network might be different from the consumer service project."
- ConsumerService stringProject Id 
- The project ID of consumer service project of this consumer endpoint.
- consumerNetwork String
- "The consumer network of this consumer endpoint. This must be a resource path that includes both the host project and the network name. For example, projects/project1/global/networks/network1. The consumer host project of this network might be different from the consumer service project."
- consumerService StringProject Id 
- The project ID of consumer service project of this consumer endpoint.
- consumerNetwork string
- "The consumer network of this consumer endpoint. This must be a resource path that includes both the host project and the network name. For example, projects/project1/global/networks/network1. The consumer host project of this network might be different from the consumer service project."
- consumerService stringProject Id 
- The project ID of consumer service project of this consumer endpoint.
- consumer_network str
- "The consumer network of this consumer endpoint. This must be a resource path that includes both the host project and the network name. For example, projects/project1/global/networks/network1. The consumer host project of this network might be different from the consumer service project."
- consumer_service_ strproject_ id 
- The project ID of consumer service project of this consumer endpoint.
- consumerNetwork String
- "The consumer network of this consumer endpoint. This must be a resource path that includes both the host project and the network name. For example, projects/project1/global/networks/network1. The consumer host project of this network might be different from the consumer service project."
- consumerService StringProject Id 
- The project ID of consumer service project of this consumer endpoint.
DatabaseInstanceSettingsLocationPreference, DatabaseInstanceSettingsLocationPreferenceArgs          
- FollowGae stringApplication 
- 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.
- Zone string
- The preferred compute engine zone.
- FollowGae stringApplication 
- 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.
- Zone string
- The preferred compute engine zone.
- followGae StringApplication 
- 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.
- zone String
- The preferred compute engine zone.
- followGae stringApplication 
- 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.
- zone string
- The preferred compute engine zone.
- follow_gae_ strapplication 
- 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.
- zone str
- The preferred compute engine zone.
- followGae StringApplication 
- 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.
- 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 ifdaynot set
- UpdateTrack string
- Receive updates after one week (canary) or after two weeks (stable) or after five weeks (week5) of notification.
- Day int
- Day of week (1-7), starting on Monday
- Hour int
- Hour of day (0-23), ignored ifdaynot set
- UpdateTrack string
- Receive updates after one week (canary) or after two weeks (stable) or after five weeks (week5) of notification.
- day Integer
- Day of week (1-7), starting on Monday
- hour Integer
- Hour of day (0-23), ignored ifdaynot set
- updateTrack String
- Receive updates after one week (canary) or after two weeks (stable) or after five weeks (week5) of notification.
- day number
- Day of week (1-7), starting on Monday
- hour number
- Hour of day (0-23), ignored ifdaynot set
- updateTrack string
- Receive updates after one week (canary) or after two weeks (stable) or after five weeks (week5) of notification.
- day int
- Day of week (1-7), starting on Monday
- hour int
- Hour of day (0-23), ignored ifdaynot set
- update_track str
- Receive updates after one week (canary) or after two weeks (stable) or after five weeks (week5) of notification.
- day Number
- Day of week (1-7), starting on Monday
- hour Number
- Hour of day (0-23), ignored ifdaynot set
- updateTrack String
- Receive updates after one week (canary) or after two weeks (stable) or after five weeks (week5) of notification.
DatabaseInstanceSettingsPasswordValidationPolicy, DatabaseInstanceSettingsPasswordValidationPolicyArgs            
- EnablePassword boolPolicy 
- Enables or disable the password validation policy.
- Complexity string
- Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
- DisallowUsername boolSubstring 
- Prevents the use of the username in the password.
- MinLength int
- Specifies the minimum number of characters that the password must have.
- PasswordChange stringInterval 
- Specifies the minimum duration after which you can change the password.
- ReuseInterval int
- Specifies the number of previous passwords that you can't reuse.
- EnablePassword boolPolicy 
- Enables or disable the password validation policy.
- Complexity string
- Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
- DisallowUsername boolSubstring 
- Prevents the use of the username in the password.
- MinLength int
- Specifies the minimum number of characters that the password must have.
- PasswordChange stringInterval 
- Specifies the minimum duration after which you can change the password.
- ReuseInterval int
- Specifies the number of previous passwords that you can't reuse.
- enablePassword BooleanPolicy 
- Enables or disable the password validation policy.
- complexity String
- Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
- disallowUsername BooleanSubstring 
- Prevents the use of the username in the password.
- minLength Integer
- Specifies the minimum number of characters that the password must have.
- passwordChange StringInterval 
- Specifies the minimum duration after which you can change the password.
- reuseInterval Integer
- Specifies the number of previous passwords that you can't reuse.
- enablePassword booleanPolicy 
- Enables or disable the password validation policy.
- complexity string
- Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
- disallowUsername booleanSubstring 
- Prevents the use of the username in the password.
- minLength number
- Specifies the minimum number of characters that the password must have.
- passwordChange stringInterval 
- 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_ boolpolicy 
- Enables or disable the password validation policy.
- complexity str
- Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
- disallow_username_ boolsubstring 
- 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_ strinterval 
- 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.
- enablePassword BooleanPolicy 
- Enables or disable the password validation policy.
- complexity String
- Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
- disallowUsername BooleanSubstring 
- Prevents the use of the username in the password.
- minLength Number
- Specifies the minimum number of characters that the password must have.
- passwordChange StringInterval 
- 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.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.