1. Registry
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. redis
  6. getGlobalSecurityIpGroups
Viewing docs for Alibaba Cloud v3.106.0
published on Monday, Aug 24, 2026 by Pulumi
alicloud logo alicloud logo
Viewing docs for Alibaba Cloud v3.106.0
published on Monday, Aug 24, 2026 by Pulumi

    This data source provides Tair (Redis OSS-Compatible) And Memcache (KVStore) Global Security Ip Group available to the user.What is Global Security Ip Group

    NOTE: Available since v1.287.0.

    Example 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 zoneId = config.get("zoneId") || "cn-beijing-h";
    const regionId = config.get("regionId") || "cn-beijing";
    const defaultGlobalSecurityIpGroup = new alicloud.redis.GlobalSecurityIpGroup("default", {
        globalIpGroupName: "ggn_example_create",
        globalIpList: "192.168.0.1,10.10.10.10,172.16.0.1",
    });
    const _default = alicloud.redis.getGlobalSecurityIpGroupsOutput({
        ids: [defaultGlobalSecurityIpGroup.id],
    });
    export const alicloudRedisGlobalSecurityIpGroupExampleId = _default.apply(_default => _default.groups?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    zone_id = config.get("zoneId")
    if zone_id is None:
        zone_id = "cn-beijing-h"
    region_id = config.get("regionId")
    if region_id is None:
        region_id = "cn-beijing"
    default_global_security_ip_group = alicloud.redis.GlobalSecurityIpGroup("default",
        global_ip_group_name="ggn_example_create",
        global_ip_list="192.168.0.1,10.10.10.10,172.16.0.1")
    default = alicloud.redis.get_global_security_ip_groups_output(ids=[default_global_security_ip_group.id])
    pulumi.export("alicloudRedisGlobalSecurityIpGroupExampleId", default.groups[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/redis"
    	"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
    		}
    		zoneId := "cn-beijing-h"
    		if param := cfg.Get("zoneId"); param != "" {
    			zoneId = param
    		}
    		regionId := "cn-beijing"
    		if param := cfg.Get("regionId"); param != "" {
    			regionId = param
    		}
    		defaultGlobalSecurityIpGroup, err := redis.NewGlobalSecurityIpGroup(ctx, "default", &redis.GlobalSecurityIpGroupArgs{
    			GlobalIpGroupName: pulumi.String("ggn_example_create"),
    			GlobalIpList:      pulumi.String("192.168.0.1,10.10.10.10,172.16.0.1"),
    		})
    		if err != nil {
    			return err
    		}
    		_default := redis.GetGlobalSecurityIpGroupsOutput(ctx, redis.GetGlobalSecurityIpGroupsOutputArgs{
    			Ids: pulumi.StringArray{
    				defaultGlobalSecurityIpGroup.ID().ToIDOutput().ToStringOutput(),
    			},
    		}, nil)
    		ctx.Export("alicloudRedisGlobalSecurityIpGroupExampleId", _default.ApplyT(func(_default redis.GetGlobalSecurityIpGroupsResult) (*string, error) {
    			return _default.Groups[0].Id, nil
    		}).(pulumi.StringPtrOutput))
    		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 zoneId = config.Get("zoneId") ?? "cn-beijing-h";
        var regionId = config.Get("regionId") ?? "cn-beijing";
        var defaultGlobalSecurityIpGroup = new AliCloud.Redis.GlobalSecurityIpGroup("default", new()
        {
            GlobalIpGroupName = "ggn_example_create",
            GlobalIpList = "192.168.0.1,10.10.10.10,172.16.0.1",
        });
    
        var @default = AliCloud.Redis.GetGlobalSecurityIpGroups.Invoke(new()
        {
            Ids = new[]
            {
                defaultGlobalSecurityIpGroup.Id,
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["alicloudRedisGlobalSecurityIpGroupExampleId"] = @default.Apply(@default => @default.Apply(getGlobalSecurityIpGroupsResult => getGlobalSecurityIpGroupsResult.Groups[0]?.Id)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.redis.GlobalSecurityIpGroup;
    import com.pulumi.alicloud.redis.GlobalSecurityIpGroupArgs;
    import com.pulumi.alicloud.redis.RedisFunctions;
    import com.pulumi.alicloud.redis.inputs.GetGlobalSecurityIpGroupsArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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");
            final var zoneId = config.get("zoneId").orElse("cn-beijing-h");
            final var regionId = config.get("regionId").orElse("cn-beijing");
            var defaultGlobalSecurityIpGroup = new GlobalSecurityIpGroup("defaultGlobalSecurityIpGroup", GlobalSecurityIpGroupArgs.builder()
                .globalIpGroupName("ggn_example_create")
                .globalIpList("192.168.0.1,10.10.10.10,172.16.0.1")
                .build());
    
            final var default = RedisFunctions.getGlobalSecurityIpGroups(GetGlobalSecurityIpGroupsArgs.builder()
                .ids(defaultGlobalSecurityIpGroup.id())
                .build());
    
            ctx.export("alicloudRedisGlobalSecurityIpGroupExampleId", default_.applyValue(_default_ -> _default_.groups()[0].id()));
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
      zoneId:
        type: string
        default: cn-beijing-h
      regionId:
        type: string
        default: cn-beijing
    resources:
      defaultGlobalSecurityIpGroup:
        type: alicloud:redis:GlobalSecurityIpGroup
        name: default
        properties:
          globalIpGroupName: ggn_example_create
          globalIpList: 192.168.0.1,10.10.10.10,172.16.0.1
    variables:
      default:
        fn::invoke:
          function: alicloud:redis:getGlobalSecurityIpGroups
          arguments:
            ids:
              - ${defaultGlobalSecurityIpGroup.id}
    outputs:
      alicloudRedisGlobalSecurityIpGroupExampleId: ${default.groups[0].id}
    
    pulumi {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
      }
    }
    
    data "alicloud_redis_getglobalsecurityipgroups" "default" {
      ids = [alicloud_redis_globalsecurityipgroup.default.id]
    }
    
    resource "alicloud_redis_globalsecurityipgroup" "default" {
      global_ip_group_name = "ggn_example_create"
      global_ip_list       = "192.168.0.1,10.10.10.10,172.16.0.1"
    }
    variable "name" {
      type    = string
      default = "terraform-example"
    }
    variable "zoneId" {
      type    = string
      default = "cn-beijing-h"
    }
    variable "regionId" {
      type    = string
      default = "cn-beijing"
    }
    output "alicloudRedisGlobalSecurityIpGroupExampleId" {
      value = data.alicloud_redis_getglobalsecurityipgroups.default.groups[0].id
    }
    

    Using getGlobalSecurityIpGroups

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getGlobalSecurityIpGroups(args: GetGlobalSecurityIpGroupsArgs, opts?: InvokeOptions): Promise<GetGlobalSecurityIpGroupsResult>
    function getGlobalSecurityIpGroupsOutput(args: GetGlobalSecurityIpGroupsOutputArgs, opts?: InvokeOutputOptions): Output<GetGlobalSecurityIpGroupsResult>
    def get_global_security_ip_groups(engine: Optional[str] = None,
                                      global_security_group_id: Optional[str] = None,
                                      ids: Optional[Sequence[str]] = None,
                                      output_file: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetGlobalSecurityIpGroupsResult
    def get_global_security_ip_groups_output(engine: pulumi.Input[Optional[str]] = None,
                                      global_security_group_id: pulumi.Input[Optional[str]] = None,
                                      ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                                      output_file: pulumi.Input[Optional[str]] = None,
                                      opts: Optional[InvokeOutputOptions] = None) -> Output[GetGlobalSecurityIpGroupsResult]
    func GetGlobalSecurityIpGroups(ctx *Context, args *GetGlobalSecurityIpGroupsArgs, opts ...InvokeOption) (*GetGlobalSecurityIpGroupsResult, error)
    func GetGlobalSecurityIpGroupsOutput(ctx *Context, args *GetGlobalSecurityIpGroupsOutputArgs, opts ...InvokeOption) GetGlobalSecurityIpGroupsResultOutput

    > Note: This function is named GetGlobalSecurityIpGroups in the Go SDK.

    public static class GetGlobalSecurityIpGroups 
    {
        public static Task<GetGlobalSecurityIpGroupsResult> InvokeAsync(GetGlobalSecurityIpGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetGlobalSecurityIpGroupsResult> Invoke(GetGlobalSecurityIpGroupsInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetGlobalSecurityIpGroupsResult> Invoke(GetGlobalSecurityIpGroupsInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetGlobalSecurityIpGroupsResult> getGlobalSecurityIpGroups(GetGlobalSecurityIpGroupsArgs args, InvokeOptions options)
    public static Output<GetGlobalSecurityIpGroupsResult> getGlobalSecurityIpGroups(GetGlobalSecurityIpGroupsArgs args, InvokeOptions options)
    public static Output<GetGlobalSecurityIpGroupsResult> getGlobalSecurityIpGroups(GetGlobalSecurityIpGroupsArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: alicloud:redis/getGlobalSecurityIpGroups:getGlobalSecurityIpGroups
      arguments:
        # arguments dictionary
    data "alicloud_redis_get_global_security_ip_groups" "name" {
        # arguments
    }

    The following arguments are supported:

    Engine string
    The engine type of the resource, such as Redis or Tair.
    GlobalSecurityGroupId string
    The ID of the IP whitelist template.
    Ids List<string>
    A list of Global Security Ip Group IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Engine string
    The engine type of the resource, such as Redis or Tair.
    GlobalSecurityGroupId string
    The ID of the IP whitelist template.
    Ids []string
    A list of Global Security Ip Group IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    engine string
    The engine type of the resource, such as Redis or Tair.
    global_security_group_id string
    The ID of the IP whitelist template.
    ids list(string)
    A list of Global Security Ip Group IDs.
    output_file string
    File name where to save data source results (after running pulumi preview).
    engine String
    The engine type of the resource, such as Redis or Tair.
    globalSecurityGroupId String
    The ID of the IP whitelist template.
    ids List<String>
    A list of Global Security Ip Group IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    engine string
    The engine type of the resource, such as Redis or Tair.
    globalSecurityGroupId string
    The ID of the IP whitelist template.
    ids string[]
    A list of Global Security Ip Group IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    engine str
    The engine type of the resource, such as Redis or Tair.
    global_security_group_id str
    The ID of the IP whitelist template.
    ids Sequence[str]
    A list of Global Security Ip Group IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    engine String
    The engine type of the resource, such as Redis or Tair.
    globalSecurityGroupId String
    The ID of the IP whitelist template.
    ids List<String>
    A list of Global Security Ip Group IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getGlobalSecurityIpGroups Result

    The following output properties are available:

    Groups List<Pulumi.AliCloud.Redis.Outputs.GetGlobalSecurityIpGroupsGroup>
    A list of Global Security Ip Group Entries. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of Global Security Ip Group IDs.
    Engine string
    GlobalSecurityGroupId string
    The ID of the IP whitelist template.
    OutputFile string
    Groups []GetGlobalSecurityIpGroupsGroup
    A list of Global Security Ip Group Entries. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of Global Security Ip Group IDs.
    Engine string
    GlobalSecurityGroupId string
    The ID of the IP whitelist template.
    OutputFile string
    groups list(object)
    A list of Global Security Ip Group Entries. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids list(string)
    A list of Global Security Ip Group IDs.
    engine string
    global_security_group_id string
    The ID of the IP whitelist template.
    output_file string
    groups List<GetGlobalSecurityIpGroupsGroup>
    A list of Global Security Ip Group Entries. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Global Security Ip Group IDs.
    engine String
    globalSecurityGroupId String
    The ID of the IP whitelist template.
    outputFile String
    groups GetGlobalSecurityIpGroupsGroup[]
    A list of Global Security Ip Group Entries. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of Global Security Ip Group IDs.
    engine string
    globalSecurityGroupId string
    The ID of the IP whitelist template.
    outputFile string
    groups Sequence[GetGlobalSecurityIpGroupsGroup]
    A list of Global Security Ip Group Entries. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of Global Security Ip Group IDs.
    engine str
    global_security_group_id str
    The ID of the IP whitelist template.
    output_file str
    groups List<Property Map>
    A list of Global Security Ip Group Entries. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Global Security Ip Group IDs.
    engine String
    globalSecurityGroupId String
    The ID of the IP whitelist template.
    outputFile String

    Supporting Types

    GetGlobalSecurityIpGroupsGroup

    GlobalIpGroupName string
    The name of the IP whitelist template.
    GlobalIpList string
    The IP address in the whitelist template.
    GlobalSecurityGroupId string
    The ID of the IP whitelist template.
    Id string
    The ID of the resource supplied above.
    RegionId string
    The region ID of the resource.
    GlobalIpGroupName string
    The name of the IP whitelist template.
    GlobalIpList string
    The IP address in the whitelist template.
    GlobalSecurityGroupId string
    The ID of the IP whitelist template.
    Id string
    The ID of the resource supplied above.
    RegionId string
    The region ID of the resource.
    global_ip_group_name string
    The name of the IP whitelist template.
    global_ip_list string
    The IP address in the whitelist template.
    global_security_group_id string
    The ID of the IP whitelist template.
    id string
    The ID of the resource supplied above.
    region_id string
    The region ID of the resource.
    globalIpGroupName String
    The name of the IP whitelist template.
    globalIpList String
    The IP address in the whitelist template.
    globalSecurityGroupId String
    The ID of the IP whitelist template.
    id String
    The ID of the resource supplied above.
    regionId String
    The region ID of the resource.
    globalIpGroupName string
    The name of the IP whitelist template.
    globalIpList string
    The IP address in the whitelist template.
    globalSecurityGroupId string
    The ID of the IP whitelist template.
    id string
    The ID of the resource supplied above.
    regionId string
    The region ID of the resource.
    global_ip_group_name str
    The name of the IP whitelist template.
    global_ip_list str
    The IP address in the whitelist template.
    global_security_group_id str
    The ID of the IP whitelist template.
    id str
    The ID of the resource supplied above.
    region_id str
    The region ID of the resource.
    globalIpGroupName String
    The name of the IP whitelist template.
    globalIpList String
    The IP address in the whitelist template.
    globalSecurityGroupId String
    The ID of the IP whitelist template.
    id String
    The ID of the resource supplied above.
    regionId String
    The region ID of the resource.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo alicloud logo
    Viewing docs for Alibaba Cloud v3.106.0
    published on Monday, Aug 24, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial