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.User
to define a custom user with a restricted host and strong password.
Note: On newer versions of the provider, you must explicitly set
deletion_protection=false
(and runpulumi update
to write the field to state) in order to destroy an instance. It is recommended to not set this field (or set it to true) until you’re ready to destroy the instance and its databases.
Example Usage
SQL Second Generation Instance
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()
{
DatabaseVersion = "POSTGRES_14",
Region = "us-central1",
Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
{
Tier = "db-f1-micro",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v6/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{
DatabaseVersion: pulumi.String("POSTGRES_14"),
Region: pulumi.String("us-central1"),
Settings: &sql.DatabaseInstanceSettingsArgs{
Tier: pulumi.String("db-f1-micro"),
},
})
if err != nil {
return err
}
return nil
})
}
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()
.databaseVersion("POSTGRES_14")
.region("us-central1")
.settings(DatabaseInstanceSettingsArgs.builder()
.tier("db-f1-micro")
.build())
.build());
}
}
import pulumi
import pulumi_gcp as gcp
main = gcp.sql.DatabaseInstance("main",
database_version="POSTGRES_14",
region="us-central1",
settings=gcp.sql.DatabaseInstanceSettingsArgs(
tier="db-f1-micro",
))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const main = new gcp.sql.DatabaseInstance("main", {
databaseVersion: "POSTGRES_14",
region: "us-central1",
settings: {
tier: "db-f1-micro",
},
});
resources:
main:
type: gcp:sql:DatabaseInstance
properties:
databaseVersion: POSTGRES_14
region: us-central1
settings:
tier: db-f1-micro
Private IP Instance
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("privateNetwork", new()
{
}, new CustomResourceOptions
{
Provider = google_beta,
});
var privateIpAddress = new Gcp.Compute.GlobalAddress("privateIpAddress", new()
{
Purpose = "VPC_PEERING",
AddressType = "INTERNAL",
PrefixLength = 16,
Network = privateNetwork.Id,
}, new CustomResourceOptions
{
Provider = google_beta,
});
var privateVpcConnection = new Gcp.ServiceNetworking.Connection("privateVpcConnection", new()
{
Network = privateNetwork.Id,
Service = "servicenetworking.googleapis.com",
ReservedPeeringRanges = new[]
{
privateIpAddress.Name,
},
}, new CustomResourceOptions
{
Provider = google_beta,
});
var dbNameSuffix = new Random.RandomId("dbNameSuffix", new()
{
ByteLength = 4,
});
var instance = new Gcp.Sql.DatabaseInstance("instance", new()
{
Region = "us-central1",
DatabaseVersion = "MYSQL_5_7",
Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
{
Tier = "db-f1-micro",
IpConfiguration = new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationArgs
{
Ipv4Enabled = false,
PrivateNetwork = privateNetwork.Id,
EnablePrivatePathForGoogleCloudServices = true,
},
},
}, new CustomResourceOptions
{
Provider = google_beta,
DependsOn = new[]
{
privateVpcConnection,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicenetworking"
"github.com/pulumi/pulumi-gcp/sdk/v6/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, "privateNetwork", nil, pulumi.Provider(google_beta))
if err != nil {
return err
}
privateIpAddress, err := compute.NewGlobalAddress(ctx, "privateIpAddress", &compute.GlobalAddressArgs{
Purpose: pulumi.String("VPC_PEERING"),
AddressType: pulumi.String("INTERNAL"),
PrefixLength: pulumi.Int(16),
Network: privateNetwork.ID(),
}, pulumi.Provider(google_beta))
if err != nil {
return err
}
privateVpcConnection, err := servicenetworking.NewConnection(ctx, "privateVpcConnection", &servicenetworking.ConnectionArgs{
Network: privateNetwork.ID(),
Service: pulumi.String("servicenetworking.googleapis.com"),
ReservedPeeringRanges: pulumi.StringArray{
privateIpAddress.Name,
},
}, pulumi.Provider(google_beta))
if err != nil {
return err
}
_, err = random.NewRandomId(ctx, "dbNameSuffix", &random.RandomIdArgs{
ByteLength: pulumi.Int(4),
})
if err != nil {
return err
}
_, err = sql.NewDatabaseInstance(ctx, "instance", &sql.DatabaseInstanceArgs{
Region: pulumi.String("us-central1"),
DatabaseVersion: pulumi.String("MYSQL_5_7"),
Settings: &sql.DatabaseInstanceSettingsArgs{
Tier: pulumi.String("db-f1-micro"),
IpConfiguration: &sql.DatabaseInstanceSettingsIpConfigurationArgs{
Ipv4Enabled: pulumi.Bool(false),
PrivateNetwork: privateNetwork.ID(),
EnablePrivatePathForGoogleCloudServices: pulumi.Bool(true),
},
},
}, pulumi.Provider(google_beta), pulumi.DependsOn([]pulumi.Resource{
privateVpcConnection,
}))
if err != nil {
return err
}
return nil
})
}
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.Empty, CustomResourceOptions.builder()
.provider(google_beta)
.build());
var privateIpAddress = new GlobalAddress("privateIpAddress", GlobalAddressArgs.builder()
.purpose("VPC_PEERING")
.addressType("INTERNAL")
.prefixLength(16)
.network(privateNetwork.id())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var privateVpcConnection = new Connection("privateVpcConnection", ConnectionArgs.builder()
.network(privateNetwork.id())
.service("servicenetworking.googleapis.com")
.reservedPeeringRanges(privateIpAddress.name())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var dbNameSuffix = new RandomId("dbNameSuffix", RandomIdArgs.builder()
.byteLength(4)
.build());
var instance = new DatabaseInstance("instance", DatabaseInstanceArgs.builder()
.region("us-central1")
.databaseVersion("MYSQL_5_7")
.settings(DatabaseInstanceSettingsArgs.builder()
.tier("db-f1-micro")
.ipConfiguration(DatabaseInstanceSettingsIpConfigurationArgs.builder()
.ipv4Enabled(false)
.privateNetwork(privateNetwork.id())
.enablePrivatePathForGoogleCloudServices(true)
.build())
.build())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.dependsOn(privateVpcConnection)
.build());
}
}
import pulumi
import pulumi_gcp as gcp
import pulumi_random as random
private_network = gcp.compute.Network("privateNetwork", opts=pulumi.ResourceOptions(provider=google_beta))
private_ip_address = gcp.compute.GlobalAddress("privateIpAddress",
purpose="VPC_PEERING",
address_type="INTERNAL",
prefix_length=16,
network=private_network.id,
opts=pulumi.ResourceOptions(provider=google_beta))
private_vpc_connection = gcp.servicenetworking.Connection("privateVpcConnection",
network=private_network.id,
service="servicenetworking.googleapis.com",
reserved_peering_ranges=[private_ip_address.name],
opts=pulumi.ResourceOptions(provider=google_beta))
db_name_suffix = random.RandomId("dbNameSuffix", byte_length=4)
instance = gcp.sql.DatabaseInstance("instance",
region="us-central1",
database_version="MYSQL_5_7",
settings=gcp.sql.DatabaseInstanceSettingsArgs(
tier="db-f1-micro",
ip_configuration=gcp.sql.DatabaseInstanceSettingsIpConfigurationArgs(
ipv4_enabled=False,
private_network=private_network.id,
enable_private_path_for_google_cloud_services=True,
),
),
opts=pulumi.ResourceOptions(provider=google_beta,
depends_on=[private_vpc_connection]))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as random from "@pulumi/random";
const privateNetwork = new gcp.compute.Network("privateNetwork", {}, {
provider: google_beta,
});
const privateIpAddress = new gcp.compute.GlobalAddress("privateIpAddress", {
purpose: "VPC_PEERING",
addressType: "INTERNAL",
prefixLength: 16,
network: privateNetwork.id,
}, {
provider: google_beta,
});
const privateVpcConnection = new gcp.servicenetworking.Connection("privateVpcConnection", {
network: privateNetwork.id,
service: "servicenetworking.googleapis.com",
reservedPeeringRanges: [privateIpAddress.name],
}, {
provider: google_beta,
});
const dbNameSuffix = new random.RandomId("dbNameSuffix", {byteLength: 4});
const instance = new gcp.sql.DatabaseInstance("instance", {
region: "us-central1",
databaseVersion: "MYSQL_5_7",
settings: {
tier: "db-f1-micro",
ipConfiguration: {
ipv4Enabled: false,
privateNetwork: privateNetwork.id,
enablePrivatePathForGoogleCloudServices: true,
},
},
}, {
provider: google_beta,
dependsOn: [privateVpcConnection],
});
resources:
privateNetwork:
type: gcp:compute:Network
options:
provider: ${["google-beta"]}
privateIpAddress:
type: gcp:compute:GlobalAddress
properties:
purpose: VPC_PEERING
addressType: INTERNAL
prefixLength: 16
network: ${privateNetwork.id}
options:
provider: ${["google-beta"]}
privateVpcConnection:
type: gcp:servicenetworking:Connection
properties:
network: ${privateNetwork.id}
service: servicenetworking.googleapis.com
reservedPeeringRanges:
- ${privateIpAddress.name}
options:
provider: ${["google-beta"]}
dbNameSuffix:
type: random:RandomId
properties:
byteLength: 4
instance:
type: gcp:sql:DatabaseInstance
properties:
region: us-central1
databaseVersion: MYSQL_5_7
settings:
tier: db-f1-micro
ipConfiguration:
ipv4Enabled: false
privateNetwork: ${privateNetwork.id}
enablePrivatePathForGoogleCloudServices: true
options:
provider: ${["google-beta"]}
dependson:
- ${privateVpcConnection}
Create DatabaseInstance Resource
new DatabaseInstance(name: string, args: DatabaseInstanceArgs, opts?: CustomResourceOptions);
@overload
def DatabaseInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
clone: Optional[DatabaseInstanceCloneArgs] = None,
database_version: Optional[str] = None,
deletion_protection: Optional[bool] = None,
encryption_key_name: Optional[str] = None,
instance_type: Optional[str] = None,
maintenance_version: Optional[str] = None,
master_instance_name: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
replica_configuration: Optional[DatabaseInstanceReplicaConfigurationArgs] = None,
restore_backup_context: Optional[DatabaseInstanceRestoreBackupContextArgs] = None,
root_password: Optional[str] = None,
settings: Optional[DatabaseInstanceSettingsArgs] = None)
@overload
def DatabaseInstance(resource_name: str,
args: DatabaseInstanceArgs,
opts: Optional[ResourceOptions] = None)
func NewDatabaseInstance(ctx *Context, name string, args DatabaseInstanceArgs, opts ...ResourceOption) (*DatabaseInstance, error)
public DatabaseInstance(string name, DatabaseInstanceArgs args, CustomResourceOptions? opts = null)
public DatabaseInstance(String name, DatabaseInstanceArgs args)
public DatabaseInstance(String name, DatabaseInstanceArgs args, CustomResourceOptions options)
type: gcp:sql:DatabaseInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DatabaseInstanceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DatabaseInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatabaseInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DatabaseInstance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The DatabaseInstance resource accepts the following input properties:
- Database
Version string The MySQL, PostgreSQL or SQL Server version to use. Supported values include
MYSQL_5_6
,MYSQL_5_7
,MYSQL_8_0
,POSTGRES_9_6
,POSTGRES_10
,POSTGRES_11
,POSTGRES_12
,POSTGRES_13
,POSTGRES_14
,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
Database
Instance 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
destroy
orupdate
command that deletes the instance will fail. Defaults totrue
.- Encryption
Key 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/Decrypter
role on your key - please see this step.- Instance
Type string The type of the instance. The supported values are
SQL_INSTANCE_TYPE_UNSPECIFIED
,CLOUD_SQL_INSTANCE
,ON_PREMISES_INSTANCE
andREAD_REPLICA_INSTANCE
.- Maintenance
Version string The current software version on the instance. This attribute can not be set during creation. Refer to
available_maintenance_versions
attribute to see whatmaintenance_version
are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_version
value that is older than the current one on the instance will be ignored.- Master
Instance 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_enabled
set, as well as existing backups.- Name string
The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.
- Replica
Configuration DatabaseInstance Replica Configuration Args The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
- 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 string Initial root password. Can be updated. Required for MS SQL Server.
- Settings
Database
Instance Settings Args The settings to use for the database. The configuration is detailed below. Required if
clone
is not set.
- Database
Version string The MySQL, PostgreSQL or SQL Server version to use. Supported values include
MYSQL_5_6
,MYSQL_5_7
,MYSQL_8_0
,POSTGRES_9_6
,POSTGRES_10
,POSTGRES_11
,POSTGRES_12
,POSTGRES_13
,POSTGRES_14
,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
Database
Instance 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
destroy
orupdate
command that deletes the instance will fail. Defaults totrue
.- Encryption
Key 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/Decrypter
role on your key - please see this step.- Instance
Type string The type of the instance. The supported values are
SQL_INSTANCE_TYPE_UNSPECIFIED
,CLOUD_SQL_INSTANCE
,ON_PREMISES_INSTANCE
andREAD_REPLICA_INSTANCE
.- Maintenance
Version string The current software version on the instance. This attribute can not be set during creation. Refer to
available_maintenance_versions
attribute to see whatmaintenance_version
are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_version
value that is older than the current one on the instance will be ignored.- Master
Instance 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_enabled
set, as well as existing backups.- Name string
The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.
- Replica
Configuration DatabaseInstance Replica Configuration Args The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
- 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 string Initial root password. Can be updated. Required for MS SQL Server.
- Settings
Database
Instance Settings Args The settings to use for the database. The configuration is detailed below. Required if
clone
is not set.
- database
Version String The MySQL, PostgreSQL or SQL Server version to use. Supported values include
MYSQL_5_6
,MYSQL_5_7
,MYSQL_8_0
,POSTGRES_9_6
,POSTGRES_10
,POSTGRES_11
,POSTGRES_12
,POSTGRES_13
,POSTGRES_14
,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_
Database
Instance 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 Boolean Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a
destroy
orupdate
command that deletes the instance will fail. Defaults totrue
.- encryption
Key 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/Decrypter
role on your key - please see this step.- instance
Type String The type of the instance. The supported values are
SQL_INSTANCE_TYPE_UNSPECIFIED
,CLOUD_SQL_INSTANCE
,ON_PREMISES_INSTANCE
andREAD_REPLICA_INSTANCE
.- maintenance
Version String The current software version on the instance. This attribute can not be set during creation. Refer to
available_maintenance_versions
attribute to see whatmaintenance_version
are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_version
value that is older than the current one on the instance will be ignored.- master
Instance 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_enabled
set, as well as existing backups.- name String
The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.
- replica
Configuration DatabaseInstance Replica Configuration Args The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
- 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 String Initial root password. Can be updated. Required for MS SQL Server.
- settings
Database
Instance Settings Args The settings to use for the database. The configuration is detailed below. Required if
clone
is not set.
- database
Version string The MySQL, PostgreSQL or SQL Server version to use. Supported values include
MYSQL_5_6
,MYSQL_5_7
,MYSQL_8_0
,POSTGRES_9_6
,POSTGRES_10
,POSTGRES_11
,POSTGRES_12
,POSTGRES_13
,POSTGRES_14
,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
Database
Instance 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 boolean Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a
destroy
orupdate
command that deletes the instance will fail. Defaults totrue
.- encryption
Key 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/Decrypter
role on your key - please see this step.- instance
Type string The type of the instance. The supported values are
SQL_INSTANCE_TYPE_UNSPECIFIED
,CLOUD_SQL_INSTANCE
,ON_PREMISES_INSTANCE
andREAD_REPLICA_INSTANCE
.- maintenance
Version string The current software version on the instance. This attribute can not be set during creation. Refer to
available_maintenance_versions
attribute to see whatmaintenance_version
are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_version
value that is older than the current one on the instance will be ignored.- master
Instance 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_enabled
set, as well as existing backups.- name string
The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.
- replica
Configuration DatabaseInstance Replica Configuration Args The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
- 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 string Initial root password. Can be updated. Required for MS SQL Server.
- settings
Database
Instance Settings Args The settings to use for the database. The configuration is detailed below. Required if
clone
is not set.
- database_
version str The MySQL, PostgreSQL or SQL Server version to use. Supported values include
MYSQL_5_6
,MYSQL_5_7
,MYSQL_8_0
,POSTGRES_9_6
,POSTGRES_10
,POSTGRES_11
,POSTGRES_12
,POSTGRES_13
,POSTGRES_14
,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
Database
Instance 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
destroy
orupdate
command 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/Decrypter
role on your key - please see this step.- instance_
type str The type of the instance. The supported values are
SQL_INSTANCE_TYPE_UNSPECIFIED
,CLOUD_SQL_INSTANCE
,ON_PREMISES_INSTANCE
andREAD_REPLICA_INSTANCE
.- maintenance_
version str The current software version on the instance. This attribute can not be set during creation. Refer to
available_maintenance_versions
attribute to see whatmaintenance_version
are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_version
value 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_enabled
set, as well as existing backups.- name str
The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region str
The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.
- replica_
configuration DatabaseInstance Replica Configuration Args The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
- 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
Database
Instance Settings Args The settings to use for the database. The configuration is detailed below. Required if
clone
is not set.
- database
Version String The MySQL, PostgreSQL or SQL Server version to use. Supported values include
MYSQL_5_6
,MYSQL_5_7
,MYSQL_8_0
,POSTGRES_9_6
,POSTGRES_10
,POSTGRES_11
,POSTGRES_12
,POSTGRES_13
,POSTGRES_14
,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.
- deletion
Protection Boolean Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a
destroy
orupdate
command that deletes the instance will fail. Defaults totrue
.- encryption
Key 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/Decrypter
role on your key - please see this step.- instance
Type String The type of the instance. The supported values are
SQL_INSTANCE_TYPE_UNSPECIFIED
,CLOUD_SQL_INSTANCE
,ON_PREMISES_INSTANCE
andREAD_REPLICA_INSTANCE
.- maintenance
Version String The current software version on the instance. This attribute can not be set during creation. Refer to
available_maintenance_versions
attribute to see whatmaintenance_version
are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_version
value that is older than the current one on the instance will be ignored.- master
Instance 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_enabled
set, as well as existing backups.- name String
The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
The region the instance will sit in. If a region is not provided in the resource definition, the provider region will be used instead.
- replica
Configuration Property Map The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
- restore
Backup 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.
- root
Password String Initial root password. Can be updated. Required for MS SQL Server.
- settings Property Map
The settings to use for the database. The configuration is detailed below. Required if
clone
is not set.
Outputs
All input properties are implicitly available as output properties. Additionally, the DatabaseInstance resource produces the following output properties:
- Available
Maintenance List<string>Versions The list of all maintenance versions applicable on the instance.
- Connection
Name string The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- First
Ip stringAddress The first IPv4 address of any type assigned.
- Id string
The provider-assigned unique ID for this managed resource.
- Ip
Addresses List<DatabaseInstance Ip Address> - Private
Ip stringAddress The first private (
PRIVATE
) IPv4 address assigned.- Public
Ip stringAddress The first public (
PRIMARY
) IPv4 address assigned.- Self
Link string The URI of the created resource.
- Server
Ca List<DatabaseCerts Instance Server Ca Cert> - Service
Account stringEmail Address The service account email address assigned to the instance.
- Available
Maintenance []stringVersions The list of all maintenance versions applicable on the instance.
- Connection
Name string The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- First
Ip stringAddress The first IPv4 address of any type assigned.
- Id string
The provider-assigned unique ID for this managed resource.
- Ip
Addresses []DatabaseInstance Ip Address - Private
Ip stringAddress The first private (
PRIVATE
) IPv4 address assigned.- Public
Ip stringAddress The first public (
PRIMARY
) IPv4 address assigned.- Self
Link string The URI of the created resource.
- Server
Ca []DatabaseCerts Instance Server Ca Cert - Service
Account stringEmail Address The service account email address assigned to the instance.
- available
Maintenance List<String>Versions The list of all maintenance versions applicable on the instance.
- connection
Name String The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- first
Ip StringAddress The first IPv4 address of any type assigned.
- id String
The provider-assigned unique ID for this managed resource.
- ip
Addresses List<DatabaseInstance Ip Address> - private
Ip StringAddress The first private (
PRIVATE
) IPv4 address assigned.- public
Ip StringAddress The first public (
PRIMARY
) IPv4 address assigned.- self
Link String The URI of the created resource.
- server
Ca List<DatabaseCerts Instance Server Ca Cert> - service
Account StringEmail Address The service account email address assigned to the instance.
- available
Maintenance string[]Versions The list of all maintenance versions applicable on the instance.
- connection
Name string The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- first
Ip stringAddress The first IPv4 address of any type assigned.
- id string
The provider-assigned unique ID for this managed resource.
- ip
Addresses DatabaseInstance Ip Address[] - private
Ip stringAddress The first private (
PRIVATE
) IPv4 address assigned.- public
Ip stringAddress The first public (
PRIMARY
) IPv4 address assigned.- self
Link string The URI of the created resource.
- server
Ca DatabaseCerts Instance Server Ca Cert[] - service
Account 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.
- 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.- 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.
- available
Maintenance List<String>Versions The list of all maintenance versions applicable on the instance.
- connection
Name String The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- first
Ip StringAddress The first IPv4 address of any type assigned.
- id String
The provider-assigned unique ID for this managed resource.
- ip
Addresses List<Property Map> - private
Ip StringAddress The first private (
PRIVATE
) IPv4 address assigned.- public
Ip StringAddress The first public (
PRIMARY
) IPv4 address assigned.- self
Link String The URI of the created resource.
- server
Ca List<Property Map>Certs - service
Account 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,
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,
public_ip_address: Optional[str] = None,
region: Optional[str] = None,
replica_configuration: Optional[DatabaseInstanceReplicaConfigurationArgs] = None,
restore_backup_context: Optional[DatabaseInstanceRestoreBackupContextArgs] = None,
root_password: Optional[str] = None,
self_link: Optional[str] = None,
server_ca_certs: Optional[Sequence[DatabaseInstanceServerCaCertArgs]] = None,
service_account_email_address: Optional[str] = None,
settings: Optional[DatabaseInstanceSettingsArgs] = None) -> DatabaseInstance
func GetDatabaseInstance(ctx *Context, name string, id IDInput, state *DatabaseInstanceState, opts ...ResourceOption) (*DatabaseInstance, error)
public static DatabaseInstance Get(string name, Input<string> id, DatabaseInstanceState? state, CustomResourceOptions? opts = null)
public static DatabaseInstance get(String name, Output<String> id, DatabaseInstanceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Available
Maintenance List<string>Versions The list of all maintenance versions applicable on the instance.
- Clone
Database
Instance 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 string The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- Database
Version string The MySQL, PostgreSQL or SQL Server version to use. Supported values include
MYSQL_5_6
,MYSQL_5_7
,MYSQL_8_0
,POSTGRES_9_6
,POSTGRES_10
,POSTGRES_11
,POSTGRES_12
,POSTGRES_13
,POSTGRES_14
,SQLSERVER_2017_STANDARD
,SQLSERVER_2017_ENTERPRISE
,SQLSERVER_2017_EXPRESS
,SQLSERVER_2017_WEB
.SQLSERVER_2019_STANDARD
,SQLSERVER_2019_ENTERPRISE
,SQLSERVER_2019_EXPRESS
,SQLSERVER_2019_WEB
. Database Version Policies includes an up-to-date reference of supported versions.- Deletion
Protection bool Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a
destroy
orupdate
command that deletes the instance will fail. Defaults totrue
.- Encryption
Key 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/Decrypter
role on your key - please see this step.- First
Ip stringAddress The first IPv4 address of any type assigned.
- Instance
Type string The type of the instance. The supported values are
SQL_INSTANCE_TYPE_UNSPECIFIED
,CLOUD_SQL_INSTANCE
,ON_PREMISES_INSTANCE
andREAD_REPLICA_INSTANCE
.- Ip
Addresses List<DatabaseInstance Ip Address Args> - Maintenance
Version string The current software version on the instance. This attribute can not be set during creation. Refer to
available_maintenance_versions
attribute to see whatmaintenance_version
are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_version
value that is older than the current one on the instance will be ignored.- Master
Instance 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_enabled
set, as well as existing backups.- Name string
The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
- Private
Ip 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.
- Public
Ip 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.
- Replica
Configuration DatabaseInstance Replica Configuration Args The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
- 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 string Initial root password. Can be updated. Required for MS SQL Server.
- Self
Link string The URI of the created resource.
- Server
Ca List<DatabaseCerts Instance Server Ca Cert Args> - Service
Account stringEmail Address The service account email address assigned to the instance.
- Settings
Database
Instance Settings Args The settings to use for the database. The configuration is detailed below. Required if
clone
is not set.
- Available
Maintenance []stringVersions The list of all maintenance versions applicable on the instance.
- Clone
Database
Instance 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 string The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- Database
Version string The MySQL, PostgreSQL or SQL Server version to use. Supported values include
MYSQL_5_6
,MYSQL_5_7
,MYSQL_8_0
,POSTGRES_9_6
,POSTGRES_10
,POSTGRES_11
,POSTGRES_12
,POSTGRES_13
,POSTGRES_14
,SQLSERVER_2017_STANDARD
,SQLSERVER_2017_ENTERPRISE
,SQLSERVER_2017_EXPRESS
,SQLSERVER_2017_WEB
.SQLSERVER_2019_STANDARD
,SQLSERVER_2019_ENTERPRISE
,SQLSERVER_2019_EXPRESS
,SQLSERVER_2019_WEB
. Database Version Policies includes an up-to-date reference of supported versions.- Deletion
Protection bool Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a
destroy
orupdate
command that deletes the instance will fail. Defaults totrue
.- Encryption
Key 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/Decrypter
role on your key - please see this step.- First
Ip stringAddress The first IPv4 address of any type assigned.
- Instance
Type string The type of the instance. The supported values are
SQL_INSTANCE_TYPE_UNSPECIFIED
,CLOUD_SQL_INSTANCE
,ON_PREMISES_INSTANCE
andREAD_REPLICA_INSTANCE
.- Ip
Addresses []DatabaseInstance Ip Address Args - Maintenance
Version string The current software version on the instance. This attribute can not be set during creation. Refer to
available_maintenance_versions
attribute to see whatmaintenance_version
are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_version
value that is older than the current one on the instance will be ignored.- Master
Instance 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_enabled
set, as well as existing backups.- Name string
The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
- Private
Ip 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.
- Public
Ip 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.
- Replica
Configuration DatabaseInstance Replica Configuration Args The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
- 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 string Initial root password. Can be updated. Required for MS SQL Server.
- Self
Link string The URI of the created resource.
- Server
Ca []DatabaseCerts Instance Server Ca Cert Args - Service
Account stringEmail Address The service account email address assigned to the instance.
- Settings
Database
Instance Settings Args The settings to use for the database. The configuration is detailed below. Required if
clone
is not set.
- available
Maintenance List<String>Versions The list of all maintenance versions applicable on the instance.
- clone_
Database
Instance 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 String The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- database
Version String The MySQL, PostgreSQL or SQL Server version to use. Supported values include
MYSQL_5_6
,MYSQL_5_7
,MYSQL_8_0
,POSTGRES_9_6
,POSTGRES_10
,POSTGRES_11
,POSTGRES_12
,POSTGRES_13
,POSTGRES_14
,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 Boolean Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a
destroy
orupdate
command that deletes the instance will fail. Defaults totrue
.- encryption
Key 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/Decrypter
role on your key - please see this step.- first
Ip StringAddress The first IPv4 address of any type assigned.
- instance
Type String The type of the instance. The supported values are
SQL_INSTANCE_TYPE_UNSPECIFIED
,CLOUD_SQL_INSTANCE
,ON_PREMISES_INSTANCE
andREAD_REPLICA_INSTANCE
.- ip
Addresses List<DatabaseInstance Ip Address Args> - maintenance
Version String The current software version on the instance. This attribute can not be set during creation. Refer to
available_maintenance_versions
attribute to see whatmaintenance_version
are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_version
value that is older than the current one on the instance will be ignored.- master
Instance 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_enabled
set, as well as existing backups.- name String
The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
- private
Ip 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.
- public
Ip 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.
- replica
Configuration DatabaseInstance Replica Configuration Args The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
- 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 String Initial root password. Can be updated. Required for MS SQL Server.
- self
Link String The URI of the created resource.
- server
Ca List<DatabaseCerts Instance Server Ca Cert Args> - service
Account StringEmail Address The service account email address assigned to the instance.
- settings
Database
Instance Settings Args The settings to use for the database. The configuration is detailed below. Required if
clone
is not set.
- available
Maintenance string[]Versions The list of all maintenance versions applicable on the instance.
- clone
Database
Instance 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 string The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- database
Version string The MySQL, PostgreSQL or SQL Server version to use. Supported values include
MYSQL_5_6
,MYSQL_5_7
,MYSQL_8_0
,POSTGRES_9_6
,POSTGRES_10
,POSTGRES_11
,POSTGRES_12
,POSTGRES_13
,POSTGRES_14
,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 boolean Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a
destroy
orupdate
command that deletes the instance will fail. Defaults totrue
.- encryption
Key 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/Decrypter
role on your key - please see this step.- first
Ip stringAddress The first IPv4 address of any type assigned.
- instance
Type string The type of the instance. The supported values are
SQL_INSTANCE_TYPE_UNSPECIFIED
,CLOUD_SQL_INSTANCE
,ON_PREMISES_INSTANCE
andREAD_REPLICA_INSTANCE
.- ip
Addresses DatabaseInstance Ip Address Args[] - maintenance
Version string The current software version on the instance. This attribute can not be set during creation. Refer to
available_maintenance_versions
attribute to see whatmaintenance_version
are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_version
value that is older than the current one on the instance will be ignored.- master
Instance 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_enabled
set, as well as existing backups.- name string
The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
- private
Ip 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.
- public
Ip 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.
- replica
Configuration DatabaseInstance Replica Configuration Args The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
- 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 string Initial root password. Can be updated. Required for MS SQL Server.
- self
Link string The URI of the created resource.
- server
Ca DatabaseCerts Instance Server Ca Cert Args[] - service
Account stringEmail Address The service account email address assigned to the instance.
- settings
Database
Instance Settings Args The settings to use for the database. The configuration is detailed below. Required if
clone
is not set.
- available_
maintenance_ Sequence[str]versions The list of all maintenance versions applicable on the instance.
- clone
Database
Instance 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
,POSTGRES_9_6
,POSTGRES_10
,POSTGRES_11
,POSTGRES_12
,POSTGRES_13
,POSTGRES_14
,SQLSERVER_2017_STANDARD
,SQLSERVER_2017_ENTERPRISE
,SQLSERVER_2017_EXPRESS
,SQLSERVER_2017_WEB
.SQLSERVER_2019_STANDARD
,SQLSERVER_2019_ENTERPRISE
,SQLSERVER_2019_EXPRESS
,SQLSERVER_2019_WEB
. Database Version Policies includes an up-to-date reference of supported versions.- deletion_
protection bool Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a
destroy
orupdate
command 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/Decrypter
role 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_INSTANCE
andREAD_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_versions
attribute to see whatmaintenance_version
are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_version
value 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_enabled
set, as well as existing backups.- name str
The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
- private_
ip_ 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.
- 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. Valid only for MySQL instances.
- 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
Database
Instance Settings Args The settings to use for the database. The configuration is detailed below. Required if
clone
is not set.
- available
Maintenance 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.
- connection
Name String The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- database
Version String The MySQL, PostgreSQL or SQL Server version to use. Supported values include
MYSQL_5_6
,MYSQL_5_7
,MYSQL_8_0
,POSTGRES_9_6
,POSTGRES_10
,POSTGRES_11
,POSTGRES_12
,POSTGRES_13
,POSTGRES_14
,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 Boolean Whether or not to allow the provider to destroy the instance. Unless this field is set to false in state, a
destroy
orupdate
command that deletes the instance will fail. Defaults totrue
.- encryption
Key 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/Decrypter
role on your key - please see this step.- first
Ip StringAddress The first IPv4 address of any type assigned.
- instance
Type String The type of the instance. The supported values are
SQL_INSTANCE_TYPE_UNSPECIFIED
,CLOUD_SQL_INSTANCE
,ON_PREMISES_INSTANCE
andREAD_REPLICA_INSTANCE
.- ip
Addresses List<Property Map> - maintenance
Version String The current software version on the instance. This attribute can not be set during creation. Refer to
available_maintenance_versions
attribute to see whatmaintenance_version
are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting amaintenance_version
value that is older than the current one on the instance will be ignored.- master
Instance 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_enabled
set, as well as existing backups.- name String
The name of the instance. If the name is left blank, the provider will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.
- private
Ip 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.
- public
Ip 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.
- replica
Configuration Property Map The configuration for replication. The configuration is detailed below. Valid only for MySQL instances.
- restore
Backup 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.
- root
Password String Initial root password. Can be updated. Required for MS SQL Server.
- self
Link String The URI of the created resource.
- server
Ca List<Property Map>Certs - service
Account 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
clone
is not set.
Supporting Types
DatabaseInstanceClone
- Source
Instance stringName Name of the source instance which will be cloned.
- Allocated
Ip 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?.
- Database
Names List<string> (SQL Server only, use with
point_in_time
) Clone only the specified databases from the source instance. Clone all databases if empty.- Point
In 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".
- Source
Instance stringName Name of the source instance which will be cloned.
- Allocated
Ip 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?.
- Database
Names []string (SQL Server only, use with
point_in_time
) Clone only the specified databases from the source instance. Clone all databases if empty.- Point
In 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".
- source
Instance StringName Name of the source instance which will be cloned.
- allocated
Ip 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?.
- database
Names List<String> (SQL Server only, use with
point_in_time
) Clone only the specified databases from the source instance. Clone all databases if empty.- point
In 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".
- source
Instance stringName Name of the source instance which will be cloned.
- allocated
Ip 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?.
- database
Names string[] (SQL Server only, use with
point_in_time
) Clone only the specified databases from the source instance. Clone all databases if empty.- point
In 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".
- 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".
- source
Instance StringName Name of the source instance which will be cloned.
- allocated
Ip 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?.
- database
Names List<String> (SQL Server only, use with
point_in_time
) Clone only the specified databases from the source instance. Clone all databases if empty.- point
In 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".
DatabaseInstanceIpAddress
- Ip
Address string - Time
To stringRetire - Type string
- Ip
Address string - Time
To stringRetire - Type string
- ip
Address String - time
To StringRetire - type String
- ip
Address string - time
To stringRetire - type string
- ip_
address str - time_
to_ strretire - type str
- ip
Address String - time
To StringRetire - type String
DatabaseInstanceReplicaConfiguration
- Ca
Certificate string PEM representation of the trusted CA's x509 certificate.
- Client
Certificate string PEM representation of the replica's x509 certificate.
- Client
Key string 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 stringPath Path to a SQL file in GCS from which replica instances are created. Format is
gs://bucket/filename
.- Failover
Target bool Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance.
- Master
Heartbeat intPeriod Time in ms between replication heartbeats.
- Password string
Password for the replication connection.
- Ssl
Cipher string - Username string
Username for replication connection.
- Verify
Server boolCertificate True if the master's common name value is checked during the SSL handshake.
- Ca
Certificate string PEM representation of the trusted CA's x509 certificate.
- Client
Certificate string PEM representation of the replica's x509 certificate.
- Client
Key string 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 stringPath Path to a SQL file in GCS from which replica instances are created. Format is
gs://bucket/filename
.- Failover
Target bool Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance.
- Master
Heartbeat intPeriod Time in ms between replication heartbeats.
- Password string
Password for the replication connection.
- Ssl
Cipher string - Username string
Username for replication connection.
- Verify
Server boolCertificate True if the master's common name value is checked during the SSL handshake.
- ca
Certificate String PEM representation of the trusted CA's x509 certificate.
- client
Certificate String PEM representation of the replica's x509 certificate.
- client
Key String PEM representation of the replica's private key. The corresponding public key in encoded in the
client_certificate
.- connect
Retry IntegerInterval The number of seconds between connect retries. MySQL's default is 60 seconds.
- dump
File StringPath Path to a SQL file in GCS from which replica instances are created. Format is
gs://bucket/filename
.- failover
Target 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.
- master
Heartbeat IntegerPeriod Time in ms between replication heartbeats.
- password String
Password for the replication connection.
- ssl
Cipher String - username String
Username for replication connection.
- verify
Server BooleanCertificate True if the master's common name value is checked during the SSL handshake.
- ca
Certificate string PEM representation of the trusted CA's x509 certificate.
- client
Certificate string PEM representation of the replica's x509 certificate.
- client
Key string PEM representation of the replica's private key. The corresponding public key in encoded in the
client_certificate
.- connect
Retry numberInterval The number of seconds between connect retries. MySQL's default is 60 seconds.
- dump
File stringPath Path to a SQL file in GCS from which replica instances are created. Format is
gs://bucket/filename
.- failover
Target 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.
- master
Heartbeat numberPeriod Time in ms between replication heartbeats.
- password string
Password for the replication connection.
- ssl
Cipher string - username string
Username for replication connection.
- verify
Server 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.
- 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
.- 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.
- master_
heartbeat_ intperiod Time in ms between replication heartbeats.
- password str
Password for the replication connection.
- ssl_
cipher str - username str
Username for replication connection.
- verify_
server_ boolcertificate True if the master's common name value is checked during the SSL handshake.
- ca
Certificate String PEM representation of the trusted CA's x509 certificate.
- client
Certificate String PEM representation of the replica's x509 certificate.
- client
Key String PEM representation of the replica's private key. The corresponding public key in encoded in the
client_certificate
.- connect
Retry NumberInterval The number of seconds between connect retries. MySQL's default is 60 seconds.
- dump
File StringPath Path to a SQL file in GCS from which replica instances are created. Format is
gs://bucket/filename
.- failover
Target 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.
- master
Heartbeat NumberPeriod Time in ms between replication heartbeats.
- password String
Password for the replication connection.
- ssl
Cipher String - username String
Username for replication connection.
- verify
Server BooleanCertificate True if the master's common name value is checked during the SSL handshake.
DatabaseInstanceRestoreBackupContext
- Backup
Run intId The ID of the backup run to restore from.
- Instance
Id 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 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 IntegerId The ID of the backup run to restore from.
- instance
Id 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 numberId The ID of the backup run to restore from.
- instance
Id 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.`
- backup
Run NumberId The ID of the backup run to restore from.
- instance
Id 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
- Cert string
- Common
Name string - Create
Time string - Expiration
Time string The RFC 3339 formatted date time string indicating when this whitelist expires.
- Sha1Fingerprint string
- Cert string
- Common
Name string - Create
Time string - Expiration
Time string The RFC 3339 formatted date time string indicating when this whitelist expires.
- Sha1Fingerprint string
- cert String
- common
Name String - create
Time String - expiration
Time String The RFC 3339 formatted date time string indicating when this whitelist expires.
- sha1Fingerprint String
- cert string
- common
Name string - create
Time string - expiration
Time string The RFC 3339 formatted date time string indicating when this whitelist expires.
- sha1Fingerprint string
- cert str
- common_
name str - create_
time str - expiration_
time str The RFC 3339 formatted date time string indicating when this whitelist expires.
- sha1_
fingerprint str
- cert String
- common
Name String - create
Time String - expiration
Time String The RFC 3339 formatted date time string indicating when this whitelist expires.
- sha1Fingerprint String
DatabaseInstanceSettings
- 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.- Activation
Policy string This specifies when the instance should be active. Can be either
ALWAYS
,NEVER
orON_DEMAND
.- Active
Directory DatabaseConfig Instance Settings Active Directory Config - Advanced
Machine DatabaseFeatures Instance Settings Advanced Machine Features - Availability
Type string The availability type of the Cloud SQL instance, high availability (
REGIONAL
) or single zone (ZONAL
).' For all instances, ensure thatsettings.backup_configuration.enabled
is set totrue
. For MySQL instances, ensure thatsettings.backup_configuration.binary_log_enabled
is set totrue
. For Postgres and SQL Server instances, ensure thatsettings.backup_configuration.point_in_time_recovery_enabled
is set totrue
. Defaults toZONAL
.- Backup
Configuration DatabaseInstance Settings Backup Configuration - Collation string
The name of server instance collation.
- Connector
Enforcement string Specifies if connections must use Cloud SQL connectors.
- Database
Flags List<DatabaseInstance Settings Database Flag> - Deletion
Protection boolEnabled - Deny
Maintenance DatabasePeriod Instance Settings Deny Maintenance Period - Disk
Autoresize bool Enables auto-resizing of the storage size. Defaults to
true
.- 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.
- Disk
Type string The type of data disk: PD_SSD or PD_HDD. Defaults to
PD_SSD
.- Insights
Config DatabaseInstance Settings Insights Config - Ip
Configuration DatabaseInstance Settings Ip Configuration - Location
Preference DatabaseInstance Settings Location Preference - Maintenance
Window DatabaseInstance Settings Maintenance Window - Password
Validation DatabasePolicy Instance Settings Password Validation Policy - Pricing
Plan string Pricing plan for this instance, can only be
PER_USE
.- Sql
Server DatabaseAudit Config Instance Settings Sql Server Audit Config - Time
Zone string The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
- User
Labels Dictionary<string, string> A set of key/value user label pairs to assign to the instance.
- Version int
- 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.- Activation
Policy string This specifies when the instance should be active. Can be either
ALWAYS
,NEVER
orON_DEMAND
.- Active
Directory DatabaseConfig Instance Settings Active Directory Config - Advanced
Machine DatabaseFeatures Instance Settings Advanced Machine Features - Availability
Type string The availability type of the Cloud SQL instance, high availability (
REGIONAL
) or single zone (ZONAL
).' For all instances, ensure thatsettings.backup_configuration.enabled
is set totrue
. For MySQL instances, ensure thatsettings.backup_configuration.binary_log_enabled
is set totrue
. For Postgres and SQL Server instances, ensure thatsettings.backup_configuration.point_in_time_recovery_enabled
is set totrue
. Defaults toZONAL
.- Backup
Configuration DatabaseInstance Settings Backup Configuration - Collation string
The name of server instance collation.
- Connector
Enforcement string Specifies if connections must use Cloud SQL connectors.
- Database
Flags []DatabaseInstance Settings Database Flag - Deletion
Protection boolEnabled - Deny
Maintenance DatabasePeriod Instance Settings Deny Maintenance Period - Disk
Autoresize bool Enables auto-resizing of the storage size. Defaults to
true
.- 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.
- Disk
Type string The type of data disk: PD_SSD or PD_HDD. Defaults to
PD_SSD
.- Insights
Config DatabaseInstance Settings Insights Config - Ip
Configuration DatabaseInstance Settings Ip Configuration - Location
Preference DatabaseInstance Settings Location Preference - Maintenance
Window DatabaseInstance Settings Maintenance Window - Password
Validation DatabasePolicy Instance Settings Password Validation Policy - Pricing
Plan string Pricing plan for this instance, can only be
PER_USE
.- Sql
Server DatabaseAudit Config Instance Settings Sql Server Audit Config - Time
Zone string The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
- User
Labels map[string]string A set of key/value user label pairs to assign to the instance.
- Version int
- 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.- activation
Policy String This specifies when the instance should be active. Can be either
ALWAYS
,NEVER
orON_DEMAND
.- active
Directory DatabaseConfig Instance Settings Active Directory Config - advanced
Machine DatabaseFeatures Instance Settings Advanced Machine Features - availability
Type String The availability type of the Cloud SQL instance, high availability (
REGIONAL
) or single zone (ZONAL
).' For all instances, ensure thatsettings.backup_configuration.enabled
is set totrue
. For MySQL instances, ensure thatsettings.backup_configuration.binary_log_enabled
is set totrue
. For Postgres and SQL Server instances, ensure thatsettings.backup_configuration.point_in_time_recovery_enabled
is set totrue
. Defaults toZONAL
.- backup
Configuration DatabaseInstance Settings Backup Configuration - collation String
The name of server instance collation.
- connector
Enforcement String Specifies if connections must use Cloud SQL connectors.
- database
Flags List<DatabaseInstance Settings Database Flag> - deletion
Protection BooleanEnabled - deny
Maintenance DatabasePeriod Instance Settings Deny Maintenance Period - disk
Autoresize Boolean Enables auto-resizing of the storage size. Defaults to
true
.- disk
Autoresize IntegerLimit 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 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.
- disk
Type String The type of data disk: PD_SSD or PD_HDD. Defaults to
PD_SSD
.- insights
Config DatabaseInstance Settings Insights Config - ip
Configuration DatabaseInstance Settings Ip Configuration - location
Preference DatabaseInstance Settings Location Preference - maintenance
Window DatabaseInstance Settings Maintenance Window - password
Validation DatabasePolicy Instance Settings Password Validation Policy - pricing
Plan String Pricing plan for this instance, can only be
PER_USE
.- sql
Server DatabaseAudit Config Instance Settings Sql Server Audit Config - time
Zone String The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
- user
Labels Map<String,String> A set of key/value user label pairs to assign to the instance.
- version Integer
- 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.- activation
Policy string This specifies when the instance should be active. Can be either
ALWAYS
,NEVER
orON_DEMAND
.- active
Directory DatabaseConfig Instance Settings Active Directory Config - advanced
Machine DatabaseFeatures Instance Settings Advanced Machine Features - availability
Type string The availability type of the Cloud SQL instance, high availability (
REGIONAL
) or single zone (ZONAL
).' For all instances, ensure thatsettings.backup_configuration.enabled
is set totrue
. For MySQL instances, ensure thatsettings.backup_configuration.binary_log_enabled
is set totrue
. For Postgres and SQL Server instances, ensure thatsettings.backup_configuration.point_in_time_recovery_enabled
is set totrue
. Defaults toZONAL
.- backup
Configuration DatabaseInstance Settings Backup Configuration - collation string
The name of server instance collation.
- connector
Enforcement string Specifies if connections must use Cloud SQL connectors.
- database
Flags DatabaseInstance Settings Database Flag[] - deletion
Protection booleanEnabled - deny
Maintenance DatabasePeriod Instance Settings Deny Maintenance Period - disk
Autoresize boolean Enables auto-resizing of the storage size. Defaults to
true
.- disk
Autoresize numberLimit 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 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.
- disk
Type string The type of data disk: PD_SSD or PD_HDD. Defaults to
PD_SSD
.- insights
Config DatabaseInstance Settings Insights Config - ip
Configuration DatabaseInstance Settings Ip Configuration - location
Preference DatabaseInstance Settings Location Preference - maintenance
Window DatabaseInstance Settings Maintenance Window - password
Validation DatabasePolicy Instance Settings Password Validation Policy - pricing
Plan string Pricing plan for this instance, can only be
PER_USE
.- sql
Server DatabaseAudit Config Instance Settings Sql Server Audit Config - time
Zone string The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
- user
Labels {[key: string]: string} A set of key/value user label pairs to assign to the instance.
- version number
- tier str
The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types, and custom machine types such as
db-custom-2-13312
. See the Custom Machine Type Documentation to learn about specifying custom machine types.- activation_
policy str This specifies when the instance should be active. Can be either
ALWAYS
,NEVER
orON_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.enabled
is set totrue
. For MySQL instances, ensure thatsettings.backup_configuration.binary_log_enabled
is set totrue
. For Postgres and SQL Server instances, ensure thatsettings.backup_configuration.point_in_time_recovery_enabled
is set totrue
. Defaults toZONAL
.- backup_
configuration DatabaseInstance Settings Backup Configuration - collation str
The name of server instance collation.
- connector_
enforcement str Specifies if connections must use Cloud SQL connectors.
- database_
flags Sequence[DatabaseInstance Settings Database Flag] - deletion_
protection_ boolenabled - deny_
maintenance_ Databaseperiod Instance Settings Deny Maintenance Period - disk_
autoresize bool Enables auto-resizing of the storage size. Defaults to
true
.- 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.
- disk_
type str The type of data disk: PD_SSD or PD_HDD. Defaults to
PD_SSD
.- insights_
config DatabaseInstance Settings Insights Config - ip_
configuration DatabaseInstance Settings Ip Configuration - location_
preference DatabaseInstance Settings Location Preference - maintenance_
window DatabaseInstance Settings Maintenance Window - 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
- 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.- activation
Policy String This specifies when the instance should be active. Can be either
ALWAYS
,NEVER
orON_DEMAND
.- active
Directory Property MapConfig - advanced
Machine Property MapFeatures - availability
Type String The availability type of the Cloud SQL instance, high availability (
REGIONAL
) or single zone (ZONAL
).' For all instances, ensure thatsettings.backup_configuration.enabled
is set totrue
. For MySQL instances, ensure thatsettings.backup_configuration.binary_log_enabled
is set totrue
. For Postgres and SQL Server instances, ensure thatsettings.backup_configuration.point_in_time_recovery_enabled
is set totrue
. Defaults toZONAL
.- backup
Configuration Property Map - collation String
The name of server instance collation.
- connector
Enforcement String Specifies if connections must use Cloud SQL connectors.
- database
Flags List<Property Map> - deletion
Protection BooleanEnabled - deny
Maintenance Property MapPeriod - disk
Autoresize Boolean Enables auto-resizing of the storage size. Defaults to
true
.- disk
Autoresize NumberLimit 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 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.
- disk
Type String The type of data disk: PD_SSD or PD_HDD. Defaults to
PD_SSD
.- insights
Config Property Map - ip
Configuration Property Map - location
Preference Property Map - maintenance
Window Property Map - password
Validation Property MapPolicy - pricing
Plan String Pricing plan for this instance, can only be
PER_USE
.- sql
Server Property MapAudit Config - time
Zone String The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
- user
Labels Map<String> A set of key/value user label pairs to assign to the instance.
- version Number
DatabaseInstanceSettingsActiveDirectoryConfig
- 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
- 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.
- 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.
- threads
Per 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.
- threads
Per 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.
- threads
Per 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
- 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 string
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.
- Start
Time string HH:MM
format 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.
- 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 string
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.
- Start
Time string HH:MM
format 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.
- backup
Retention DatabaseSettings Instance Settings Backup Configuration Backup Retention Settings Backup retention settings. The configuration is detailed below.
- binary
Log 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
- point
In 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.
- start
Time String HH:MM
format time indicating when backup configuration starts.- transaction
Log IntegerRetention Days The number of days of transaction logs we retain for point in time restore, from 1-7.
- backup
Retention DatabaseSettings Instance Settings Backup Configuration Backup Retention Settings Backup retention settings. The configuration is detailed below.
- binary
Log 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
- point
In 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.
- start
Time string HH:MM
format time indicating when backup configuration starts.- transaction
Log numberRetention Days The number of days of transaction logs we retain for point in time restore, from 1-7.
- 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.
- start_
time str HH:MM
format 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.
- backup
Retention Property MapSettings Backup retention settings. The configuration is detailed below.
- binary
Log 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
- point
In 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.
- start
Time String HH:MM
format time indicating when backup configuration starts.- transaction
Log NumberRetention Days The number of days of transaction logs we retain for point in time restore, from 1-7.
DatabaseInstanceSettingsBackupConfigurationBackupRetentionSettings
- 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 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 string The unit that 'retained_backups' represents. Defaults to
COUNT
.
- retained
Backups 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.
- retention
Unit String The unit that 'retained_backups' represents. Defaults to
COUNT
.
- retained
Backups 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.
- retention
Unit 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
.
- retained
Backups 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.
- retention
Unit String The unit that 'retained_backups' represents. Defaults to
COUNT
.
DatabaseInstanceSettingsDatabaseFlag
DatabaseInstanceSettingsDenyMaintenancePeriod
- End
Date string "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
- Start
Date string "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
- Time string
Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00
- End
Date string "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
- Start
Date string "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
- Time string
Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00
- end
Date String "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
- start
Date String "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
- time String
Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00
- end
Date string "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
- start
Date string "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
- time string
Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00
- end_
date str "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
- start_
date str "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
- time str
Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00
- end
Date String "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
- start
Date String "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
- time String
Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00
DatabaseInstanceSettingsInsightsConfig
- 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.
The optional
settings.password_validation_policy
subblock for instances declares Password Validation Policy configuration. It contains:- Query
String intLength Maximum query length stored in bytes. Between 256 and 4500. Default to 1024.
- 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.
- 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.
The optional
settings.password_validation_policy
subblock for instances declares Password Validation Policy configuration. It contains:- Query
String intLength Maximum query length stored in bytes. Between 256 and 4500. Default to 1024.
- 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.
- query
Insights BooleanEnabled True if Query Insights feature is enabled.
- query
Plans IntegerPer Minute Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.
The optional
settings.password_validation_policy
subblock for instances declares Password Validation Policy configuration. It contains:- query
String IntegerLength Maximum query length stored in bytes. Between 256 and 4500. Default to 1024.
- Boolean
True if Query Insights will record application tags from query when enabled.
- record
Client BooleanAddress True if Query Insights will record client address when enabled.
- query
Insights booleanEnabled True if Query Insights feature is enabled.
- query
Plans numberPer Minute Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.
The optional
settings.password_validation_policy
subblock for instances declares Password Validation Policy configuration. It contains:- query
String numberLength Maximum query length stored in bytes. Between 256 and 4500. Default to 1024.
- boolean
True if Query Insights will record application tags from query when enabled.
- record
Client 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.
The optional
settings.password_validation_policy
subblock for instances declares Password Validation Policy configuration. It contains:- query_
string_ intlength Maximum query length stored in bytes. Between 256 and 4500. Default to 1024.
- 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.
- query
Insights BooleanEnabled True if Query Insights feature is enabled.
- query
Plans NumberPer Minute Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.
The optional
settings.password_validation_policy
subblock for instances declares Password Validation Policy configuration. It contains:- query
String NumberLength Maximum query length stored in bytes. Between 256 and 4500. Default to 1024.
- Boolean
True if Query Insights will record application tags from query when enabled.
- record
Client BooleanAddress True if Query Insights will record client address when enabled.
DatabaseInstanceSettingsIpConfiguration
- Allocated
Ip 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<Database
Instance 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.
- Ipv4Enabled bool
Whether this Cloud SQL instance should be assigned a public IPV4 address. At least
ipv4_enabled
must be enabled or aprivate_network
must be configured.- Private
Network string The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least
ipv4_enabled
must be enabled or aprivate_network
must be configured. This setting can be updated, but it cannot be removed after it is set.- Require
Ssl bool Whether SSL connections over IP are enforced or not.
- Allocated
Ip 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?.
- []Database
Instance 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.
- Ipv4Enabled bool
Whether this Cloud SQL instance should be assigned a public IPV4 address. At least
ipv4_enabled
must be enabled or aprivate_network
must be configured.- Private
Network string The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least
ipv4_enabled
must be enabled or aprivate_network
must be configured. This setting can be updated, but it cannot be removed after it is set.- Require
Ssl bool Whether SSL connections over IP are enforced or not.
- allocated
Ip 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<Database
Instance Settings Ip Configuration Authorized Network> - enable
Private 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_enabled
must be enabled or aprivate_network
must be configured.- private
Network String The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least
ipv4_enabled
must be enabled or aprivate_network
must be configured. This setting can be updated, but it cannot be removed after it is set.- require
Ssl Boolean Whether SSL connections over IP are enforced or not.
- allocated
Ip 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?.
- Database
Instance Settings Ip Configuration Authorized Network[] - enable
Private 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_enabled
must be enabled or aprivate_network
must be configured.- private
Network string The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least
ipv4_enabled
must be enabled or aprivate_network
must be configured. This setting can be updated, but it cannot be removed after it is set.- require
Ssl boolean Whether SSL connections over IP are enforced or not.
- 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[Database
Instance 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_enabled
must be enabled or aprivate_network
must be configured.- private_
network str The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least
ipv4_enabled
must be enabled or aprivate_network
must be configured. This setting can be updated, but it cannot be removed after it is set.- require_
ssl bool Whether SSL connections over IP are enforced or not.
- allocated
Ip 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>
- enable
Private 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_enabled
must be enabled or aprivate_network
must be configured.- private
Network String The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least
ipv4_enabled
must be enabled or aprivate_network
must be configured. This setting can be updated, but it cannot be removed after it is set.- require
Ssl Boolean Whether SSL connections over IP are enforced or not.
DatabaseInstanceSettingsIpConfigurationAuthorizedNetwork
- 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.
- Expiration
Time 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.
- Expiration
Time 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.
- expiration
Time 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.
- expiration
Time 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.
- expiration
Time String The RFC 3339 formatted date time string indicating when this whitelist expires.
- name String
A name for this whitelist entry.
DatabaseInstanceSettingsLocationPreference
- Follow
Gae stringApplication A GAE application whose zone to remain in. Must be in the same region as this instance.
- Secondary
Zone string The preferred Compute Engine zone for the secondary/failover.
The optional
settings.maintenance_window
subblock for instances declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. It supports:- Zone string
The preferred compute engine zone.
- Follow
Gae stringApplication A GAE application whose zone to remain in. Must be in the same region as this instance.
- Secondary
Zone string The preferred Compute Engine zone for the secondary/failover.
The optional
settings.maintenance_window
subblock for instances declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. It supports:- Zone string
The preferred compute engine zone.
- follow
Gae StringApplication A GAE application whose zone to remain in. Must be in the same region as this instance.
- secondary
Zone String The preferred Compute Engine zone for the secondary/failover.
The optional
settings.maintenance_window
subblock for instances declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. It supports:- zone String
The preferred compute engine zone.
- follow
Gae stringApplication A GAE application whose zone to remain in. Must be in the same region as this instance.
- secondary
Zone string The preferred Compute Engine zone for the secondary/failover.
The optional
settings.maintenance_window
subblock for instances declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. It supports:- zone string
The preferred compute engine zone.
- follow_
gae_ 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.
The optional
settings.maintenance_window
subblock for instances declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. It supports:- zone str
The preferred compute engine zone.
- follow
Gae StringApplication A GAE application whose zone to remain in. Must be in the same region as this instance.
- secondary
Zone String The preferred Compute Engine zone for the secondary/failover.
The optional
settings.maintenance_window
subblock for instances declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. It supports:- zone String
The preferred compute engine zone.
DatabaseInstanceSettingsMaintenanceWindow
- Day int
Day of week (
1-7
), starting on Monday- Hour int
Hour of day (
0-23
), ignored ifday
not set- Update
Track string Receive updates earlier (
canary
) or later (stable
)The optional
settings.insights_config
subblock for instances declares Query Insights(MySQL, PostgreSQL) configuration. It contains:
- Day int
Day of week (
1-7
), starting on Monday- Hour int
Hour of day (
0-23
), ignored ifday
not set- Update
Track string Receive updates earlier (
canary
) or later (stable
)The optional
settings.insights_config
subblock for instances declares Query Insights(MySQL, PostgreSQL) configuration. It contains:
- day Integer
Day of week (
1-7
), starting on Monday- hour Integer
Hour of day (
0-23
), ignored ifday
not set- update
Track String Receive updates earlier (
canary
) or later (stable
)The optional
settings.insights_config
subblock for instances declares Query Insights(MySQL, PostgreSQL) configuration. It contains:
- day number
Day of week (
1-7
), starting on Monday- hour number
Hour of day (
0-23
), ignored ifday
not set- update
Track string Receive updates earlier (
canary
) or later (stable
)The optional
settings.insights_config
subblock for instances declares Query Insights(MySQL, PostgreSQL) configuration. It contains:
- day int
Day of week (
1-7
), starting on Monday- hour int
Hour of day (
0-23
), ignored ifday
not set- update_
track str Receive updates earlier (
canary
) or later (stable
)The optional
settings.insights_config
subblock for instances declares Query Insights(MySQL, PostgreSQL) configuration. It contains:
- day Number
Day of week (
1-7
), starting on Monday- hour Number
Hour of day (
0-23
), ignored ifday
not set- update
Track String Receive updates earlier (
canary
) or later (stable
)The optional
settings.insights_config
subblock for instances declares Query Insights(MySQL, PostgreSQL) configuration. It contains:
DatabaseInstanceSettingsPasswordValidationPolicy
- Enable
Password boolPolicy Enables or disable the password validation policy.
The optional
replica_configuration
block must havemaster_instance_name
set to work, cannot be updated, and supports:- Complexity string
Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
- 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 stringInterval 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.
- Enable
Password boolPolicy Enables or disable the password validation policy.
The optional
replica_configuration
block must havemaster_instance_name
set to work, cannot be updated, and supports:- Complexity string
Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
- 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 stringInterval 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.
- enable
Password BooleanPolicy Enables or disable the password validation policy.
The optional
replica_configuration
block must havemaster_instance_name
set to work, cannot be updated, and supports:- complexity String
Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
- disallow
Username BooleanSubstring Prevents the use of the username in the password.
- min
Length Integer Specifies the minimum number of characters that the password must have.
- password
Change StringInterval Specifies the minimum duration after which you can change the password.
- reuse
Interval Integer Specifies the number of previous passwords that you can't reuse.
- enable
Password booleanPolicy Enables or disable the password validation policy.
The optional
replica_configuration
block must havemaster_instance_name
set to work, cannot be updated, and supports:- complexity string
Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
- disallow
Username booleanSubstring Prevents the use of the username in the password.
- min
Length number Specifies the minimum number of characters that the password must have.
- password
Change stringInterval Specifies the minimum duration after which you can change the password.
- reuse
Interval number Specifies the number of previous passwords that you can't reuse.
- enable_
password_ boolpolicy Enables or disable the password validation policy.
The optional
replica_configuration
block must havemaster_instance_name
set to work, cannot be updated, and supports:- complexity str
Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
- disallow_
username_ 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.
- enable
Password BooleanPolicy Enables or disable the password validation policy.
The optional
replica_configuration
block must havemaster_instance_name
set to work, cannot be updated, and supports:- complexity String
Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.
- disallow
Username BooleanSubstring Prevents the use of the username in the password.
- min
Length Number Specifies the minimum number of characters that the password must have.
- password
Change StringInterval Specifies the minimum duration after which you can change the password.
- reuse
Interval Number Specifies the number of previous passwords that you can't reuse.
DatabaseInstanceSettingsSqlServerAuditConfig
- Bucket string
The name of the destination bucket (e.g., gs://mybucket).
- Retention
Interval string 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 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).
- Retention
Interval string 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 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).
- retention
Interval String 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 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).
- retention
Interval string 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 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).
- retention
Interval String 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 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
$ pulumi import gcp:sql/databaseInstance:DatabaseInstance main projects/{{project}}/instances/{{name}}
$ pulumi import gcp:sql/databaseInstance:DatabaseInstance main {{project}}/{{name}}
$ pulumi import gcp:sql/databaseInstance:DatabaseInstance main {{name}}
config and set on the server. When importing, double-check that your config has all the fields set that you expect- just seeing no diff isn’t sufficient to know that your config could reproduce the imported resource.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
google-beta
Terraform Provider.