alicloud.mongodb.GlobalSecurityIpGroup
Explore with Pulumi AI
Provides a Mongodb Global Security IP Group resource.
Whitelist Template Resources.
For information about Mongodb Global Security IP Group and how to use it, see What is Global Security IP Group.
NOTE: Available since v1.257.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") || "terraformexample";
const _default = new alicloud.mongodb.GlobalSecurityIpGroup("default", {
globalIgName: name,
globalSecurityIpList: "192.168.1.1,192.168.1.2,192.168.1.3",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraformexample"
default = alicloud.mongodb.GlobalSecurityIpGroup("default",
global_ig_name=name,
global_security_ip_list="192.168.1.1,192.168.1.2,192.168.1.3")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/mongodb"
"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 := "terraformexample"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := mongodb.NewGlobalSecurityIpGroup(ctx, "default", &mongodb.GlobalSecurityIpGroupArgs{
GlobalIgName: pulumi.String(name),
GlobalSecurityIpList: pulumi.String("192.168.1.1,192.168.1.2,192.168.1.3"),
})
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") ?? "terraformexample";
var @default = new AliCloud.MongoDB.GlobalSecurityIpGroup("default", new()
{
GlobalIgName = name,
GlobalSecurityIpList = "192.168.1.1,192.168.1.2,192.168.1.3",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.mongodb.GlobalSecurityIpGroup;
import com.pulumi.alicloud.mongodb.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("terraformexample");
var default_ = new GlobalSecurityIpGroup("default", GlobalSecurityIpGroupArgs.builder()
.globalIgName(name)
.globalSecurityIpList("192.168.1.1,192.168.1.2,192.168.1.3")
.build());
}
}
configuration:
name:
type: string
default: terraformexample
resources:
default:
type: alicloud:mongodb:GlobalSecurityIpGroup
properties:
globalIgName: ${name}
globalSecurityIpList: 192.168.1.1,192.168.1.2,192.168.1.3
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_ig_name: Optional[str] = None,
global_security_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:mongodb: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 globalSecurityIpGroupResource = new AliCloud.MongoDB.GlobalSecurityIpGroup("globalSecurityIpGroupResource", new()
{
GlobalIgName = "string",
GlobalSecurityIpList = "string",
});
example, err := mongodb.NewGlobalSecurityIpGroup(ctx, "globalSecurityIpGroupResource", &mongodb.GlobalSecurityIpGroupArgs{
GlobalIgName: pulumi.String("string"),
GlobalSecurityIpList: pulumi.String("string"),
})
var globalSecurityIpGroupResource = new GlobalSecurityIpGroup("globalSecurityIpGroupResource", GlobalSecurityIpGroupArgs.builder()
.globalIgName("string")
.globalSecurityIpList("string")
.build());
global_security_ip_group_resource = alicloud.mongodb.GlobalSecurityIpGroup("globalSecurityIpGroupResource",
global_ig_name="string",
global_security_ip_list="string")
const globalSecurityIpGroupResource = new alicloud.mongodb.GlobalSecurityIpGroup("globalSecurityIpGroupResource", {
globalIgName: "string",
globalSecurityIpList: "string",
});
type: alicloud:mongodb:GlobalSecurityIpGroup
properties:
globalIgName: string
globalSecurityIpList: 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
Ig stringName - The name of the IP whitelist template.
- Global
Security stringIp List The IP address in the whitelist template.
NOTE: Separate multiple IP addresses with commas (,). You can create up to 1000 IP addresses or CIDR blocks for all IP address whitelists.
- Global
Ig stringName - The name of the IP whitelist template.
- Global
Security stringIp List The IP address in the whitelist template.
NOTE: Separate multiple IP addresses with commas (,). You can create up to 1000 IP addresses or CIDR blocks for all IP address whitelists.
- global
Ig StringName - The name of the IP whitelist template.
- global
Security StringIp List The IP address in the whitelist template.
NOTE: Separate multiple IP addresses with commas (,). You can create up to 1000 IP addresses or CIDR blocks for all IP address whitelists.
- global
Ig stringName - The name of the IP whitelist template.
- global
Security stringIp List The IP address in the whitelist template.
NOTE: Separate multiple IP addresses with commas (,). You can create up to 1000 IP addresses or CIDR blocks for all IP address whitelists.
- global_
ig_ strname - The name of the IP whitelist template.
- global_
security_ strip_ list The IP address in the whitelist template.
NOTE: Separate multiple IP addresses with commas (,). You can create up to 1000 IP addresses or CIDR blocks for all IP address whitelists.
- global
Ig StringName - The name of the IP whitelist template.
- global
Security StringIp List The IP address in the whitelist template.
NOTE: Separate multiple IP addresses with commas (,). You can create up to 1000 IP addresses or CIDR blocks for all IP address 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_ig_name: Optional[str] = None,
global_security_ip_list: Optional[str] = None,
region_id: Optional[str] = None) -> GlobalSecurityIpGroup
func 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:mongodb: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
Ig stringName - The name of the IP whitelist template.
- Global
Security stringIp List The IP address in the whitelist template.
NOTE: Separate multiple IP addresses with commas (,). You can create up to 1000 IP addresses or CIDR blocks for all IP address whitelists.
- Region
Id string - The region ID of the resource
- Global
Ig stringName - The name of the IP whitelist template.
- Global
Security stringIp List The IP address in the whitelist template.
NOTE: Separate multiple IP addresses with commas (,). You can create up to 1000 IP addresses or CIDR blocks for all IP address whitelists.
- Region
Id string - The region ID of the resource
- global
Ig StringName - The name of the IP whitelist template.
- global
Security StringIp List The IP address in the whitelist template.
NOTE: Separate multiple IP addresses with commas (,). You can create up to 1000 IP addresses or CIDR blocks for all IP address whitelists.
- region
Id String - The region ID of the resource
- global
Ig stringName - The name of the IP whitelist template.
- global
Security stringIp List The IP address in the whitelist template.
NOTE: Separate multiple IP addresses with commas (,). You can create up to 1000 IP addresses or CIDR blocks for all IP address whitelists.
- region
Id string - The region ID of the resource
- global_
ig_ strname - The name of the IP whitelist template.
- global_
security_ strip_ list The IP address in the whitelist template.
NOTE: Separate multiple IP addresses with commas (,). You can create up to 1000 IP addresses or CIDR blocks for all IP address whitelists.
- region_
id str - The region ID of the resource
- global
Ig StringName - The name of the IP whitelist template.
- global
Security StringIp List The IP address in the whitelist template.
NOTE: Separate multiple IP addresses with commas (,). You can create up to 1000 IP addresses or CIDR blocks for all IP address whitelists.
- region
Id String - The region ID of the resource
Import
Mongodb Global Security IP Group can be imported using the id, e.g.
$ pulumi import alicloud:mongodb/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
alicloud
Terraform Provider.