Provides a Polardb Global Security Ip Group resource.
Global Security IP Group.
For information about Polardb Global Security Ip Group and how to use it, see What is Global Security Ip Group.
NOTE: Available since v1.266.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.polardb.GlobalSecurityIpGroup("default", {
globalIpList: "192.168.0.1",
globalIpGroupName: "example_template",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.polardb.GlobalSecurityIpGroup("default",
global_ip_list="192.168.0.1",
global_ip_group_name="example_template")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/polardb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := polardb.NewGlobalSecurityIpGroup(ctx, "default", &polardb.GlobalSecurityIpGroupArgs{
GlobalIpList: pulumi.String("192.168.0.1"),
GlobalIpGroupName: pulumi.String("example_template"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new AliCloud.PolarDB.GlobalSecurityIpGroup("default", new()
{
GlobalIpList = "192.168.0.1",
GlobalIpGroupName = "example_template",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.polardb.GlobalSecurityIpGroup;
import com.pulumi.alicloud.polardb.GlobalSecurityIpGroupArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new GlobalSecurityIpGroup("default", GlobalSecurityIpGroupArgs.builder()
.globalIpList("192.168.0.1")
.globalIpGroupName("example_template")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:polardb:GlobalSecurityIpGroup
properties:
globalIpList: 192.168.0.1
globalIpGroupName: example_template
📚 Need more examples? VIEW MORE EXAMPLES
Create GlobalSecurityIpGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GlobalSecurityIpGroup(name: string, args: GlobalSecurityIpGroupArgs, opts?: CustomResourceOptions);@overload
def GlobalSecurityIpGroup(resource_name: str,
args: GlobalSecurityIpGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GlobalSecurityIpGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
global_ip_group_name: Optional[str] = None,
global_ip_list: Optional[str] = None)func NewGlobalSecurityIpGroup(ctx *Context, name string, args GlobalSecurityIpGroupArgs, opts ...ResourceOption) (*GlobalSecurityIpGroup, error)public GlobalSecurityIpGroup(string name, GlobalSecurityIpGroupArgs args, CustomResourceOptions? opts = null)
public GlobalSecurityIpGroup(String name, GlobalSecurityIpGroupArgs args)
public GlobalSecurityIpGroup(String name, GlobalSecurityIpGroupArgs args, CustomResourceOptions options)
type: alicloud:polardb:GlobalSecurityIpGroup
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 GlobalSecurityIpGroupArgs
- 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 GlobalSecurityIpGroupArgs
- 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 GlobalSecurityIpGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GlobalSecurityIpGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GlobalSecurityIpGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var alicloudGlobalSecurityIpGroupResource = new AliCloud.PolarDB.GlobalSecurityIpGroup("alicloudGlobalSecurityIpGroupResource", new()
{
GlobalIpGroupName = "string",
GlobalIpList = "string",
});
example, err := polardb.NewGlobalSecurityIpGroup(ctx, "alicloudGlobalSecurityIpGroupResource", &polardb.GlobalSecurityIpGroupArgs{
GlobalIpGroupName: pulumi.String("string"),
GlobalIpList: pulumi.String("string"),
})
var alicloudGlobalSecurityIpGroupResource = new com.pulumi.alicloud.polardb.GlobalSecurityIpGroup("alicloudGlobalSecurityIpGroupResource", com.pulumi.alicloud.polardb.GlobalSecurityIpGroupArgs.builder()
.globalIpGroupName("string")
.globalIpList("string")
.build());
alicloud_global_security_ip_group_resource = alicloud.polardb.GlobalSecurityIpGroup("alicloudGlobalSecurityIpGroupResource",
global_ip_group_name="string",
global_ip_list="string")
const alicloudGlobalSecurityIpGroupResource = new alicloud.polardb.GlobalSecurityIpGroup("alicloudGlobalSecurityIpGroupResource", {
globalIpGroupName: "string",
globalIpList: "string",
});
type: alicloud:polardb:GlobalSecurityIpGroup
properties:
globalIpGroupName: string
globalIpList: string
GlobalSecurityIpGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The GlobalSecurityIpGroup resource accepts the following input properties:
- Global
Ip stringGroup Name - The name of the IP whitelist template. The name of the IP whitelist template must meet the following requirements:
- The name can contain lowercase letters, digits, and underscores (_).
- The name must start with a letter and end with a letter or digit.
- The name must be 2 to 120 characters in length.
- Global
Ip stringList The IP address in the whitelist template.
NOTE: Multiple IP addresses are separated by commas (,). You can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists.
- Global
Ip stringGroup Name - The name of the IP whitelist template. The name of the IP whitelist template must meet the following requirements:
- The name can contain lowercase letters, digits, and underscores (_).
- The name must start with a letter and end with a letter or digit.
- The name must be 2 to 120 characters in length.
- Global
Ip stringList The IP address in the whitelist template.
NOTE: Multiple IP addresses are separated by commas (,). You can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists.
- global
Ip StringGroup Name - The name of the IP whitelist template. The name of the IP whitelist template must meet the following requirements:
- The name can contain lowercase letters, digits, and underscores (_).
- The name must start with a letter and end with a letter or digit.
- The name must be 2 to 120 characters in length.
- global
Ip StringList The IP address in the whitelist template.
NOTE: Multiple IP addresses are separated by commas (,). You can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists.
- global
Ip stringGroup Name - The name of the IP whitelist template. The name of the IP whitelist template must meet the following requirements:
- The name can contain lowercase letters, digits, and underscores (_).
- The name must start with a letter and end with a letter or digit.
- The name must be 2 to 120 characters in length.
- global
Ip stringList The IP address in the whitelist template.
NOTE: Multiple IP addresses are separated by commas (,). You can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists.
- global_
ip_ strgroup_ name - The name of the IP whitelist template. The name of the IP whitelist template must meet the following requirements:
- The name can contain lowercase letters, digits, and underscores (_).
- The name must start with a letter and end with a letter or digit.
- The name must be 2 to 120 characters in length.
- global_
ip_ strlist The IP address in the whitelist template.
NOTE: Multiple IP addresses are separated by commas (,). You can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists.
- global
Ip StringGroup Name - The name of the IP whitelist template. The name of the IP whitelist template must meet the following requirements:
- The name can contain lowercase letters, digits, and underscores (_).
- The name must start with a letter and end with a letter or digit.
- The name must be 2 to 120 characters in length.
- global
Ip StringList The IP address in the whitelist template.
NOTE: Multiple IP addresses are separated by commas (,). You can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists.
Outputs
All input properties are implicitly available as output properties. Additionally, the GlobalSecurityIpGroup resource produces the following output properties:
Look up Existing GlobalSecurityIpGroup Resource
Get an existing GlobalSecurityIpGroup 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?: GlobalSecurityIpGroupState, opts?: CustomResourceOptions): GlobalSecurityIpGroup@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
global_ip_group_name: Optional[str] = None,
global_ip_list: Optional[str] = None,
region_id: Optional[str] = None) -> GlobalSecurityIpGroupfunc GetGlobalSecurityIpGroup(ctx *Context, name string, id IDInput, state *GlobalSecurityIpGroupState, opts ...ResourceOption) (*GlobalSecurityIpGroup, error)public static GlobalSecurityIpGroup Get(string name, Input<string> id, GlobalSecurityIpGroupState? state, CustomResourceOptions? opts = null)public static GlobalSecurityIpGroup get(String name, Output<String> id, GlobalSecurityIpGroupState state, CustomResourceOptions options)resources: _: type: alicloud:polardb:GlobalSecurityIpGroup get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Global
Ip stringGroup Name - The name of the IP whitelist template. The name of the IP whitelist template must meet the following requirements:
- The name can contain lowercase letters, digits, and underscores (_).
- The name must start with a letter and end with a letter or digit.
- The name must be 2 to 120 characters in length.
- Global
Ip stringList The IP address in the whitelist template.
NOTE: Multiple IP addresses are separated by commas (,). You can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists.
- Region
Id string - The region ID of the IP whitelist template.
- Global
Ip stringGroup Name - The name of the IP whitelist template. The name of the IP whitelist template must meet the following requirements:
- The name can contain lowercase letters, digits, and underscores (_).
- The name must start with a letter and end with a letter or digit.
- The name must be 2 to 120 characters in length.
- Global
Ip stringList The IP address in the whitelist template.
NOTE: Multiple IP addresses are separated by commas (,). You can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists.
- Region
Id string - The region ID of the IP whitelist template.
- global
Ip StringGroup Name - The name of the IP whitelist template. The name of the IP whitelist template must meet the following requirements:
- The name can contain lowercase letters, digits, and underscores (_).
- The name must start with a letter and end with a letter or digit.
- The name must be 2 to 120 characters in length.
- global
Ip StringList The IP address in the whitelist template.
NOTE: Multiple IP addresses are separated by commas (,). You can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists.
- region
Id String - The region ID of the IP whitelist template.
- global
Ip stringGroup Name - The name of the IP whitelist template. The name of the IP whitelist template must meet the following requirements:
- The name can contain lowercase letters, digits, and underscores (_).
- The name must start with a letter and end with a letter or digit.
- The name must be 2 to 120 characters in length.
- global
Ip stringList The IP address in the whitelist template.
NOTE: Multiple IP addresses are separated by commas (,). You can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists.
- region
Id string - The region ID of the IP whitelist template.
- global_
ip_ strgroup_ name - The name of the IP whitelist template. The name of the IP whitelist template must meet the following requirements:
- The name can contain lowercase letters, digits, and underscores (_).
- The name must start with a letter and end with a letter or digit.
- The name must be 2 to 120 characters in length.
- global_
ip_ strlist The IP address in the whitelist template.
NOTE: Multiple IP addresses are separated by commas (,). You can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists.
- region_
id str - The region ID of the IP whitelist template.
- global
Ip StringGroup Name - The name of the IP whitelist template. The name of the IP whitelist template must meet the following requirements:
- The name can contain lowercase letters, digits, and underscores (_).
- The name must start with a letter and end with a letter or digit.
- The name must be 2 to 120 characters in length.
- global
Ip StringList The IP address in the whitelist template.
NOTE: Multiple IP addresses are separated by commas (,). You can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists.
- region
Id String - The region ID of the IP whitelist template.
Import
Polardb Global Security Ip Group can be imported using the id, e.g.
$ pulumi import alicloud:polardb/globalSecurityIpGroup:GlobalSecurityIpGroup example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
