Instance
Provides a AnalyticDB for PostgreSQL instance resource supports replica set instances only. the AnalyticDB for PostgreSQL provides stable, reliable, and automatic scalable database services. You can see detail product introduction here
NOTE: Available in 1.47.0+
NOTE: The following regions don’t support create Classic network Gpdb instance. [
ap-southeast-2,ap-southeast-3,ap-southeast-5,ap-south-1,me-east-1,ap-northeast-1,eu-west-1,us-east-1,eu-central-1,cn-shanghai-finance-1,cn-shenzhen-finance-1,cn-hangzhou-finance]NOTE: Create instance or change instance would cost 10~15 minutes. Please make full preparation.
Example Usage
Create a Gpdb instance
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var defaultZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
{
AvailableResourceCreation = "Gpdb",
}));
var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new AliCloud.Vpc.NetworkArgs
{
CidrBlock = "172.16.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new AliCloud.Vpc.SwitchArgs
{
AvailabilityZone = defaultZones.Apply(defaultZones => defaultZones.Zones[0].Id),
CidrBlock = "172.16.0.0/24",
VpcId = defaultNetwork.Id,
});
var example = new AliCloud.Gpdb.Instance("example", new AliCloud.Gpdb.InstanceArgs
{
Description = "tf-gpdb-test",
Engine = "gpdb",
EngineVersion = "4.3",
InstanceClass = "gpdb.group.segsdx2",
InstanceGroupCount = "2",
SecurityIpLists =
{
"10.168.1.12",
"100.69.7.112",
},
VswitchId = defaultSwitch.Id,
});
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
default_zones = alicloud.get_zones(available_resource_creation="Gpdb")
default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/16")
default_switch = alicloud.vpc.Switch("defaultSwitch",
availability_zone=default_zones.zones[0]["id"],
cidr_block="172.16.0.0/24",
vpc_id=default_network.id)
example = alicloud.gpdb.Instance("example",
description="tf-gpdb-test",
engine="gpdb",
engine_version="4.3",
instance_class="gpdb.group.segsdx2",
instance_group_count="2",
security_ip_lists=[
"10.168.1.12",
"100.69.7.112",
],
vswitch_id=default_switch.id)import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultZones = pulumi.output(alicloud.getZones({
availableResourceCreation: "Gpdb",
}, { async: true }));
const defaultNetwork = new alicloud.vpc.Network("default", {
cidrBlock: "172.16.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
availabilityZone: defaultZones.zones[0].id,
cidrBlock: "172.16.0.0/24",
vpcId: defaultNetwork.id,
});
const example = new alicloud.gpdb.Instance("example", {
description: "tf-gpdb-test",
engine: "gpdb",
engineVersion: "4.3",
instanceClass: "gpdb.group.segsdx2",
instanceGroupCount: "2",
securityIpLists: [
"10.168.1.12",
"100.69.7.112",
],
vswitchId: defaultSwitch.id,
});Create a Instance Resource
new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);def Instance(resource_name, opts=None, availability_zone=None, description=None, engine=None, engine_version=None, instance_charge_type=None, instance_class=None, instance_group_count=None, security_ip_lists=None, tags=None, vswitch_id=None, __props__=None);func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Instance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Instance resource accepts the following input properties:
- Instance
Class string Instance specification. see Instance specifications.
- Instance
Group stringCount The number of groups. Valid values: [2,4,8,16,32]
- Availability
Zone string - Description string
The name of DB instance. It a string of 2 to 256 characters.
- Engine string
Database engine: gpdb. System Default value: gpdb.
- Engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- Instance
Charge stringType Valid values are
PrePaid,PostPaid,System default toPostPaid.- Security
Ip List<string>Lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Vswitch
Id string The virtual switch ID to launch DB instances in one VPC.
- Instance
Class string Instance specification. see Instance specifications.
- Instance
Group stringCount The number of groups. Valid values: [2,4,8,16,32]
- Availability
Zone string - Description string
The name of DB instance. It a string of 2 to 256 characters.
- Engine string
Database engine: gpdb. System Default value: gpdb.
- Engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- Instance
Charge stringType Valid values are
PrePaid,PostPaid,System default toPostPaid.- Security
Ip []stringLists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- map[string]interface{}
A mapping of tags to assign to the resource.
- Vswitch
Id string The virtual switch ID to launch DB instances in one VPC.
- instance
Class string Instance specification. see Instance specifications.
- instance
Group stringCount The number of groups. Valid values: [2,4,8,16,32]
- availability
Zone string - description string
The name of DB instance. It a string of 2 to 256 characters.
- engine string
Database engine: gpdb. System Default value: gpdb.
- engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- instance
Charge stringType Valid values are
PrePaid,PostPaid,System default toPostPaid.- security
Ip string[]Lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- {[key: string]: any}
A mapping of tags to assign to the resource.
- vswitch
Id string The virtual switch ID to launch DB instances in one VPC.
- instance_
class str Instance specification. see Instance specifications.
- instance_
group_ strcount The number of groups. Valid values: [2,4,8,16,32]
- availability_
zone str - description str
The name of DB instance. It a string of 2 to 256 characters.
- engine str
Database engine: gpdb. System Default value: gpdb.
- engine_
version str Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- instance_
charge_ strtype Valid values are
PrePaid,PostPaid,System default toPostPaid.- security_
ip_ List[str]lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- Dict[str, Any]
A mapping of tags to assign to the resource.
- vswitch_
id str The virtual switch ID to launch DB instances in one VPC.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
Look up an 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): Instancestatic get(resource_name, id, opts=None, availability_zone=None, description=None, engine=None, engine_version=None, instance_charge_type=None, instance_class=None, instance_group_count=None, security_ip_lists=None, tags=None, vswitch_id=None, __props__=None);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)- 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.
The following state arguments are supported:
- Availability
Zone string - Description string
The name of DB instance. It a string of 2 to 256 characters.
- Engine string
Database engine: gpdb. System Default value: gpdb.
- Engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- Instance
Charge stringType Valid values are
PrePaid,PostPaid,System default toPostPaid.- Instance
Class string Instance specification. see Instance specifications.
- Instance
Group stringCount The number of groups. Valid values: [2,4,8,16,32]
- Security
Ip List<string>Lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Vswitch
Id string The virtual switch ID to launch DB instances in one VPC.
- Availability
Zone string - Description string
The name of DB instance. It a string of 2 to 256 characters.
- Engine string
Database engine: gpdb. System Default value: gpdb.
- Engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- Instance
Charge stringType Valid values are
PrePaid,PostPaid,System default toPostPaid.- Instance
Class string Instance specification. see Instance specifications.
- Instance
Group stringCount The number of groups. Valid values: [2,4,8,16,32]
- Security
Ip []stringLists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- map[string]interface{}
A mapping of tags to assign to the resource.
- Vswitch
Id string The virtual switch ID to launch DB instances in one VPC.
- availability
Zone string - description string
The name of DB instance. It a string of 2 to 256 characters.
- engine string
Database engine: gpdb. System Default value: gpdb.
- engine
Version string Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- instance
Charge stringType Valid values are
PrePaid,PostPaid,System default toPostPaid.- instance
Class string Instance specification. see Instance specifications.
- instance
Group stringCount The number of groups. Valid values: [2,4,8,16,32]
- security
Ip string[]Lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- {[key: string]: any}
A mapping of tags to assign to the resource.
- vswitch
Id string The virtual switch ID to launch DB instances in one VPC.
- availability_
zone str - description str
The name of DB instance. It a string of 2 to 256 characters.
- engine str
Database engine: gpdb. System Default value: gpdb.
- engine_
version str Database version. Value options can refer to the latest docs CreateDBInstance
EngineVersion.- instance_
charge_ strtype Valid values are
PrePaid,PostPaid,System default toPostPaid.- instance_
class str Instance specification. see Instance specifications.
- instance_
group_ strcount The number of groups. Valid values: [2,4,8,16,32]
- security_
ip_ List[str]lists List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
- Dict[str, Any]
A mapping of tags to assign to the resource.
- vswitch_
id str The virtual switch ID to launch DB instances in one VPC.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.