gcp.alloydb.Instance
Explore with Pulumi AI
Example Usage
Alloydb Instance Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const defaultNetwork = new gcp.compute.Network("default", {name: "alloydb-network"});
const defaultCluster = new gcp.alloydb.Cluster("default", {
clusterId: "alloydb-cluster",
location: "us-central1",
networkConfig: {
network: defaultNetwork.id,
},
initialUser: {
password: "alloydb-cluster",
},
});
const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", {
name: "alloydb-cluster",
addressType: "INTERNAL",
purpose: "VPC_PEERING",
prefixLength: 16,
network: defaultNetwork.id,
});
const vpcConnection = new gcp.servicenetworking.Connection("vpc_connection", {
network: defaultNetwork.id,
service: "servicenetworking.googleapis.com",
reservedPeeringRanges: [privateIpAlloc.name],
});
const _default = new gcp.alloydb.Instance("default", {
cluster: defaultCluster.name,
instanceId: "alloydb-instance",
instanceType: "PRIMARY",
machineConfig: {
cpuCount: 2,
},
}, {
dependsOn: [vpcConnection],
});
const project = gcp.organizations.getProject({});
import pulumi
import pulumi_gcp as gcp
default_network = gcp.compute.Network("default", name="alloydb-network")
default_cluster = gcp.alloydb.Cluster("default",
cluster_id="alloydb-cluster",
location="us-central1",
network_config=gcp.alloydb.ClusterNetworkConfigArgs(
network=default_network.id,
),
initial_user=gcp.alloydb.ClusterInitialUserArgs(
password="alloydb-cluster",
))
private_ip_alloc = gcp.compute.GlobalAddress("private_ip_alloc",
name="alloydb-cluster",
address_type="INTERNAL",
purpose="VPC_PEERING",
prefix_length=16,
network=default_network.id)
vpc_connection = gcp.servicenetworking.Connection("vpc_connection",
network=default_network.id,
service="servicenetworking.googleapis.com",
reserved_peering_ranges=[private_ip_alloc.name])
default = gcp.alloydb.Instance("default",
cluster=default_cluster.name,
instance_id="alloydb-instance",
instance_type="PRIMARY",
machine_config=gcp.alloydb.InstanceMachineConfigArgs(
cpu_count=2,
),
opts = pulumi.ResourceOptions(depends_on=[vpc_connection]))
project = gcp.organizations.get_project()
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/alloydb"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/servicenetworking"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
Name: pulumi.String("alloydb-network"),
})
if err != nil {
return err
}
defaultCluster, err := alloydb.NewCluster(ctx, "default", &alloydb.ClusterArgs{
ClusterId: pulumi.String("alloydb-cluster"),
Location: pulumi.String("us-central1"),
NetworkConfig: &alloydb.ClusterNetworkConfigArgs{
Network: defaultNetwork.ID(),
},
InitialUser: &alloydb.ClusterInitialUserArgs{
Password: pulumi.String("alloydb-cluster"),
},
})
if err != nil {
return err
}
privateIpAlloc, err := compute.NewGlobalAddress(ctx, "private_ip_alloc", &compute.GlobalAddressArgs{
Name: pulumi.String("alloydb-cluster"),
AddressType: pulumi.String("INTERNAL"),
Purpose: pulumi.String("VPC_PEERING"),
PrefixLength: pulumi.Int(16),
Network: defaultNetwork.ID(),
})
if err != nil {
return err
}
vpcConnection, err := servicenetworking.NewConnection(ctx, "vpc_connection", &servicenetworking.ConnectionArgs{
Network: defaultNetwork.ID(),
Service: pulumi.String("servicenetworking.googleapis.com"),
ReservedPeeringRanges: pulumi.StringArray{
privateIpAlloc.Name,
},
})
if err != nil {
return err
}
_, err = alloydb.NewInstance(ctx, "default", &alloydb.InstanceArgs{
Cluster: defaultCluster.Name,
InstanceId: pulumi.String("alloydb-instance"),
InstanceType: pulumi.String("PRIMARY"),
MachineConfig: &alloydb.InstanceMachineConfigArgs{
CpuCount: pulumi.Int(2),
},
}, pulumi.DependsOn([]pulumi.Resource{
vpcConnection,
}))
if err != nil {
return err
}
_, err = organizations.LookupProject(ctx, nil, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var defaultNetwork = new Gcp.Compute.Network("default", new()
{
Name = "alloydb-network",
});
var defaultCluster = new Gcp.Alloydb.Cluster("default", new()
{
ClusterId = "alloydb-cluster",
Location = "us-central1",
NetworkConfig = new Gcp.Alloydb.Inputs.ClusterNetworkConfigArgs
{
Network = defaultNetwork.Id,
},
InitialUser = new Gcp.Alloydb.Inputs.ClusterInitialUserArgs
{
Password = "alloydb-cluster",
},
});
var privateIpAlloc = new Gcp.Compute.GlobalAddress("private_ip_alloc", new()
{
Name = "alloydb-cluster",
AddressType = "INTERNAL",
Purpose = "VPC_PEERING",
PrefixLength = 16,
Network = defaultNetwork.Id,
});
var vpcConnection = new Gcp.ServiceNetworking.Connection("vpc_connection", new()
{
Network = defaultNetwork.Id,
Service = "servicenetworking.googleapis.com",
ReservedPeeringRanges = new[]
{
privateIpAlloc.Name,
},
});
var @default = new Gcp.Alloydb.Instance("default", new()
{
Cluster = defaultCluster.Name,
InstanceId = "alloydb-instance",
InstanceType = "PRIMARY",
MachineConfig = new Gcp.Alloydb.Inputs.InstanceMachineConfigArgs
{
CpuCount = 2,
},
}, new CustomResourceOptions
{
DependsOn =
{
vpcConnection,
},
});
var project = Gcp.Organizations.GetProject.Invoke();
});
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.alloydb.Cluster;
import com.pulumi.gcp.alloydb.ClusterArgs;
import com.pulumi.gcp.alloydb.inputs.ClusterNetworkConfigArgs;
import com.pulumi.gcp.alloydb.inputs.ClusterInitialUserArgs;
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.gcp.alloydb.Instance;
import com.pulumi.gcp.alloydb.InstanceArgs;
import com.pulumi.gcp.alloydb.inputs.InstanceMachineConfigArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
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 defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.name("alloydb-network")
.build());
var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
.clusterId("alloydb-cluster")
.location("us-central1")
.networkConfig(ClusterNetworkConfigArgs.builder()
.network(defaultNetwork.id())
.build())
.initialUser(ClusterInitialUserArgs.builder()
.password("alloydb-cluster")
.build())
.build());
var privateIpAlloc = new GlobalAddress("privateIpAlloc", GlobalAddressArgs.builder()
.name("alloydb-cluster")
.addressType("INTERNAL")
.purpose("VPC_PEERING")
.prefixLength(16)
.network(defaultNetwork.id())
.build());
var vpcConnection = new Connection("vpcConnection", ConnectionArgs.builder()
.network(defaultNetwork.id())
.service("servicenetworking.googleapis.com")
.reservedPeeringRanges(privateIpAlloc.name())
.build());
var default_ = new Instance("default", InstanceArgs.builder()
.cluster(defaultCluster.name())
.instanceId("alloydb-instance")
.instanceType("PRIMARY")
.machineConfig(InstanceMachineConfigArgs.builder()
.cpuCount(2)
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(vpcConnection)
.build());
final var project = OrganizationsFunctions.getProject();
}
}
resources:
default:
type: gcp:alloydb:Instance
properties:
cluster: ${defaultCluster.name}
instanceId: alloydb-instance
instanceType: PRIMARY
machineConfig:
cpuCount: 2
options:
dependson:
- ${vpcConnection}
defaultCluster:
type: gcp:alloydb:Cluster
name: default
properties:
clusterId: alloydb-cluster
location: us-central1
networkConfig:
network: ${defaultNetwork.id}
initialUser:
password: alloydb-cluster
defaultNetwork:
type: gcp:compute:Network
name: default
properties:
name: alloydb-network
privateIpAlloc:
type: gcp:compute:GlobalAddress
name: private_ip_alloc
properties:
name: alloydb-cluster
addressType: INTERNAL
purpose: VPC_PEERING
prefixLength: 16
network: ${defaultNetwork.id}
vpcConnection:
type: gcp:servicenetworking:Connection
name: vpc_connection
properties:
network: ${defaultNetwork.id}
service: servicenetworking.googleapis.com
reservedPeeringRanges:
- ${privateIpAlloc.name}
variables:
project:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}
Alloydb Secondary Instance Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.compute.Network("default", {name: "alloydb-secondary-network"});
const primary = new gcp.alloydb.Cluster("primary", {
clusterId: "alloydb-primary-cluster",
location: "us-central1",
network: _default.id,
});
const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", {
name: "alloydb-secondary-instance",
addressType: "INTERNAL",
purpose: "VPC_PEERING",
prefixLength: 16,
network: _default.id,
});
const vpcConnection = new gcp.servicenetworking.Connection("vpc_connection", {
network: _default.id,
service: "servicenetworking.googleapis.com",
reservedPeeringRanges: [privateIpAlloc.name],
});
const primaryInstance = new gcp.alloydb.Instance("primary", {
cluster: primary.name,
instanceId: "alloydb-primary-instance",
instanceType: "PRIMARY",
machineConfig: {
cpuCount: 2,
},
}, {
dependsOn: [vpcConnection],
});
const secondary = new gcp.alloydb.Cluster("secondary", {
clusterId: "alloydb-secondary-cluster",
location: "us-east1",
network: _default.id,
clusterType: "SECONDARY",
continuousBackupConfig: {
enabled: false,
},
secondaryConfig: {
primaryClusterName: primary.name,
},
deletionPolicy: "FORCE",
}, {
dependsOn: [primaryInstance],
});
const secondaryInstance = new gcp.alloydb.Instance("secondary", {
cluster: secondary.name,
instanceId: "alloydb-secondary-instance",
instanceType: secondary.clusterType,
machineConfig: {
cpuCount: 2,
},
}, {
dependsOn: [vpcConnection],
});
const project = gcp.organizations.getProject({});
import pulumi
import pulumi_gcp as gcp
default = gcp.compute.Network("default", name="alloydb-secondary-network")
primary = gcp.alloydb.Cluster("primary",
cluster_id="alloydb-primary-cluster",
location="us-central1",
network=default.id)
private_ip_alloc = gcp.compute.GlobalAddress("private_ip_alloc",
name="alloydb-secondary-instance",
address_type="INTERNAL",
purpose="VPC_PEERING",
prefix_length=16,
network=default.id)
vpc_connection = gcp.servicenetworking.Connection("vpc_connection",
network=default.id,
service="servicenetworking.googleapis.com",
reserved_peering_ranges=[private_ip_alloc.name])
primary_instance = gcp.alloydb.Instance("primary",
cluster=primary.name,
instance_id="alloydb-primary-instance",
instance_type="PRIMARY",
machine_config=gcp.alloydb.InstanceMachineConfigArgs(
cpu_count=2,
),
opts = pulumi.ResourceOptions(depends_on=[vpc_connection]))
secondary = gcp.alloydb.Cluster("secondary",
cluster_id="alloydb-secondary-cluster",
location="us-east1",
network=default.id,
cluster_type="SECONDARY",
continuous_backup_config=gcp.alloydb.ClusterContinuousBackupConfigArgs(
enabled=False,
),
secondary_config=gcp.alloydb.ClusterSecondaryConfigArgs(
primary_cluster_name=primary.name,
),
deletion_policy="FORCE",
opts = pulumi.ResourceOptions(depends_on=[primary_instance]))
secondary_instance = gcp.alloydb.Instance("secondary",
cluster=secondary.name,
instance_id="alloydb-secondary-instance",
instance_type=secondary.cluster_type,
machine_config=gcp.alloydb.InstanceMachineConfigArgs(
cpu_count=2,
),
opts = pulumi.ResourceOptions(depends_on=[vpc_connection]))
project = gcp.organizations.get_project()
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/alloydb"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/servicenetworking"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
Name: pulumi.String("alloydb-secondary-network"),
})
if err != nil {
return err
}
primary, err := alloydb.NewCluster(ctx, "primary", &alloydb.ClusterArgs{
ClusterId: pulumi.String("alloydb-primary-cluster"),
Location: pulumi.String("us-central1"),
Network: _default.ID(),
})
if err != nil {
return err
}
privateIpAlloc, err := compute.NewGlobalAddress(ctx, "private_ip_alloc", &compute.GlobalAddressArgs{
Name: pulumi.String("alloydb-secondary-instance"),
AddressType: pulumi.String("INTERNAL"),
Purpose: pulumi.String("VPC_PEERING"),
PrefixLength: pulumi.Int(16),
Network: _default.ID(),
})
if err != nil {
return err
}
vpcConnection, err := servicenetworking.NewConnection(ctx, "vpc_connection", &servicenetworking.ConnectionArgs{
Network: _default.ID(),
Service: pulumi.String("servicenetworking.googleapis.com"),
ReservedPeeringRanges: pulumi.StringArray{
privateIpAlloc.Name,
},
})
if err != nil {
return err
}
primaryInstance, err := alloydb.NewInstance(ctx, "primary", &alloydb.InstanceArgs{
Cluster: primary.Name,
InstanceId: pulumi.String("alloydb-primary-instance"),
InstanceType: pulumi.String("PRIMARY"),
MachineConfig: &alloydb.InstanceMachineConfigArgs{
CpuCount: pulumi.Int(2),
},
}, pulumi.DependsOn([]pulumi.Resource{
vpcConnection,
}))
if err != nil {
return err
}
secondary, err := alloydb.NewCluster(ctx, "secondary", &alloydb.ClusterArgs{
ClusterId: pulumi.String("alloydb-secondary-cluster"),
Location: pulumi.String("us-east1"),
Network: _default.ID(),
ClusterType: pulumi.String("SECONDARY"),
ContinuousBackupConfig: &alloydb.ClusterContinuousBackupConfigArgs{
Enabled: pulumi.Bool(false),
},
SecondaryConfig: &alloydb.ClusterSecondaryConfigArgs{
PrimaryClusterName: primary.Name,
},
DeletionPolicy: pulumi.String("FORCE"),
}, pulumi.DependsOn([]pulumi.Resource{
primaryInstance,
}))
if err != nil {
return err
}
_, err = alloydb.NewInstance(ctx, "secondary", &alloydb.InstanceArgs{
Cluster: secondary.Name,
InstanceId: pulumi.String("alloydb-secondary-instance"),
InstanceType: secondary.ClusterType,
MachineConfig: &alloydb.InstanceMachineConfigArgs{
CpuCount: pulumi.Int(2),
},
}, pulumi.DependsOn([]pulumi.Resource{
vpcConnection,
}))
if err != nil {
return err
}
_, err = organizations.LookupProject(ctx, nil, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.Compute.Network("default", new()
{
Name = "alloydb-secondary-network",
});
var primary = new Gcp.Alloydb.Cluster("primary", new()
{
ClusterId = "alloydb-primary-cluster",
Location = "us-central1",
Network = @default.Id,
});
var privateIpAlloc = new Gcp.Compute.GlobalAddress("private_ip_alloc", new()
{
Name = "alloydb-secondary-instance",
AddressType = "INTERNAL",
Purpose = "VPC_PEERING",
PrefixLength = 16,
Network = @default.Id,
});
var vpcConnection = new Gcp.ServiceNetworking.Connection("vpc_connection", new()
{
Network = @default.Id,
Service = "servicenetworking.googleapis.com",
ReservedPeeringRanges = new[]
{
privateIpAlloc.Name,
},
});
var primaryInstance = new Gcp.Alloydb.Instance("primary", new()
{
Cluster = primary.Name,
InstanceId = "alloydb-primary-instance",
InstanceType = "PRIMARY",
MachineConfig = new Gcp.Alloydb.Inputs.InstanceMachineConfigArgs
{
CpuCount = 2,
},
}, new CustomResourceOptions
{
DependsOn =
{
vpcConnection,
},
});
var secondary = new Gcp.Alloydb.Cluster("secondary", new()
{
ClusterId = "alloydb-secondary-cluster",
Location = "us-east1",
Network = @default.Id,
ClusterType = "SECONDARY",
ContinuousBackupConfig = new Gcp.Alloydb.Inputs.ClusterContinuousBackupConfigArgs
{
Enabled = false,
},
SecondaryConfig = new Gcp.Alloydb.Inputs.ClusterSecondaryConfigArgs
{
PrimaryClusterName = primary.Name,
},
DeletionPolicy = "FORCE",
}, new CustomResourceOptions
{
DependsOn =
{
primaryInstance,
},
});
var secondaryInstance = new Gcp.Alloydb.Instance("secondary", new()
{
Cluster = secondary.Name,
InstanceId = "alloydb-secondary-instance",
InstanceType = secondary.ClusterType,
MachineConfig = new Gcp.Alloydb.Inputs.InstanceMachineConfigArgs
{
CpuCount = 2,
},
}, new CustomResourceOptions
{
DependsOn =
{
vpcConnection,
},
});
var project = Gcp.Organizations.GetProject.Invoke();
});
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.alloydb.Cluster;
import com.pulumi.gcp.alloydb.ClusterArgs;
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.gcp.alloydb.Instance;
import com.pulumi.gcp.alloydb.InstanceArgs;
import com.pulumi.gcp.alloydb.inputs.InstanceMachineConfigArgs;
import com.pulumi.gcp.alloydb.inputs.ClusterContinuousBackupConfigArgs;
import com.pulumi.gcp.alloydb.inputs.ClusterSecondaryConfigArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
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 default_ = new Network("default", NetworkArgs.builder()
.name("alloydb-secondary-network")
.build());
var primary = new Cluster("primary", ClusterArgs.builder()
.clusterId("alloydb-primary-cluster")
.location("us-central1")
.network(default_.id())
.build());
var privateIpAlloc = new GlobalAddress("privateIpAlloc", GlobalAddressArgs.builder()
.name("alloydb-secondary-instance")
.addressType("INTERNAL")
.purpose("VPC_PEERING")
.prefixLength(16)
.network(default_.id())
.build());
var vpcConnection = new Connection("vpcConnection", ConnectionArgs.builder()
.network(default_.id())
.service("servicenetworking.googleapis.com")
.reservedPeeringRanges(privateIpAlloc.name())
.build());
var primaryInstance = new Instance("primaryInstance", InstanceArgs.builder()
.cluster(primary.name())
.instanceId("alloydb-primary-instance")
.instanceType("PRIMARY")
.machineConfig(InstanceMachineConfigArgs.builder()
.cpuCount(2)
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(vpcConnection)
.build());
var secondary = new Cluster("secondary", ClusterArgs.builder()
.clusterId("alloydb-secondary-cluster")
.location("us-east1")
.network(default_.id())
.clusterType("SECONDARY")
.continuousBackupConfig(ClusterContinuousBackupConfigArgs.builder()
.enabled(false)
.build())
.secondaryConfig(ClusterSecondaryConfigArgs.builder()
.primaryClusterName(primary.name())
.build())
.deletionPolicy("FORCE")
.build(), CustomResourceOptions.builder()
.dependsOn(primaryInstance)
.build());
var secondaryInstance = new Instance("secondaryInstance", InstanceArgs.builder()
.cluster(secondary.name())
.instanceId("alloydb-secondary-instance")
.instanceType(secondary.clusterType())
.machineConfig(InstanceMachineConfigArgs.builder()
.cpuCount(2)
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(vpcConnection)
.build());
final var project = OrganizationsFunctions.getProject();
}
}
resources:
primary:
type: gcp:alloydb:Cluster
properties:
clusterId: alloydb-primary-cluster
location: us-central1
network: ${default.id}
primaryInstance:
type: gcp:alloydb:Instance
name: primary
properties:
cluster: ${primary.name}
instanceId: alloydb-primary-instance
instanceType: PRIMARY
machineConfig:
cpuCount: 2
options:
dependson:
- ${vpcConnection}
secondary:
type: gcp:alloydb:Cluster
properties:
clusterId: alloydb-secondary-cluster
location: us-east1
network: ${default.id}
clusterType: SECONDARY
continuousBackupConfig:
enabled: false
secondaryConfig:
primaryClusterName: ${primary.name}
deletionPolicy: FORCE
options:
dependson:
- ${primaryInstance}
secondaryInstance:
type: gcp:alloydb:Instance
name: secondary
properties:
cluster: ${secondary.name}
instanceId: alloydb-secondary-instance
instanceType: ${secondary.clusterType}
machineConfig:
cpuCount: 2
options:
dependson:
- ${vpcConnection}
default:
type: gcp:compute:Network
properties:
name: alloydb-secondary-network
privateIpAlloc:
type: gcp:compute:GlobalAddress
name: private_ip_alloc
properties:
name: alloydb-secondary-instance
addressType: INTERNAL
purpose: VPC_PEERING
prefixLength: 16
network: ${default.id}
vpcConnection:
type: gcp:servicenetworking:Connection
name: vpc_connection
properties:
network: ${default.id}
service: servicenetworking.googleapis.com
reservedPeeringRanges:
- ${privateIpAlloc.name}
variables:
project:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}
Create Instance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
@overload
def Instance(resource_name: str,
args: InstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Instance(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster: Optional[str] = None,
instance_type: Optional[str] = None,
instance_id: Optional[str] = None,
gce_zone: Optional[str] = None,
database_flags: Optional[Mapping[str, str]] = None,
display_name: Optional[str] = None,
annotations: Optional[Mapping[str, str]] = None,
client_connection_config: Optional[InstanceClientConnectionConfigArgs] = None,
availability_type: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
machine_config: Optional[InstanceMachineConfigArgs] = None,
network_config: Optional[InstanceNetworkConfigArgs] = None,
psc_instance_config: Optional[InstancePscInstanceConfigArgs] = None,
query_insights_config: Optional[InstanceQueryInsightsConfigArgs] = None,
read_pool_config: Optional[InstanceReadPoolConfigArgs] = None)
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: gcp:alloydb:Instance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args InstanceArgs
- 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 InstanceArgs
- 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 InstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var instanceResource = new Gcp.Alloydb.Instance("instanceResource", new()
{
Cluster = "string",
InstanceType = "string",
InstanceId = "string",
GceZone = "string",
DatabaseFlags =
{
{ "string", "string" },
},
DisplayName = "string",
Annotations =
{
{ "string", "string" },
},
ClientConnectionConfig = new Gcp.Alloydb.Inputs.InstanceClientConnectionConfigArgs
{
RequireConnectors = false,
SslConfig = new Gcp.Alloydb.Inputs.InstanceClientConnectionConfigSslConfigArgs
{
SslMode = "string",
},
},
AvailabilityType = "string",
Labels =
{
{ "string", "string" },
},
MachineConfig = new Gcp.Alloydb.Inputs.InstanceMachineConfigArgs
{
CpuCount = 0,
},
NetworkConfig = new Gcp.Alloydb.Inputs.InstanceNetworkConfigArgs
{
AuthorizedExternalNetworks = new[]
{
new Gcp.Alloydb.Inputs.InstanceNetworkConfigAuthorizedExternalNetworkArgs
{
CidrRange = "string",
},
},
EnablePublicIp = false,
},
PscInstanceConfig = new Gcp.Alloydb.Inputs.InstancePscInstanceConfigArgs
{
AllowedConsumerProjects = new[]
{
"string",
},
PscDnsName = "string",
ServiceAttachmentLink = "string",
},
QueryInsightsConfig = new Gcp.Alloydb.Inputs.InstanceQueryInsightsConfigArgs
{
QueryPlansPerMinute = 0,
QueryStringLength = 0,
RecordApplicationTags = false,
RecordClientAddress = false,
},
ReadPoolConfig = new Gcp.Alloydb.Inputs.InstanceReadPoolConfigArgs
{
NodeCount = 0,
},
});
example, err := alloydb.NewInstance(ctx, "instanceResource", &alloydb.InstanceArgs{
Cluster: pulumi.String("string"),
InstanceType: pulumi.String("string"),
InstanceId: pulumi.String("string"),
GceZone: pulumi.String("string"),
DatabaseFlags: pulumi.StringMap{
"string": pulumi.String("string"),
},
DisplayName: pulumi.String("string"),
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
ClientConnectionConfig: &alloydb.InstanceClientConnectionConfigArgs{
RequireConnectors: pulumi.Bool(false),
SslConfig: &alloydb.InstanceClientConnectionConfigSslConfigArgs{
SslMode: pulumi.String("string"),
},
},
AvailabilityType: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
MachineConfig: &alloydb.InstanceMachineConfigArgs{
CpuCount: pulumi.Int(0),
},
NetworkConfig: &alloydb.InstanceNetworkConfigArgs{
AuthorizedExternalNetworks: alloydb.InstanceNetworkConfigAuthorizedExternalNetworkArray{
&alloydb.InstanceNetworkConfigAuthorizedExternalNetworkArgs{
CidrRange: pulumi.String("string"),
},
},
EnablePublicIp: pulumi.Bool(false),
},
PscInstanceConfig: &alloydb.InstancePscInstanceConfigArgs{
AllowedConsumerProjects: pulumi.StringArray{
pulumi.String("string"),
},
PscDnsName: pulumi.String("string"),
ServiceAttachmentLink: pulumi.String("string"),
},
QueryInsightsConfig: &alloydb.InstanceQueryInsightsConfigArgs{
QueryPlansPerMinute: pulumi.Int(0),
QueryStringLength: pulumi.Int(0),
RecordApplicationTags: pulumi.Bool(false),
RecordClientAddress: pulumi.Bool(false),
},
ReadPoolConfig: &alloydb.InstanceReadPoolConfigArgs{
NodeCount: pulumi.Int(0),
},
})
var instanceResource = new Instance("instanceResource", InstanceArgs.builder()
.cluster("string")
.instanceType("string")
.instanceId("string")
.gceZone("string")
.databaseFlags(Map.of("string", "string"))
.displayName("string")
.annotations(Map.of("string", "string"))
.clientConnectionConfig(InstanceClientConnectionConfigArgs.builder()
.requireConnectors(false)
.sslConfig(InstanceClientConnectionConfigSslConfigArgs.builder()
.sslMode("string")
.build())
.build())
.availabilityType("string")
.labels(Map.of("string", "string"))
.machineConfig(InstanceMachineConfigArgs.builder()
.cpuCount(0)
.build())
.networkConfig(InstanceNetworkConfigArgs.builder()
.authorizedExternalNetworks(InstanceNetworkConfigAuthorizedExternalNetworkArgs.builder()
.cidrRange("string")
.build())
.enablePublicIp(false)
.build())
.pscInstanceConfig(InstancePscInstanceConfigArgs.builder()
.allowedConsumerProjects("string")
.pscDnsName("string")
.serviceAttachmentLink("string")
.build())
.queryInsightsConfig(InstanceQueryInsightsConfigArgs.builder()
.queryPlansPerMinute(0)
.queryStringLength(0)
.recordApplicationTags(false)
.recordClientAddress(false)
.build())
.readPoolConfig(InstanceReadPoolConfigArgs.builder()
.nodeCount(0)
.build())
.build());
instance_resource = gcp.alloydb.Instance("instanceResource",
cluster="string",
instance_type="string",
instance_id="string",
gce_zone="string",
database_flags={
"string": "string",
},
display_name="string",
annotations={
"string": "string",
},
client_connection_config=gcp.alloydb.InstanceClientConnectionConfigArgs(
require_connectors=False,
ssl_config=gcp.alloydb.InstanceClientConnectionConfigSslConfigArgs(
ssl_mode="string",
),
),
availability_type="string",
labels={
"string": "string",
},
machine_config=gcp.alloydb.InstanceMachineConfigArgs(
cpu_count=0,
),
network_config=gcp.alloydb.InstanceNetworkConfigArgs(
authorized_external_networks=[gcp.alloydb.InstanceNetworkConfigAuthorizedExternalNetworkArgs(
cidr_range="string",
)],
enable_public_ip=False,
),
psc_instance_config=gcp.alloydb.InstancePscInstanceConfigArgs(
allowed_consumer_projects=["string"],
psc_dns_name="string",
service_attachment_link="string",
),
query_insights_config=gcp.alloydb.InstanceQueryInsightsConfigArgs(
query_plans_per_minute=0,
query_string_length=0,
record_application_tags=False,
record_client_address=False,
),
read_pool_config=gcp.alloydb.InstanceReadPoolConfigArgs(
node_count=0,
))
const instanceResource = new gcp.alloydb.Instance("instanceResource", {
cluster: "string",
instanceType: "string",
instanceId: "string",
gceZone: "string",
databaseFlags: {
string: "string",
},
displayName: "string",
annotations: {
string: "string",
},
clientConnectionConfig: {
requireConnectors: false,
sslConfig: {
sslMode: "string",
},
},
availabilityType: "string",
labels: {
string: "string",
},
machineConfig: {
cpuCount: 0,
},
networkConfig: {
authorizedExternalNetworks: [{
cidrRange: "string",
}],
enablePublicIp: false,
},
pscInstanceConfig: {
allowedConsumerProjects: ["string"],
pscDnsName: "string",
serviceAttachmentLink: "string",
},
queryInsightsConfig: {
queryPlansPerMinute: 0,
queryStringLength: 0,
recordApplicationTags: false,
recordClientAddress: false,
},
readPoolConfig: {
nodeCount: 0,
},
});
type: gcp:alloydb:Instance
properties:
annotations:
string: string
availabilityType: string
clientConnectionConfig:
requireConnectors: false
sslConfig:
sslMode: string
cluster: string
databaseFlags:
string: string
displayName: string
gceZone: string
instanceId: string
instanceType: string
labels:
string: string
machineConfig:
cpuCount: 0
networkConfig:
authorizedExternalNetworks:
- cidrRange: string
enablePublicIp: false
pscInstanceConfig:
allowedConsumerProjects:
- string
pscDnsName: string
serviceAttachmentLink: string
queryInsightsConfig:
queryPlansPerMinute: 0
queryStringLength: 0
recordApplicationTags: false
recordClientAddress: false
readPoolConfig:
nodeCount: 0
Instance 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 Instance resource accepts the following input properties:
- Cluster string
- Identifies the alloydb cluster. Must be in the format 'projects/{project}/locations/{location}/clusters/{cluster_id}'
- Instance
Id string - The ID of the alloydb instance.
- Instance
Type string - Annotations Dictionary<string, string>
- Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels.
Note: This field is non-authoritative, and will only manage the annotations present in your configuration.
Please refer to the field
effective_annotations
for all of the annotations present on the resource. - Availability
Type string - 'Availability type of an Instance. Defaults to REGIONAL for both primary and read instances.
Note that primary and read instances can have different availability types.
Only READ_POOL instance supports ZONAL type. Users can't specify the zone for READ_POOL instance.
Zone is automatically chosen from the list of zones in the region specified.
Read pool of size 1 can only have zonal availability. Read pools with node count of 2 or more
can have regional availability (nodes are present in 2 or more zones in a region).'
Possible values are:
AVAILABILITY_TYPE_UNSPECIFIED
,ZONAL
,REGIONAL
. - Client
Connection InstanceConfig Client Connection Config - Client connection specific configurations. Structure is documented below.
- Database
Flags Dictionary<string, string> - Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.
- Display
Name string - User-settable and human-readable display name for the Instance.
- Gce
Zone string - The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.
- Labels Dictionary<string, string>
- User-defined labels for the alloydb instance.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - Machine
Config InstanceMachine Config - Configurations for the machines that host the underlying database engine. Structure is documented below.
- Network
Config InstanceNetwork Config - Instance level network configuration. Structure is documented below.
- Psc
Instance InstanceConfig Psc Instance Config - Configuration for Private Service Connect (PSC) for the instance. Structure is documented below.
- Query
Insights InstanceConfig Query Insights Config - Configuration for query insights. Structure is documented below.
- Read
Pool InstanceConfig Read Pool Config - Read pool specific config. If the instance type is READ_POOL, this configuration must be provided. Structure is documented below.
- Cluster string
- Identifies the alloydb cluster. Must be in the format 'projects/{project}/locations/{location}/clusters/{cluster_id}'
- Instance
Id string - The ID of the alloydb instance.
- Instance
Type string - Annotations map[string]string
- Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels.
Note: This field is non-authoritative, and will only manage the annotations present in your configuration.
Please refer to the field
effective_annotations
for all of the annotations present on the resource. - Availability
Type string - 'Availability type of an Instance. Defaults to REGIONAL for both primary and read instances.
Note that primary and read instances can have different availability types.
Only READ_POOL instance supports ZONAL type. Users can't specify the zone for READ_POOL instance.
Zone is automatically chosen from the list of zones in the region specified.
Read pool of size 1 can only have zonal availability. Read pools with node count of 2 or more
can have regional availability (nodes are present in 2 or more zones in a region).'
Possible values are:
AVAILABILITY_TYPE_UNSPECIFIED
,ZONAL
,REGIONAL
. - Client
Connection InstanceConfig Client Connection Config Args - Client connection specific configurations. Structure is documented below.
- Database
Flags map[string]string - Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.
- Display
Name string - User-settable and human-readable display name for the Instance.
- Gce
Zone string - The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.
- Labels map[string]string
- User-defined labels for the alloydb instance.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - Machine
Config InstanceMachine Config Args - Configurations for the machines that host the underlying database engine. Structure is documented below.
- Network
Config InstanceNetwork Config Args - Instance level network configuration. Structure is documented below.
- Psc
Instance InstanceConfig Psc Instance Config Args - Configuration for Private Service Connect (PSC) for the instance. Structure is documented below.
- Query
Insights InstanceConfig Query Insights Config Args - Configuration for query insights. Structure is documented below.
- Read
Pool InstanceConfig Read Pool Config Args - Read pool specific config. If the instance type is READ_POOL, this configuration must be provided. Structure is documented below.
- cluster String
- Identifies the alloydb cluster. Must be in the format 'projects/{project}/locations/{location}/clusters/{cluster_id}'
- instance
Id String - The ID of the alloydb instance.
- instance
Type String - annotations Map<String,String>
- Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels.
Note: This field is non-authoritative, and will only manage the annotations present in your configuration.
Please refer to the field
effective_annotations
for all of the annotations present on the resource. - availability
Type String - 'Availability type of an Instance. Defaults to REGIONAL for both primary and read instances.
Note that primary and read instances can have different availability types.
Only READ_POOL instance supports ZONAL type. Users can't specify the zone for READ_POOL instance.
Zone is automatically chosen from the list of zones in the region specified.
Read pool of size 1 can only have zonal availability. Read pools with node count of 2 or more
can have regional availability (nodes are present in 2 or more zones in a region).'
Possible values are:
AVAILABILITY_TYPE_UNSPECIFIED
,ZONAL
,REGIONAL
. - client
Connection InstanceConfig Client Connection Config - Client connection specific configurations. Structure is documented below.
- database
Flags Map<String,String> - Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.
- display
Name String - User-settable and human-readable display name for the Instance.
- gce
Zone String - The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.
- labels Map<String,String>
- User-defined labels for the alloydb instance.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - machine
Config InstanceMachine Config - Configurations for the machines that host the underlying database engine. Structure is documented below.
- network
Config InstanceNetwork Config - Instance level network configuration. Structure is documented below.
- psc
Instance InstanceConfig Psc Instance Config - Configuration for Private Service Connect (PSC) for the instance. Structure is documented below.
- query
Insights InstanceConfig Query Insights Config - Configuration for query insights. Structure is documented below.
- read
Pool InstanceConfig Read Pool Config - Read pool specific config. If the instance type is READ_POOL, this configuration must be provided. Structure is documented below.
- cluster string
- Identifies the alloydb cluster. Must be in the format 'projects/{project}/locations/{location}/clusters/{cluster_id}'
- instance
Id string - The ID of the alloydb instance.
- instance
Type string - annotations {[key: string]: string}
- Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels.
Note: This field is non-authoritative, and will only manage the annotations present in your configuration.
Please refer to the field
effective_annotations
for all of the annotations present on the resource. - availability
Type string - 'Availability type of an Instance. Defaults to REGIONAL for both primary and read instances.
Note that primary and read instances can have different availability types.
Only READ_POOL instance supports ZONAL type. Users can't specify the zone for READ_POOL instance.
Zone is automatically chosen from the list of zones in the region specified.
Read pool of size 1 can only have zonal availability. Read pools with node count of 2 or more
can have regional availability (nodes are present in 2 or more zones in a region).'
Possible values are:
AVAILABILITY_TYPE_UNSPECIFIED
,ZONAL
,REGIONAL
. - client
Connection InstanceConfig Client Connection Config - Client connection specific configurations. Structure is documented below.
- database
Flags {[key: string]: string} - Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.
- display
Name string - User-settable and human-readable display name for the Instance.
- gce
Zone string - The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.
- labels {[key: string]: string}
- User-defined labels for the alloydb instance.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - machine
Config InstanceMachine Config - Configurations for the machines that host the underlying database engine. Structure is documented below.
- network
Config InstanceNetwork Config - Instance level network configuration. Structure is documented below.
- psc
Instance InstanceConfig Psc Instance Config - Configuration for Private Service Connect (PSC) for the instance. Structure is documented below.
- query
Insights InstanceConfig Query Insights Config - Configuration for query insights. Structure is documented below.
- read
Pool InstanceConfig Read Pool Config - Read pool specific config. If the instance type is READ_POOL, this configuration must be provided. Structure is documented below.
- cluster str
- Identifies the alloydb cluster. Must be in the format 'projects/{project}/locations/{location}/clusters/{cluster_id}'
- instance_
id str - The ID of the alloydb instance.
- instance_
type str - annotations Mapping[str, str]
- Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels.
Note: This field is non-authoritative, and will only manage the annotations present in your configuration.
Please refer to the field
effective_annotations
for all of the annotations present on the resource. - availability_
type str - 'Availability type of an Instance. Defaults to REGIONAL for both primary and read instances.
Note that primary and read instances can have different availability types.
Only READ_POOL instance supports ZONAL type. Users can't specify the zone for READ_POOL instance.
Zone is automatically chosen from the list of zones in the region specified.
Read pool of size 1 can only have zonal availability. Read pools with node count of 2 or more
can have regional availability (nodes are present in 2 or more zones in a region).'
Possible values are:
AVAILABILITY_TYPE_UNSPECIFIED
,ZONAL
,REGIONAL
. - client_
connection_ Instanceconfig Client Connection Config Args - Client connection specific configurations. Structure is documented below.
- database_
flags Mapping[str, str] - Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.
- display_
name str - User-settable and human-readable display name for the Instance.
- gce_
zone str - The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.
- labels Mapping[str, str]
- User-defined labels for the alloydb instance.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - machine_
config InstanceMachine Config Args - Configurations for the machines that host the underlying database engine. Structure is documented below.
- network_
config InstanceNetwork Config Args - Instance level network configuration. Structure is documented below.
- psc_
instance_ Instanceconfig Psc Instance Config Args - Configuration for Private Service Connect (PSC) for the instance. Structure is documented below.
- query_
insights_ Instanceconfig Query Insights Config Args - Configuration for query insights. Structure is documented below.
- read_
pool_ Instanceconfig Read Pool Config Args - Read pool specific config. If the instance type is READ_POOL, this configuration must be provided. Structure is documented below.
- cluster String
- Identifies the alloydb cluster. Must be in the format 'projects/{project}/locations/{location}/clusters/{cluster_id}'
- instance
Id String - The ID of the alloydb instance.
- instance
Type String - annotations Map<String>
- Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels.
Note: This field is non-authoritative, and will only manage the annotations present in your configuration.
Please refer to the field
effective_annotations
for all of the annotations present on the resource. - availability
Type String - 'Availability type of an Instance. Defaults to REGIONAL for both primary and read instances.
Note that primary and read instances can have different availability types.
Only READ_POOL instance supports ZONAL type. Users can't specify the zone for READ_POOL instance.
Zone is automatically chosen from the list of zones in the region specified.
Read pool of size 1 can only have zonal availability. Read pools with node count of 2 or more
can have regional availability (nodes are present in 2 or more zones in a region).'
Possible values are:
AVAILABILITY_TYPE_UNSPECIFIED
,ZONAL
,REGIONAL
. - client
Connection Property MapConfig - Client connection specific configurations. Structure is documented below.
- database
Flags Map<String> - Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.
- display
Name String - User-settable and human-readable display name for the Instance.
- gce
Zone String - The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.
- labels Map<String>
- User-defined labels for the alloydb instance.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - machine
Config Property Map - Configurations for the machines that host the underlying database engine. Structure is documented below.
- network
Config Property Map - Instance level network configuration. Structure is documented below.
- psc
Instance Property MapConfig - Configuration for Private Service Connect (PSC) for the instance. Structure is documented below.
- query
Insights Property MapConfig - Configuration for query insights. Structure is documented below.
- read
Pool Property MapConfig - Read pool specific config. If the instance type is READ_POOL, this configuration must be provided. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Create
Time string - Time the Instance was created in UTC.
- Effective
Annotations Dictionary<string, string> - Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Address string - The IP address for the Instance. This is the connection endpoint for an end-user application.
- Name string
- The name of the instance resource.
- Public
Ip stringAddress - The public IP addresses for the Instance. This is available ONLY when networkConfig.enablePublicIp is set to true. This is the connection endpoint for an end-user application.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Reconciling bool
- Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
- State string
- The current state of the alloydb instance.
- Uid string
- The system-generated UID of the resource.
- Update
Time string - Time the Instance was updated in UTC.
- Create
Time string - Time the Instance was created in UTC.
- Effective
Annotations map[string]string - Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Address string - The IP address for the Instance. This is the connection endpoint for an end-user application.
- Name string
- The name of the instance resource.
- Public
Ip stringAddress - The public IP addresses for the Instance. This is available ONLY when networkConfig.enablePublicIp is set to true. This is the connection endpoint for an end-user application.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Reconciling bool
- Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
- State string
- The current state of the alloydb instance.
- Uid string
- The system-generated UID of the resource.
- Update
Time string - Time the Instance was updated in UTC.
- create
Time String - Time the Instance was created in UTC.
- effective
Annotations Map<String,String> - effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Address String - The IP address for the Instance. This is the connection endpoint for an end-user application.
- name String
- The name of the instance resource.
- public
Ip StringAddress - The public IP addresses for the Instance. This is available ONLY when networkConfig.enablePublicIp is set to true. This is the connection endpoint for an end-user application.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- reconciling Boolean
- Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
- state String
- The current state of the alloydb instance.
- uid String
- The system-generated UID of the resource.
- update
Time String - Time the Instance was updated in UTC.
- create
Time string - Time the Instance was created in UTC.
- effective
Annotations {[key: string]: string} - effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- ip
Address string - The IP address for the Instance. This is the connection endpoint for an end-user application.
- name string
- The name of the instance resource.
- public
Ip stringAddress - The public IP addresses for the Instance. This is available ONLY when networkConfig.enablePublicIp is set to true. This is the connection endpoint for an end-user application.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- reconciling boolean
- Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
- state string
- The current state of the alloydb instance.
- uid string
- The system-generated UID of the resource.
- update
Time string - Time the Instance was updated in UTC.
- create_
time str - Time the Instance was created in UTC.
- effective_
annotations Mapping[str, str] - effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- ip_
address str - The IP address for the Instance. This is the connection endpoint for an end-user application.
- name str
- The name of the instance resource.
- public_
ip_ straddress - The public IP addresses for the Instance. This is available ONLY when networkConfig.enablePublicIp is set to true. This is the connection endpoint for an end-user application.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- reconciling bool
- Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
- state str
- The current state of the alloydb instance.
- uid str
- The system-generated UID of the resource.
- update_
time str - Time the Instance was updated in UTC.
- create
Time String - Time the Instance was created in UTC.
- effective
Annotations Map<String> - effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Address String - The IP address for the Instance. This is the connection endpoint for an end-user application.
- name String
- The name of the instance resource.
- public
Ip StringAddress - The public IP addresses for the Instance. This is available ONLY when networkConfig.enablePublicIp is set to true. This is the connection endpoint for an end-user application.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- reconciling Boolean
- Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
- state String
- The current state of the alloydb instance.
- uid String
- The system-generated UID of the resource.
- update
Time String - Time the Instance was updated in UTC.
Look up Existing Instance Resource
Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
annotations: Optional[Mapping[str, str]] = None,
availability_type: Optional[str] = None,
client_connection_config: Optional[InstanceClientConnectionConfigArgs] = None,
cluster: Optional[str] = None,
create_time: Optional[str] = None,
database_flags: Optional[Mapping[str, str]] = None,
display_name: Optional[str] = None,
effective_annotations: Optional[Mapping[str, str]] = None,
effective_labels: Optional[Mapping[str, str]] = None,
gce_zone: Optional[str] = None,
instance_id: Optional[str] = None,
instance_type: Optional[str] = None,
ip_address: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
machine_config: Optional[InstanceMachineConfigArgs] = None,
name: Optional[str] = None,
network_config: Optional[InstanceNetworkConfigArgs] = None,
psc_instance_config: Optional[InstancePscInstanceConfigArgs] = None,
public_ip_address: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
query_insights_config: Optional[InstanceQueryInsightsConfigArgs] = None,
read_pool_config: Optional[InstanceReadPoolConfigArgs] = None,
reconciling: Optional[bool] = None,
state: Optional[str] = None,
uid: Optional[str] = None,
update_time: Optional[str] = None) -> Instance
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
public static Instance get(String name, Output<String> id, InstanceState 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.
- Annotations Dictionary<string, string>
- Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels.
Note: This field is non-authoritative, and will only manage the annotations present in your configuration.
Please refer to the field
effective_annotations
for all of the annotations present on the resource. - Availability
Type string - 'Availability type of an Instance. Defaults to REGIONAL for both primary and read instances.
Note that primary and read instances can have different availability types.
Only READ_POOL instance supports ZONAL type. Users can't specify the zone for READ_POOL instance.
Zone is automatically chosen from the list of zones in the region specified.
Read pool of size 1 can only have zonal availability. Read pools with node count of 2 or more
can have regional availability (nodes are present in 2 or more zones in a region).'
Possible values are:
AVAILABILITY_TYPE_UNSPECIFIED
,ZONAL
,REGIONAL
. - Client
Connection InstanceConfig Client Connection Config - Client connection specific configurations. Structure is documented below.
- Cluster string
- Identifies the alloydb cluster. Must be in the format 'projects/{project}/locations/{location}/clusters/{cluster_id}'
- Create
Time string - Time the Instance was created in UTC.
- Database
Flags Dictionary<string, string> - Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.
- Display
Name string - User-settable and human-readable display name for the Instance.
- Effective
Annotations Dictionary<string, string> - Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Gce
Zone string - The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.
- Instance
Id string - The ID of the alloydb instance.
- Instance
Type string - Ip
Address string - The IP address for the Instance. This is the connection endpoint for an end-user application.
- Labels Dictionary<string, string>
- User-defined labels for the alloydb instance.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - Machine
Config InstanceMachine Config - Configurations for the machines that host the underlying database engine. Structure is documented below.
- Name string
- The name of the instance resource.
- Network
Config InstanceNetwork Config - Instance level network configuration. Structure is documented below.
- Psc
Instance InstanceConfig Psc Instance Config - Configuration for Private Service Connect (PSC) for the instance. Structure is documented below.
- Public
Ip stringAddress - The public IP addresses for the Instance. This is available ONLY when networkConfig.enablePublicIp is set to true. This is the connection endpoint for an end-user application.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Query
Insights InstanceConfig Query Insights Config - Configuration for query insights. Structure is documented below.
- Read
Pool InstanceConfig Read Pool Config - Read pool specific config. If the instance type is READ_POOL, this configuration must be provided. Structure is documented below.
- Reconciling bool
- Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
- State string
- The current state of the alloydb instance.
- Uid string
- The system-generated UID of the resource.
- Update
Time string - Time the Instance was updated in UTC.
- Annotations map[string]string
- Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels.
Note: This field is non-authoritative, and will only manage the annotations present in your configuration.
Please refer to the field
effective_annotations
for all of the annotations present on the resource. - Availability
Type string - 'Availability type of an Instance. Defaults to REGIONAL for both primary and read instances.
Note that primary and read instances can have different availability types.
Only READ_POOL instance supports ZONAL type. Users can't specify the zone for READ_POOL instance.
Zone is automatically chosen from the list of zones in the region specified.
Read pool of size 1 can only have zonal availability. Read pools with node count of 2 or more
can have regional availability (nodes are present in 2 or more zones in a region).'
Possible values are:
AVAILABILITY_TYPE_UNSPECIFIED
,ZONAL
,REGIONAL
. - Client
Connection InstanceConfig Client Connection Config Args - Client connection specific configurations. Structure is documented below.
- Cluster string
- Identifies the alloydb cluster. Must be in the format 'projects/{project}/locations/{location}/clusters/{cluster_id}'
- Create
Time string - Time the Instance was created in UTC.
- Database
Flags map[string]string - Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.
- Display
Name string - User-settable and human-readable display name for the Instance.
- Effective
Annotations map[string]string - Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Gce
Zone string - The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.
- Instance
Id string - The ID of the alloydb instance.
- Instance
Type string - Ip
Address string - The IP address for the Instance. This is the connection endpoint for an end-user application.
- Labels map[string]string
- User-defined labels for the alloydb instance.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - Machine
Config InstanceMachine Config Args - Configurations for the machines that host the underlying database engine. Structure is documented below.
- Name string
- The name of the instance resource.
- Network
Config InstanceNetwork Config Args - Instance level network configuration. Structure is documented below.
- Psc
Instance InstanceConfig Psc Instance Config Args - Configuration for Private Service Connect (PSC) for the instance. Structure is documented below.
- Public
Ip stringAddress - The public IP addresses for the Instance. This is available ONLY when networkConfig.enablePublicIp is set to true. This is the connection endpoint for an end-user application.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Query
Insights InstanceConfig Query Insights Config Args - Configuration for query insights. Structure is documented below.
- Read
Pool InstanceConfig Read Pool Config Args - Read pool specific config. If the instance type is READ_POOL, this configuration must be provided. Structure is documented below.
- Reconciling bool
- Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
- State string
- The current state of the alloydb instance.
- Uid string
- The system-generated UID of the resource.
- Update
Time string - Time the Instance was updated in UTC.
- annotations Map<String,String>
- Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels.
Note: This field is non-authoritative, and will only manage the annotations present in your configuration.
Please refer to the field
effective_annotations
for all of the annotations present on the resource. - availability
Type String - 'Availability type of an Instance. Defaults to REGIONAL for both primary and read instances.
Note that primary and read instances can have different availability types.
Only READ_POOL instance supports ZONAL type. Users can't specify the zone for READ_POOL instance.
Zone is automatically chosen from the list of zones in the region specified.
Read pool of size 1 can only have zonal availability. Read pools with node count of 2 or more
can have regional availability (nodes are present in 2 or more zones in a region).'
Possible values are:
AVAILABILITY_TYPE_UNSPECIFIED
,ZONAL
,REGIONAL
. - client
Connection InstanceConfig Client Connection Config - Client connection specific configurations. Structure is documented below.
- cluster String
- Identifies the alloydb cluster. Must be in the format 'projects/{project}/locations/{location}/clusters/{cluster_id}'
- create
Time String - Time the Instance was created in UTC.
- database
Flags Map<String,String> - Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.
- display
Name String - User-settable and human-readable display name for the Instance.
- effective
Annotations Map<String,String> - effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- gce
Zone String - The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.
- instance
Id String - The ID of the alloydb instance.
- instance
Type String - ip
Address String - The IP address for the Instance. This is the connection endpoint for an end-user application.
- labels Map<String,String>
- User-defined labels for the alloydb instance.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - machine
Config InstanceMachine Config - Configurations for the machines that host the underlying database engine. Structure is documented below.
- name String
- The name of the instance resource.
- network
Config InstanceNetwork Config - Instance level network configuration. Structure is documented below.
- psc
Instance InstanceConfig Psc Instance Config - Configuration for Private Service Connect (PSC) for the instance. Structure is documented below.
- public
Ip StringAddress - The public IP addresses for the Instance. This is available ONLY when networkConfig.enablePublicIp is set to true. This is the connection endpoint for an end-user application.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- query
Insights InstanceConfig Query Insights Config - Configuration for query insights. Structure is documented below.
- read
Pool InstanceConfig Read Pool Config - Read pool specific config. If the instance type is READ_POOL, this configuration must be provided. Structure is documented below.
- reconciling Boolean
- Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
- state String
- The current state of the alloydb instance.
- uid String
- The system-generated UID of the resource.
- update
Time String - Time the Instance was updated in UTC.
- annotations {[key: string]: string}
- Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels.
Note: This field is non-authoritative, and will only manage the annotations present in your configuration.
Please refer to the field
effective_annotations
for all of the annotations present on the resource. - availability
Type string - 'Availability type of an Instance. Defaults to REGIONAL for both primary and read instances.
Note that primary and read instances can have different availability types.
Only READ_POOL instance supports ZONAL type. Users can't specify the zone for READ_POOL instance.
Zone is automatically chosen from the list of zones in the region specified.
Read pool of size 1 can only have zonal availability. Read pools with node count of 2 or more
can have regional availability (nodes are present in 2 or more zones in a region).'
Possible values are:
AVAILABILITY_TYPE_UNSPECIFIED
,ZONAL
,REGIONAL
. - client
Connection InstanceConfig Client Connection Config - Client connection specific configurations. Structure is documented below.
- cluster string
- Identifies the alloydb cluster. Must be in the format 'projects/{project}/locations/{location}/clusters/{cluster_id}'
- create
Time string - Time the Instance was created in UTC.
- database
Flags {[key: string]: string} - Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.
- display
Name string - User-settable and human-readable display name for the Instance.
- effective
Annotations {[key: string]: string} - effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- gce
Zone string - The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.
- instance
Id string - The ID of the alloydb instance.
- instance
Type string - ip
Address string - The IP address for the Instance. This is the connection endpoint for an end-user application.
- labels {[key: string]: string}
- User-defined labels for the alloydb instance.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - machine
Config InstanceMachine Config - Configurations for the machines that host the underlying database engine. Structure is documented below.
- name string
- The name of the instance resource.
- network
Config InstanceNetwork Config - Instance level network configuration. Structure is documented below.
- psc
Instance InstanceConfig Psc Instance Config - Configuration for Private Service Connect (PSC) for the instance. Structure is documented below.
- public
Ip stringAddress - The public IP addresses for the Instance. This is available ONLY when networkConfig.enablePublicIp is set to true. This is the connection endpoint for an end-user application.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- query
Insights InstanceConfig Query Insights Config - Configuration for query insights. Structure is documented below.
- read
Pool InstanceConfig Read Pool Config - Read pool specific config. If the instance type is READ_POOL, this configuration must be provided. Structure is documented below.
- reconciling boolean
- Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
- state string
- The current state of the alloydb instance.
- uid string
- The system-generated UID of the resource.
- update
Time string - Time the Instance was updated in UTC.
- annotations Mapping[str, str]
- Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels.
Note: This field is non-authoritative, and will only manage the annotations present in your configuration.
Please refer to the field
effective_annotations
for all of the annotations present on the resource. - availability_
type str - 'Availability type of an Instance. Defaults to REGIONAL for both primary and read instances.
Note that primary and read instances can have different availability types.
Only READ_POOL instance supports ZONAL type. Users can't specify the zone for READ_POOL instance.
Zone is automatically chosen from the list of zones in the region specified.
Read pool of size 1 can only have zonal availability. Read pools with node count of 2 or more
can have regional availability (nodes are present in 2 or more zones in a region).'
Possible values are:
AVAILABILITY_TYPE_UNSPECIFIED
,ZONAL
,REGIONAL
. - client_
connection_ Instanceconfig Client Connection Config Args - Client connection specific configurations. Structure is documented below.
- cluster str
- Identifies the alloydb cluster. Must be in the format 'projects/{project}/locations/{location}/clusters/{cluster_id}'
- create_
time str - Time the Instance was created in UTC.
- database_
flags Mapping[str, str] - Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.
- display_
name str - User-settable and human-readable display name for the Instance.
- effective_
annotations Mapping[str, str] - effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- gce_
zone str - The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.
- instance_
id str - The ID of the alloydb instance.
- instance_
type str - ip_
address str - The IP address for the Instance. This is the connection endpoint for an end-user application.
- labels Mapping[str, str]
- User-defined labels for the alloydb instance.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - machine_
config InstanceMachine Config Args - Configurations for the machines that host the underlying database engine. Structure is documented below.
- name str
- The name of the instance resource.
- network_
config InstanceNetwork Config Args - Instance level network configuration. Structure is documented below.
- psc_
instance_ Instanceconfig Psc Instance Config Args - Configuration for Private Service Connect (PSC) for the instance. Structure is documented below.
- public_
ip_ straddress - The public IP addresses for the Instance. This is available ONLY when networkConfig.enablePublicIp is set to true. This is the connection endpoint for an end-user application.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- query_
insights_ Instanceconfig Query Insights Config Args - Configuration for query insights. Structure is documented below.
- read_
pool_ Instanceconfig Read Pool Config Args - Read pool specific config. If the instance type is READ_POOL, this configuration must be provided. Structure is documented below.
- reconciling bool
- Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
- state str
- The current state of the alloydb instance.
- uid str
- The system-generated UID of the resource.
- update_
time str - Time the Instance was updated in UTC.
- annotations Map<String>
- Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels.
Note: This field is non-authoritative, and will only manage the annotations present in your configuration.
Please refer to the field
effective_annotations
for all of the annotations present on the resource. - availability
Type String - 'Availability type of an Instance. Defaults to REGIONAL for both primary and read instances.
Note that primary and read instances can have different availability types.
Only READ_POOL instance supports ZONAL type. Users can't specify the zone for READ_POOL instance.
Zone is automatically chosen from the list of zones in the region specified.
Read pool of size 1 can only have zonal availability. Read pools with node count of 2 or more
can have regional availability (nodes are present in 2 or more zones in a region).'
Possible values are:
AVAILABILITY_TYPE_UNSPECIFIED
,ZONAL
,REGIONAL
. - client
Connection Property MapConfig - Client connection specific configurations. Structure is documented below.
- cluster String
- Identifies the alloydb cluster. Must be in the format 'projects/{project}/locations/{location}/clusters/{cluster_id}'
- create
Time String - Time the Instance was created in UTC.
- database
Flags Map<String> - Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary.
- display
Name String - User-settable and human-readable display name for the Instance.
- effective
Annotations Map<String> - effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- gce
Zone String - The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.
- instance
Id String - The ID of the alloydb instance.
- instance
Type String - ip
Address String - The IP address for the Instance. This is the connection endpoint for an end-user application.
- labels Map<String>
- User-defined labels for the alloydb instance.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effective_labels
for all of the labels present on the resource. - machine
Config Property Map - Configurations for the machines that host the underlying database engine. Structure is documented below.
- name String
- The name of the instance resource.
- network
Config Property Map - Instance level network configuration. Structure is documented below.
- psc
Instance Property MapConfig - Configuration for Private Service Connect (PSC) for the instance. Structure is documented below.
- public
Ip StringAddress - The public IP addresses for the Instance. This is available ONLY when networkConfig.enablePublicIp is set to true. This is the connection endpoint for an end-user application.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- query
Insights Property MapConfig - Configuration for query insights. Structure is documented below.
- read
Pool Property MapConfig - Read pool specific config. If the instance type is READ_POOL, this configuration must be provided. Structure is documented below.
- reconciling Boolean
- Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
- state String
- The current state of the alloydb instance.
- uid String
- The system-generated UID of the resource.
- update
Time String - Time the Instance was updated in UTC.
Supporting Types
InstanceClientConnectionConfig, InstanceClientConnectionConfigArgs
- Require
Connectors bool - Configuration to enforce connectors only (ex: AuthProxy) connections to the database.
- Ssl
Config InstanceClient Connection Config Ssl Config - SSL config option for this instance. Structure is documented below.
- Require
Connectors bool - Configuration to enforce connectors only (ex: AuthProxy) connections to the database.
- Ssl
Config InstanceClient Connection Config Ssl Config - SSL config option for this instance. Structure is documented below.
- require
Connectors Boolean - Configuration to enforce connectors only (ex: AuthProxy) connections to the database.
- ssl
Config InstanceClient Connection Config Ssl Config - SSL config option for this instance. Structure is documented below.
- require
Connectors boolean - Configuration to enforce connectors only (ex: AuthProxy) connections to the database.
- ssl
Config InstanceClient Connection Config Ssl Config - SSL config option for this instance. Structure is documented below.
- require_
connectors bool - Configuration to enforce connectors only (ex: AuthProxy) connections to the database.
- ssl_
config InstanceClient Connection Config Ssl Config - SSL config option for this instance. Structure is documented below.
- require
Connectors Boolean - Configuration to enforce connectors only (ex: AuthProxy) connections to the database.
- ssl
Config Property Map - SSL config option for this instance. Structure is documented below.
InstanceClientConnectionConfigSslConfig, InstanceClientConnectionConfigSslConfigArgs
- Ssl
Mode string - SSL mode. Specifies client-server SSL/TLS connection behavior.
Possible values are:
ENCRYPTED_ONLY
,ALLOW_UNENCRYPTED_AND_ENCRYPTED
.
- Ssl
Mode string - SSL mode. Specifies client-server SSL/TLS connection behavior.
Possible values are:
ENCRYPTED_ONLY
,ALLOW_UNENCRYPTED_AND_ENCRYPTED
.
- ssl
Mode String - SSL mode. Specifies client-server SSL/TLS connection behavior.
Possible values are:
ENCRYPTED_ONLY
,ALLOW_UNENCRYPTED_AND_ENCRYPTED
.
- ssl
Mode string - SSL mode. Specifies client-server SSL/TLS connection behavior.
Possible values are:
ENCRYPTED_ONLY
,ALLOW_UNENCRYPTED_AND_ENCRYPTED
.
- ssl_
mode str - SSL mode. Specifies client-server SSL/TLS connection behavior.
Possible values are:
ENCRYPTED_ONLY
,ALLOW_UNENCRYPTED_AND_ENCRYPTED
.
- ssl
Mode String - SSL mode. Specifies client-server SSL/TLS connection behavior.
Possible values are:
ENCRYPTED_ONLY
,ALLOW_UNENCRYPTED_AND_ENCRYPTED
.
InstanceMachineConfig, InstanceMachineConfigArgs
- Cpu
Count int - The number of CPU's in the VM instance.
- Cpu
Count int - The number of CPU's in the VM instance.
- cpu
Count Integer - The number of CPU's in the VM instance.
- cpu
Count number - The number of CPU's in the VM instance.
- cpu_
count int - The number of CPU's in the VM instance.
- cpu
Count Number - The number of CPU's in the VM instance.
InstanceNetworkConfig, InstanceNetworkConfigArgs
- List<Instance
Network Config Authorized External Network> - A list of external networks authorized to access this instance. This
field is only allowed to be set when
enable_public_ip
is set to true. Structure is documented below. - Enable
Public boolIp - Enabling public ip for the instance. If a user wishes to disable this, please also clear the list of the authorized external networks set on the same instance.
- []Instance
Network Config Authorized External Network - A list of external networks authorized to access this instance. This
field is only allowed to be set when
enable_public_ip
is set to true. Structure is documented below. - Enable
Public boolIp - Enabling public ip for the instance. If a user wishes to disable this, please also clear the list of the authorized external networks set on the same instance.
- List<Instance
Network Config Authorized External Network> - A list of external networks authorized to access this instance. This
field is only allowed to be set when
enable_public_ip
is set to true. Structure is documented below. - enable
Public BooleanIp - Enabling public ip for the instance. If a user wishes to disable this, please also clear the list of the authorized external networks set on the same instance.
- Instance
Network Config Authorized External Network[] - A list of external networks authorized to access this instance. This
field is only allowed to be set when
enable_public_ip
is set to true. Structure is documented below. - enable
Public booleanIp - Enabling public ip for the instance. If a user wishes to disable this, please also clear the list of the authorized external networks set on the same instance.
- Sequence[Instance
Network Config Authorized External Network] - A list of external networks authorized to access this instance. This
field is only allowed to be set when
enable_public_ip
is set to true. Structure is documented below. - enable_
public_ boolip - Enabling public ip for the instance. If a user wishes to disable this, please also clear the list of the authorized external networks set on the same instance.
- List<Property Map>
- A list of external networks authorized to access this instance. This
field is only allowed to be set when
enable_public_ip
is set to true. Structure is documented below. - enable
Public BooleanIp - Enabling public ip for the instance. If a user wishes to disable this, please also clear the list of the authorized external networks set on the same instance.
InstanceNetworkConfigAuthorizedExternalNetwork, InstanceNetworkConfigAuthorizedExternalNetworkArgs
- Cidr
Range string - CIDR range for one authorized network of the instance.
- Cidr
Range string - CIDR range for one authorized network of the instance.
- cidr
Range String - CIDR range for one authorized network of the instance.
- cidr
Range string - CIDR range for one authorized network of the instance.
- cidr_
range str - CIDR range for one authorized network of the instance.
- cidr
Range String - CIDR range for one authorized network of the instance.
InstancePscInstanceConfig, InstancePscInstanceConfigArgs
- Allowed
Consumer List<string>Projects - List of consumer projects that are allowed to create PSC endpoints to service-attachments to this instance. These should be specified as project numbers only.
- Psc
Dns stringName - (Output) The DNS name of the instance for PSC connectivity. Name convention: ...alloydb-psc.goog
- Service
Attachment stringLink - (Output)
The service attachment created when Private Service Connect (PSC) is enabled for the instance.
The name of the resource will be in the format of
projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>
- Allowed
Consumer []stringProjects - List of consumer projects that are allowed to create PSC endpoints to service-attachments to this instance. These should be specified as project numbers only.
- Psc
Dns stringName - (Output) The DNS name of the instance for PSC connectivity. Name convention: ...alloydb-psc.goog
- Service
Attachment stringLink - (Output)
The service attachment created when Private Service Connect (PSC) is enabled for the instance.
The name of the resource will be in the format of
projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>
- allowed
Consumer List<String>Projects - List of consumer projects that are allowed to create PSC endpoints to service-attachments to this instance. These should be specified as project numbers only.
- psc
Dns StringName - (Output) The DNS name of the instance for PSC connectivity. Name convention: ...alloydb-psc.goog
- service
Attachment StringLink - (Output)
The service attachment created when Private Service Connect (PSC) is enabled for the instance.
The name of the resource will be in the format of
projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>
- allowed
Consumer string[]Projects - List of consumer projects that are allowed to create PSC endpoints to service-attachments to this instance. These should be specified as project numbers only.
- psc
Dns stringName - (Output) The DNS name of the instance for PSC connectivity. Name convention: ...alloydb-psc.goog
- service
Attachment stringLink - (Output)
The service attachment created when Private Service Connect (PSC) is enabled for the instance.
The name of the resource will be in the format of
projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>
- allowed_
consumer_ Sequence[str]projects - List of consumer projects that are allowed to create PSC endpoints to service-attachments to this instance. These should be specified as project numbers only.
- psc_
dns_ strname - (Output) The DNS name of the instance for PSC connectivity. Name convention: ...alloydb-psc.goog
- service_
attachment_ strlink - (Output)
The service attachment created when Private Service Connect (PSC) is enabled for the instance.
The name of the resource will be in the format of
projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>
- allowed
Consumer List<String>Projects - List of consumer projects that are allowed to create PSC endpoints to service-attachments to this instance. These should be specified as project numbers only.
- psc
Dns StringName - (Output) The DNS name of the instance for PSC connectivity. Name convention: ...alloydb-psc.goog
- service
Attachment StringLink - (Output)
The service attachment created when Private Service Connect (PSC) is enabled for the instance.
The name of the resource will be in the format of
projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>
InstanceQueryInsightsConfig, InstanceQueryInsightsConfigArgs
- Query
Plans intPer Minute - Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 20 is considered valid.
- Query
String intLength - Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.
- bool
- Record application tags for an instance. This flag is turned "on" by default.
- Record
Client boolAddress - Record client address for an instance. Client address is PII information. This flag is turned "on" by default.
- Query
Plans intPer Minute - Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 20 is considered valid.
- Query
String intLength - Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.
- bool
- Record application tags for an instance. This flag is turned "on" by default.
- Record
Client boolAddress - Record client address for an instance. Client address is PII information. This flag is turned "on" by default.
- query
Plans IntegerPer Minute - Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 20 is considered valid.
- query
String IntegerLength - Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.
- Boolean
- Record application tags for an instance. This flag is turned "on" by default.
- record
Client BooleanAddress - Record client address for an instance. Client address is PII information. This flag is turned "on" by default.
- query
Plans numberPer Minute - Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 20 is considered valid.
- query
String numberLength - Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.
- boolean
- Record application tags for an instance. This flag is turned "on" by default.
- record
Client booleanAddress - Record client address for an instance. Client address is PII information. This flag is turned "on" by default.
- query_
plans_ intper_ minute - Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 20 is considered valid.
- query_
string_ intlength - Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.
- bool
- Record application tags for an instance. This flag is turned "on" by default.
- record_
client_ booladdress - Record client address for an instance. Client address is PII information. This flag is turned "on" by default.
- query
Plans NumberPer Minute - Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 20 is considered valid.
- query
String NumberLength - Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.
- Boolean
- Record application tags for an instance. This flag is turned "on" by default.
- record
Client BooleanAddress - Record client address for an instance. Client address is PII information. This flag is turned "on" by default.
InstanceReadPoolConfig, InstanceReadPoolConfigArgs
- Node
Count int - Read capacity, i.e. number of nodes in a read pool instance.
- Node
Count int - Read capacity, i.e. number of nodes in a read pool instance.
- node
Count Integer - Read capacity, i.e. number of nodes in a read pool instance.
- node
Count number - Read capacity, i.e. number of nodes in a read pool instance.
- node_
count int - Read capacity, i.e. number of nodes in a read pool instance.
- node
Count Number - Read capacity, i.e. number of nodes in a read pool instance.
Import
Instance can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/instances/{{instance_id}}
{{project}}/{{location}}/{{cluster}}/{{instance_id}}
{{location}}/{{cluster}}/{{instance_id}}
When using the pulumi import
command, Instance can be imported using one of the formats above. For example:
$ pulumi import gcp:alloydb/instance:Instance default projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/instances/{{instance_id}}
$ pulumi import gcp:alloydb/instance:Instance default {{project}}/{{location}}/{{cluster}}/{{instance_id}}
$ pulumi import gcp:alloydb/instance:Instance default {{location}}/{{cluster}}/{{instance_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.