1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. alloydb
  5. Instance
Google Cloud Classic v7.19.0 published on Thursday, Apr 18, 2024 by Pulumi

gcp.alloydb.Instance

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.19.0 published on Thursday, Apr 18, 2024 by Pulumi

    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",
        network: defaultNetwork.id,
        initialUser: {
            password: "alloydb-cluster",
        },
    });
    const _default = new gcp.alloydb.Instance("default", {
        cluster: defaultCluster.name,
        instanceId: "alloydb-instance",
        instanceType: "PRIMARY",
        machineConfig: {
            cpuCount: 2,
        },
    });
    const project = gcp.organizations.getProject({});
    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],
    });
    
    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=default_network.id,
        initial_user=gcp.alloydb.ClusterInitialUserArgs(
            password="alloydb-cluster",
        ))
    default = gcp.alloydb.Instance("default",
        cluster=default_cluster.name,
        instance_id="alloydb-instance",
        instance_type="PRIMARY",
        machine_config=gcp.alloydb.InstanceMachineConfigArgs(
            cpu_count=2,
        ))
    project = gcp.organizations.get_project()
    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])
    
    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"),
    			Network:   defaultNetwork.ID(),
    			InitialUser: &alloydb.ClusterInitialUserArgs{
    				Password: pulumi.String("alloydb-cluster"),
    			},
    		})
    		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),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = organizations.LookupProject(ctx, nil, nil)
    		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
    		}
    		_, 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
    		}
    		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",
            Network = defaultNetwork.Id,
            InitialUser = new Gcp.Alloydb.Inputs.ClusterInitialUserArgs
            {
                Password = "alloydb-cluster",
            },
        });
    
        var @default = new Gcp.Alloydb.Instance("default", new()
        {
            Cluster = defaultCluster.Name,
            InstanceId = "alloydb-instance",
            InstanceType = "PRIMARY",
            MachineConfig = new Gcp.Alloydb.Inputs.InstanceMachineConfigArgs
            {
                CpuCount = 2,
            },
        });
    
        var project = Gcp.Organizations.GetProject.Invoke();
    
        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,
            },
        });
    
    });
    
    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.ClusterInitialUserArgs;
    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.gcp.compute.GlobalAddress;
    import com.pulumi.gcp.compute.GlobalAddressArgs;
    import com.pulumi.gcp.servicenetworking.Connection;
    import com.pulumi.gcp.servicenetworking.ConnectionArgs;
    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")
                .network(defaultNetwork.id())
                .initialUser(ClusterInitialUserArgs.builder()
                    .password("alloydb-cluster")
                    .build())
                .build());
    
            var default_ = new Instance("default", InstanceArgs.builder()        
                .cluster(defaultCluster.name())
                .instanceId("alloydb-instance")
                .instanceType("PRIMARY")
                .machineConfig(InstanceMachineConfigArgs.builder()
                    .cpuCount(2)
                    .build())
                .build());
    
            final var project = OrganizationsFunctions.getProject();
    
            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());
    
        }
    }
    
    resources:
      default:
        type: gcp:alloydb:Instance
        properties:
          cluster: ${defaultCluster.name}
          instanceId: alloydb-instance
          instanceType: PRIMARY
          machineConfig:
            cpuCount: 2
      defaultCluster:
        type: gcp:alloydb:Cluster
        name: default
        properties:
          clusterId: alloydb-cluster
          location: us-central1
          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 primaryInstance = new gcp.alloydb.Instance("primary", {
        cluster: primary.name,
        instanceId: "alloydb-primary-instance",
        instanceType: "PRIMARY",
        machineConfig: {
            cpuCount: 2,
        },
    });
    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",
    });
    const secondaryInstance = new gcp.alloydb.Instance("secondary", {
        cluster: secondary.name,
        instanceId: "alloydb-secondary-instance",
        instanceType: secondary.clusterType,
        machineConfig: {
            cpuCount: 2,
        },
    });
    const project = gcp.organizations.getProject({});
    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],
    });
    
    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)
    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,
        ))
    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")
    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,
        ))
    project = gcp.organizations.get_project()
    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])
    
    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
    		}
    		_, 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),
    			},
    		})
    		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"),
    		})
    		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),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = organizations.LookupProject(ctx, nil, nil)
    		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
    		}
    		_, 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
    		}
    		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 primaryInstance = new Gcp.Alloydb.Instance("primary", new()
        {
            Cluster = primary.Name,
            InstanceId = "alloydb-primary-instance",
            InstanceType = "PRIMARY",
            MachineConfig = new Gcp.Alloydb.Inputs.InstanceMachineConfigArgs
            {
                CpuCount = 2,
            },
        });
    
        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",
        });
    
        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,
            },
        });
    
        var project = Gcp.Organizations.GetProject.Invoke();
    
        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,
            },
        });
    
    });
    
    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.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.gcp.compute.GlobalAddress;
    import com.pulumi.gcp.compute.GlobalAddressArgs;
    import com.pulumi.gcp.servicenetworking.Connection;
    import com.pulumi.gcp.servicenetworking.ConnectionArgs;
    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 primaryInstance = new Instance("primaryInstance", InstanceArgs.builder()        
                .cluster(primary.name())
                .instanceId("alloydb-primary-instance")
                .instanceType("PRIMARY")
                .machineConfig(InstanceMachineConfigArgs.builder()
                    .cpuCount(2)
                    .build())
                .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());
    
            var secondaryInstance = new Instance("secondaryInstance", InstanceArgs.builder()        
                .cluster(secondary.name())
                .instanceId("alloydb-secondary-instance")
                .instanceType(secondary.clusterType())
                .machineConfig(InstanceMachineConfigArgs.builder()
                    .cpuCount(2)
                    .build())
                .build());
    
            final var project = OrganizationsFunctions.getProject();
    
            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());
    
        }
    }
    
    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
      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
      secondaryInstance:
        type: gcp:alloydb:Instance
        name: secondary
        properties:
          cluster: ${secondary.name}
          instanceId: alloydb-secondary-instance
          instanceType: ${secondary.clusterType}
          machineConfig:
            cpuCount: 2
      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,
                 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.

    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,
        },
        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),
    	},
    	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())
        .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,
        ),
        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,
        },
        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
        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}'
    InstanceId string
    The ID of the alloydb instance.


    InstanceType string
    The type of the instance. If the instance type is READ_POOL, provide the associated PRIMARY/SECONDARY instance in the 'depends_on' meta-data attribute. If the instance type is SECONDARY, point to the cluster_type of the associated secondary cluster instead of mentioning SECONDARY. Example: {instance_type = google_alloydb_cluster.<secondary_cluster_name>.cluster_type} instead of {instance_type = SECONDARY} If the instance type is SECONDARY, the terraform delete instance operation does not delete the secondary instance but abandons it instead. Use deletion_policy = "FORCE" in the associated secondary cluster and delete the cluster forcefully to delete the secondary cluster as well its associated secondary instance. Users can undo the delete secondary instance action by importing the deleted secondary instance by calling terraform import. Possible values: ["PRIMARY", "READ_POOL", "SECONDARY"]
    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.
    AvailabilityType 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.
    ClientConnectionConfig InstanceClientConnectionConfig
    Client connection specific configurations. Structure is documented below.
    DatabaseFlags 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.
    DisplayName string
    User-settable and human-readable display name for the Instance.
    GceZone 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.
    MachineConfig InstanceMachineConfig
    Configurations for the machines that host the underlying database engine. Structure is documented below.
    QueryInsightsConfig InstanceQueryInsightsConfig
    Configuration for query insights. Structure is documented below.
    ReadPoolConfig InstanceReadPoolConfig
    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}'
    InstanceId string
    The ID of the alloydb instance.


    InstanceType string
    The type of the instance. If the instance type is READ_POOL, provide the associated PRIMARY/SECONDARY instance in the 'depends_on' meta-data attribute. If the instance type is SECONDARY, point to the cluster_type of the associated secondary cluster instead of mentioning SECONDARY. Example: {instance_type = google_alloydb_cluster.<secondary_cluster_name>.cluster_type} instead of {instance_type = SECONDARY} If the instance type is SECONDARY, the terraform delete instance operation does not delete the secondary instance but abandons it instead. Use deletion_policy = "FORCE" in the associated secondary cluster and delete the cluster forcefully to delete the secondary cluster as well its associated secondary instance. Users can undo the delete secondary instance action by importing the deleted secondary instance by calling terraform import. Possible values: ["PRIMARY", "READ_POOL", "SECONDARY"]
    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.
    AvailabilityType 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.
    ClientConnectionConfig InstanceClientConnectionConfigArgs
    Client connection specific configurations. Structure is documented below.
    DatabaseFlags 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.
    DisplayName string
    User-settable and human-readable display name for the Instance.
    GceZone 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.
    MachineConfig InstanceMachineConfigArgs
    Configurations for the machines that host the underlying database engine. Structure is documented below.
    QueryInsightsConfig InstanceQueryInsightsConfigArgs
    Configuration for query insights. Structure is documented below.
    ReadPoolConfig InstanceReadPoolConfigArgs
    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}'
    instanceId String
    The ID of the alloydb instance.


    instanceType String
    The type of the instance. If the instance type is READ_POOL, provide the associated PRIMARY/SECONDARY instance in the 'depends_on' meta-data attribute. If the instance type is SECONDARY, point to the cluster_type of the associated secondary cluster instead of mentioning SECONDARY. Example: {instance_type = google_alloydb_cluster.<secondary_cluster_name>.cluster_type} instead of {instance_type = SECONDARY} If the instance type is SECONDARY, the terraform delete instance operation does not delete the secondary instance but abandons it instead. Use deletion_policy = "FORCE" in the associated secondary cluster and delete the cluster forcefully to delete the secondary cluster as well its associated secondary instance. Users can undo the delete secondary instance action by importing the deleted secondary instance by calling terraform import. Possible values: ["PRIMARY", "READ_POOL", "SECONDARY"]
    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.
    availabilityType 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.
    clientConnectionConfig InstanceClientConnectionConfig
    Client connection specific configurations. Structure is documented below.
    databaseFlags 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.
    displayName String
    User-settable and human-readable display name for the Instance.
    gceZone 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.
    machineConfig InstanceMachineConfig
    Configurations for the machines that host the underlying database engine. Structure is documented below.
    queryInsightsConfig InstanceQueryInsightsConfig
    Configuration for query insights. Structure is documented below.
    readPoolConfig InstanceReadPoolConfig
    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}'
    instanceId string
    The ID of the alloydb instance.


    instanceType string
    The type of the instance. If the instance type is READ_POOL, provide the associated PRIMARY/SECONDARY instance in the 'depends_on' meta-data attribute. If the instance type is SECONDARY, point to the cluster_type of the associated secondary cluster instead of mentioning SECONDARY. Example: {instance_type = google_alloydb_cluster.<secondary_cluster_name>.cluster_type} instead of {instance_type = SECONDARY} If the instance type is SECONDARY, the terraform delete instance operation does not delete the secondary instance but abandons it instead. Use deletion_policy = "FORCE" in the associated secondary cluster and delete the cluster forcefully to delete the secondary cluster as well its associated secondary instance. Users can undo the delete secondary instance action by importing the deleted secondary instance by calling terraform import. Possible values: ["PRIMARY", "READ_POOL", "SECONDARY"]
    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.
    availabilityType 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.
    clientConnectionConfig InstanceClientConnectionConfig
    Client connection specific configurations. Structure is documented below.
    databaseFlags {[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.
    displayName string
    User-settable and human-readable display name for the Instance.
    gceZone 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.
    machineConfig InstanceMachineConfig
    Configurations for the machines that host the underlying database engine. Structure is documented below.
    queryInsightsConfig InstanceQueryInsightsConfig
    Configuration for query insights. Structure is documented below.
    readPoolConfig InstanceReadPoolConfig
    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
    The type of the instance. If the instance type is READ_POOL, provide the associated PRIMARY/SECONDARY instance in the 'depends_on' meta-data attribute. If the instance type is SECONDARY, point to the cluster_type of the associated secondary cluster instead of mentioning SECONDARY. Example: {instance_type = google_alloydb_cluster.<secondary_cluster_name>.cluster_type} instead of {instance_type = SECONDARY} If the instance type is SECONDARY, the terraform delete instance operation does not delete the secondary instance but abandons it instead. Use deletion_policy = "FORCE" in the associated secondary cluster and delete the cluster forcefully to delete the secondary cluster as well its associated secondary instance. Users can undo the delete secondary instance action by importing the deleted secondary instance by calling terraform import. Possible values: ["PRIMARY", "READ_POOL", "SECONDARY"]
    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_config InstanceClientConnectionConfigArgs
    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 InstanceMachineConfigArgs
    Configurations for the machines that host the underlying database engine. Structure is documented below.
    query_insights_config InstanceQueryInsightsConfigArgs
    Configuration for query insights. Structure is documented below.
    read_pool_config InstanceReadPoolConfigArgs
    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}'
    instanceId String
    The ID of the alloydb instance.


    instanceType String
    The type of the instance. If the instance type is READ_POOL, provide the associated PRIMARY/SECONDARY instance in the 'depends_on' meta-data attribute. If the instance type is SECONDARY, point to the cluster_type of the associated secondary cluster instead of mentioning SECONDARY. Example: {instance_type = google_alloydb_cluster.<secondary_cluster_name>.cluster_type} instead of {instance_type = SECONDARY} If the instance type is SECONDARY, the terraform delete instance operation does not delete the secondary instance but abandons it instead. Use deletion_policy = "FORCE" in the associated secondary cluster and delete the cluster forcefully to delete the secondary cluster as well its associated secondary instance. Users can undo the delete secondary instance action by importing the deleted secondary instance by calling terraform import. Possible values: ["PRIMARY", "READ_POOL", "SECONDARY"]
    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.
    availabilityType 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.
    clientConnectionConfig Property Map
    Client connection specific configurations. Structure is documented below.
    databaseFlags 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.
    displayName String
    User-settable and human-readable display name for the Instance.
    gceZone 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.
    machineConfig Property Map
    Configurations for the machines that host the underlying database engine. Structure is documented below.
    queryInsightsConfig Property Map
    Configuration for query insights. Structure is documented below.
    readPoolConfig Property Map
    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:

    CreateTime string
    Time the Instance was created in UTC.
    EffectiveAnnotations Dictionary<string, string>
    All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
    EffectiveLabels 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.
    IpAddress 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.
    PulumiLabels 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.
    UpdateTime string
    Time the Instance was updated in UTC.
    CreateTime string
    Time the Instance was created in UTC.
    EffectiveAnnotations map[string]string
    All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
    EffectiveLabels 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.
    IpAddress 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.
    PulumiLabels 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.
    UpdateTime string
    Time the Instance was updated in UTC.
    createTime String
    Time the Instance was created in UTC.
    effectiveAnnotations Map<String,String>
    All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
    effectiveLabels 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.
    ipAddress 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.
    pulumiLabels 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.
    updateTime String
    Time the Instance was updated in UTC.
    createTime string
    Time the Instance was created in UTC.
    effectiveAnnotations {[key: string]: string}
    All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
    effectiveLabels {[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.
    ipAddress 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.
    pulumiLabels {[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.
    updateTime string
    Time the Instance was updated in UTC.
    create_time str
    Time the Instance was created in UTC.
    effective_annotations Mapping[str, str]
    All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
    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.
    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.
    createTime String
    Time the Instance was created in UTC.
    effectiveAnnotations Map<String>
    All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
    effectiveLabels 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.
    ipAddress 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.
    pulumiLabels 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.
    updateTime 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,
            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.
    The following state arguments are supported:
    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.
    AvailabilityType 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.
    ClientConnectionConfig InstanceClientConnectionConfig
    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}'
    CreateTime string
    Time the Instance was created in UTC.
    DatabaseFlags 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.
    DisplayName string
    User-settable and human-readable display name for the Instance.
    EffectiveAnnotations Dictionary<string, string>
    All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
    EffectiveLabels 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.
    GceZone 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.
    InstanceId string
    The ID of the alloydb instance.


    InstanceType string
    The type of the instance. If the instance type is READ_POOL, provide the associated PRIMARY/SECONDARY instance in the 'depends_on' meta-data attribute. If the instance type is SECONDARY, point to the cluster_type of the associated secondary cluster instead of mentioning SECONDARY. Example: {instance_type = google_alloydb_cluster.<secondary_cluster_name>.cluster_type} instead of {instance_type = SECONDARY} If the instance type is SECONDARY, the terraform delete instance operation does not delete the secondary instance but abandons it instead. Use deletion_policy = "FORCE" in the associated secondary cluster and delete the cluster forcefully to delete the secondary cluster as well its associated secondary instance. Users can undo the delete secondary instance action by importing the deleted secondary instance by calling terraform import. Possible values: ["PRIMARY", "READ_POOL", "SECONDARY"]
    IpAddress 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.
    MachineConfig InstanceMachineConfig
    Configurations for the machines that host the underlying database engine. Structure is documented below.
    Name string
    The name of the instance resource.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    QueryInsightsConfig InstanceQueryInsightsConfig
    Configuration for query insights. Structure is documented below.
    ReadPoolConfig InstanceReadPoolConfig
    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.
    UpdateTime 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.
    AvailabilityType 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.
    ClientConnectionConfig InstanceClientConnectionConfigArgs
    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}'
    CreateTime string
    Time the Instance was created in UTC.
    DatabaseFlags 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.
    DisplayName string
    User-settable and human-readable display name for the Instance.
    EffectiveAnnotations map[string]string
    All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
    EffectiveLabels 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.
    GceZone 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.
    InstanceId string
    The ID of the alloydb instance.


    InstanceType string
    The type of the instance. If the instance type is READ_POOL, provide the associated PRIMARY/SECONDARY instance in the 'depends_on' meta-data attribute. If the instance type is SECONDARY, point to the cluster_type of the associated secondary cluster instead of mentioning SECONDARY. Example: {instance_type = google_alloydb_cluster.<secondary_cluster_name>.cluster_type} instead of {instance_type = SECONDARY} If the instance type is SECONDARY, the terraform delete instance operation does not delete the secondary instance but abandons it instead. Use deletion_policy = "FORCE" in the associated secondary cluster and delete the cluster forcefully to delete the secondary cluster as well its associated secondary instance. Users can undo the delete secondary instance action by importing the deleted secondary instance by calling terraform import. Possible values: ["PRIMARY", "READ_POOL", "SECONDARY"]
    IpAddress 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.
    MachineConfig InstanceMachineConfigArgs
    Configurations for the machines that host the underlying database engine. Structure is documented below.
    Name string
    The name of the instance resource.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    QueryInsightsConfig InstanceQueryInsightsConfigArgs
    Configuration for query insights. Structure is documented below.
    ReadPoolConfig InstanceReadPoolConfigArgs
    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.
    UpdateTime 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.
    availabilityType 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.
    clientConnectionConfig InstanceClientConnectionConfig
    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}'
    createTime String
    Time the Instance was created in UTC.
    databaseFlags 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.
    displayName String
    User-settable and human-readable display name for the Instance.
    effectiveAnnotations Map<String,String>
    All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
    effectiveLabels 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.
    gceZone 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.
    instanceId String
    The ID of the alloydb instance.


    instanceType String
    The type of the instance. If the instance type is READ_POOL, provide the associated PRIMARY/SECONDARY instance in the 'depends_on' meta-data attribute. If the instance type is SECONDARY, point to the cluster_type of the associated secondary cluster instead of mentioning SECONDARY. Example: {instance_type = google_alloydb_cluster.<secondary_cluster_name>.cluster_type} instead of {instance_type = SECONDARY} If the instance type is SECONDARY, the terraform delete instance operation does not delete the secondary instance but abandons it instead. Use deletion_policy = "FORCE" in the associated secondary cluster and delete the cluster forcefully to delete the secondary cluster as well its associated secondary instance. Users can undo the delete secondary instance action by importing the deleted secondary instance by calling terraform import. Possible values: ["PRIMARY", "READ_POOL", "SECONDARY"]
    ipAddress 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.
    machineConfig InstanceMachineConfig
    Configurations for the machines that host the underlying database engine. Structure is documented below.
    name String
    The name of the instance resource.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    queryInsightsConfig InstanceQueryInsightsConfig
    Configuration for query insights. Structure is documented below.
    readPoolConfig InstanceReadPoolConfig
    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.
    updateTime 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.
    availabilityType 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.
    clientConnectionConfig InstanceClientConnectionConfig
    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}'
    createTime string
    Time the Instance was created in UTC.
    databaseFlags {[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.
    displayName string
    User-settable and human-readable display name for the Instance.
    effectiveAnnotations {[key: string]: string}
    All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
    effectiveLabels {[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.
    gceZone 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.
    instanceId string
    The ID of the alloydb instance.


    instanceType string
    The type of the instance. If the instance type is READ_POOL, provide the associated PRIMARY/SECONDARY instance in the 'depends_on' meta-data attribute. If the instance type is SECONDARY, point to the cluster_type of the associated secondary cluster instead of mentioning SECONDARY. Example: {instance_type = google_alloydb_cluster.<secondary_cluster_name>.cluster_type} instead of {instance_type = SECONDARY} If the instance type is SECONDARY, the terraform delete instance operation does not delete the secondary instance but abandons it instead. Use deletion_policy = "FORCE" in the associated secondary cluster and delete the cluster forcefully to delete the secondary cluster as well its associated secondary instance. Users can undo the delete secondary instance action by importing the deleted secondary instance by calling terraform import. Possible values: ["PRIMARY", "READ_POOL", "SECONDARY"]
    ipAddress 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.
    machineConfig InstanceMachineConfig
    Configurations for the machines that host the underlying database engine. Structure is documented below.
    name string
    The name of the instance resource.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    queryInsightsConfig InstanceQueryInsightsConfig
    Configuration for query insights. Structure is documented below.
    readPoolConfig InstanceReadPoolConfig
    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.
    updateTime 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_config InstanceClientConnectionConfigArgs
    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]
    All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
    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
    The type of the instance. If the instance type is READ_POOL, provide the associated PRIMARY/SECONDARY instance in the 'depends_on' meta-data attribute. If the instance type is SECONDARY, point to the cluster_type of the associated secondary cluster instead of mentioning SECONDARY. Example: {instance_type = google_alloydb_cluster.<secondary_cluster_name>.cluster_type} instead of {instance_type = SECONDARY} If the instance type is SECONDARY, the terraform delete instance operation does not delete the secondary instance but abandons it instead. Use deletion_policy = "FORCE" in the associated secondary cluster and delete the cluster forcefully to delete the secondary cluster as well its associated secondary instance. Users can undo the delete secondary instance action by importing the deleted secondary instance by calling terraform import. Possible values: ["PRIMARY", "READ_POOL", "SECONDARY"]
    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 InstanceMachineConfigArgs
    Configurations for the machines that host the underlying database engine. Structure is documented below.
    name str
    The name of the instance resource.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    query_insights_config InstanceQueryInsightsConfigArgs
    Configuration for query insights. Structure is documented below.
    read_pool_config InstanceReadPoolConfigArgs
    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.
    availabilityType 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.
    clientConnectionConfig Property Map
    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}'
    createTime String
    Time the Instance was created in UTC.
    databaseFlags 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.
    displayName String
    User-settable and human-readable display name for the Instance.
    effectiveAnnotations Map<String>
    All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    gceZone 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.
    instanceId String
    The ID of the alloydb instance.


    instanceType String
    The type of the instance. If the instance type is READ_POOL, provide the associated PRIMARY/SECONDARY instance in the 'depends_on' meta-data attribute. If the instance type is SECONDARY, point to the cluster_type of the associated secondary cluster instead of mentioning SECONDARY. Example: {instance_type = google_alloydb_cluster.<secondary_cluster_name>.cluster_type} instead of {instance_type = SECONDARY} If the instance type is SECONDARY, the terraform delete instance operation does not delete the secondary instance but abandons it instead. Use deletion_policy = "FORCE" in the associated secondary cluster and delete the cluster forcefully to delete the secondary cluster as well its associated secondary instance. Users can undo the delete secondary instance action by importing the deleted secondary instance by calling terraform import. Possible values: ["PRIMARY", "READ_POOL", "SECONDARY"]
    ipAddress 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.
    machineConfig Property Map
    Configurations for the machines that host the underlying database engine. Structure is documented below.
    name String
    The name of the instance resource.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    queryInsightsConfig Property Map
    Configuration for query insights. Structure is documented below.
    readPoolConfig Property Map
    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.
    updateTime String
    Time the Instance was updated in UTC.

    Supporting Types

    InstanceClientConnectionConfig, InstanceClientConnectionConfigArgs

    RequireConnectors bool
    Configuration to enforce connectors only (ex: AuthProxy) connections to the database.
    SslConfig InstanceClientConnectionConfigSslConfig
    SSL config option for this instance. Structure is documented below.
    RequireConnectors bool
    Configuration to enforce connectors only (ex: AuthProxy) connections to the database.
    SslConfig InstanceClientConnectionConfigSslConfig
    SSL config option for this instance. Structure is documented below.
    requireConnectors Boolean
    Configuration to enforce connectors only (ex: AuthProxy) connections to the database.
    sslConfig InstanceClientConnectionConfigSslConfig
    SSL config option for this instance. Structure is documented below.
    requireConnectors boolean
    Configuration to enforce connectors only (ex: AuthProxy) connections to the database.
    sslConfig InstanceClientConnectionConfigSslConfig
    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 InstanceClientConnectionConfigSslConfig
    SSL config option for this instance. Structure is documented below.
    requireConnectors Boolean
    Configuration to enforce connectors only (ex: AuthProxy) connections to the database.
    sslConfig Property Map
    SSL config option for this instance. Structure is documented below.

    InstanceClientConnectionConfigSslConfig, InstanceClientConnectionConfigSslConfigArgs

    SslMode string
    SSL mode. Specifies client-server SSL/TLS connection behavior. Possible values are: ENCRYPTED_ONLY, ALLOW_UNENCRYPTED_AND_ENCRYPTED.
    SslMode string
    SSL mode. Specifies client-server SSL/TLS connection behavior. Possible values are: ENCRYPTED_ONLY, ALLOW_UNENCRYPTED_AND_ENCRYPTED.
    sslMode String
    SSL mode. Specifies client-server SSL/TLS connection behavior. Possible values are: ENCRYPTED_ONLY, ALLOW_UNENCRYPTED_AND_ENCRYPTED.
    sslMode 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.
    sslMode String
    SSL mode. Specifies client-server SSL/TLS connection behavior. Possible values are: ENCRYPTED_ONLY, ALLOW_UNENCRYPTED_AND_ENCRYPTED.

    InstanceMachineConfig, InstanceMachineConfigArgs

    CpuCount int
    The number of CPU's in the VM instance.
    CpuCount int
    The number of CPU's in the VM instance.
    cpuCount Integer
    The number of CPU's in the VM instance.
    cpuCount number
    The number of CPU's in the VM instance.
    cpu_count int
    The number of CPU's in the VM instance.
    cpuCount Number
    The number of CPU's in the VM instance.

    InstanceQueryInsightsConfig, InstanceQueryInsightsConfigArgs

    QueryPlansPerMinute int
    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.
    QueryStringLength int
    Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.
    RecordApplicationTags bool
    Record application tags for an instance. This flag is turned "on" by default.
    RecordClientAddress bool
    Record client address for an instance. Client address is PII information. This flag is turned "on" by default.
    QueryPlansPerMinute int
    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.
    QueryStringLength int
    Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.
    RecordApplicationTags bool
    Record application tags for an instance. This flag is turned "on" by default.
    RecordClientAddress bool
    Record client address for an instance. Client address is PII information. This flag is turned "on" by default.
    queryPlansPerMinute Integer
    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.
    queryStringLength Integer
    Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.
    recordApplicationTags Boolean
    Record application tags for an instance. This flag is turned "on" by default.
    recordClientAddress Boolean
    Record client address for an instance. Client address is PII information. This flag is turned "on" by default.
    queryPlansPerMinute number
    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.
    queryStringLength number
    Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.
    recordApplicationTags boolean
    Record application tags for an instance. This flag is turned "on" by default.
    recordClientAddress boolean
    Record client address for an instance. Client address is PII information. This flag is turned "on" by default.
    query_plans_per_minute int
    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_length int
    Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.
    record_application_tags bool
    Record application tags for an instance. This flag is turned "on" by default.
    record_client_address bool
    Record client address for an instance. Client address is PII information. This flag is turned "on" by default.
    queryPlansPerMinute Number
    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.
    queryStringLength Number
    Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid.
    recordApplicationTags Boolean
    Record application tags for an instance. This flag is turned "on" by default.
    recordClientAddress Boolean
    Record client address for an instance. Client address is PII information. This flag is turned "on" by default.

    InstanceReadPoolConfig, InstanceReadPoolConfigArgs

    NodeCount int
    Read capacity, i.e. number of nodes in a read pool instance.
    NodeCount int
    Read capacity, i.e. number of nodes in a read pool instance.
    nodeCount Integer
    Read capacity, i.e. number of nodes in a read pool instance.
    nodeCount 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.
    nodeCount 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.
    gcp logo
    Google Cloud Classic v7.19.0 published on Thursday, Apr 18, 2024 by Pulumi