1. Packages
  2. Ibm Provider
  3. API Docs
  4. PiNetworkAddressGroup
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.PiNetworkAddressGroup

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Create, update, and delete a network address group.

    Example Usage

    The following example creates a network address group.

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const networkAddressGroupInstance = new ibm.PiNetworkAddressGroup("networkAddressGroupInstance", {
        piCloudInstanceId: "<value of the cloud_instance_id>",
        piName: "name",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    network_address_group_instance = ibm.PiNetworkAddressGroup("networkAddressGroupInstance",
        pi_cloud_instance_id="<value of the cloud_instance_id>",
        pi_name="name")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewPiNetworkAddressGroup(ctx, "networkAddressGroupInstance", &ibm.PiNetworkAddressGroupArgs{
    			PiCloudInstanceId: pulumi.String("<value of the cloud_instance_id>"),
    			PiName:            pulumi.String("name"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var networkAddressGroupInstance = new Ibm.PiNetworkAddressGroup("networkAddressGroupInstance", new()
        {
            PiCloudInstanceId = "<value of the cloud_instance_id>",
            PiName = "name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.PiNetworkAddressGroup;
    import com.pulumi.ibm.PiNetworkAddressGroupArgs;
    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 networkAddressGroupInstance = new PiNetworkAddressGroup("networkAddressGroupInstance", PiNetworkAddressGroupArgs.builder()
                .piCloudInstanceId("<value of the cloud_instance_id>")
                .piName("name")
                .build());
    
        }
    }
    
    resources:
      networkAddressGroupInstance:
        type: ibm:PiNetworkAddressGroup
        properties:
          piCloudInstanceId: <value of the cloud_instance_id>
          piName: name
    

    Notes

    • Please find supported Regions for endpoints.
    • If a Power cloud instance is provisioned at lon04, The provider level attributes should be as follows:
      • region - lon
      • zone - lon04

    Example usage:

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    

    Example

    terraform import ibm_pi_network_address_group.example d7bec597-4726-451f-8a63-e62e6f19c32c/041b186b-9598-4cb9-bf70-966d7b9d1dc8
    

    Create PiNetworkAddressGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PiNetworkAddressGroup(name: string, args: PiNetworkAddressGroupArgs, opts?: CustomResourceOptions);
    @overload
    def PiNetworkAddressGroup(resource_name: str,
                              args: PiNetworkAddressGroupArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def PiNetworkAddressGroup(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              pi_cloud_instance_id: Optional[str] = None,
                              pi_name: Optional[str] = None,
                              members: Optional[Sequence[PiNetworkAddressGroupMemberArgs]] = None,
                              pi_network_address_group_id: Optional[str] = None,
                              pi_user_tags: Optional[Sequence[str]] = None,
                              timeouts: Optional[PiNetworkAddressGroupTimeoutsArgs] = None)
    func NewPiNetworkAddressGroup(ctx *Context, name string, args PiNetworkAddressGroupArgs, opts ...ResourceOption) (*PiNetworkAddressGroup, error)
    public PiNetworkAddressGroup(string name, PiNetworkAddressGroupArgs args, CustomResourceOptions? opts = null)
    public PiNetworkAddressGroup(String name, PiNetworkAddressGroupArgs args)
    public PiNetworkAddressGroup(String name, PiNetworkAddressGroupArgs args, CustomResourceOptions options)
    
    type: ibm:PiNetworkAddressGroup
    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 PiNetworkAddressGroupArgs
    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 PiNetworkAddressGroupArgs
    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 PiNetworkAddressGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PiNetworkAddressGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PiNetworkAddressGroupArgs
    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 piNetworkAddressGroupResource = new Ibm.PiNetworkAddressGroup("piNetworkAddressGroupResource", new()
    {
        PiCloudInstanceId = "string",
        PiName = "string",
        Members = new[]
        {
            new Ibm.Inputs.PiNetworkAddressGroupMemberArgs
            {
                Cidr = "string",
                Id = "string",
            },
        },
        PiNetworkAddressGroupId = "string",
        PiUserTags = new[]
        {
            "string",
        },
        Timeouts = new Ibm.Inputs.PiNetworkAddressGroupTimeoutsArgs
        {
            Delete = "string",
        },
    });
    
    example, err := ibm.NewPiNetworkAddressGroup(ctx, "piNetworkAddressGroupResource", &ibm.PiNetworkAddressGroupArgs{
    	PiCloudInstanceId: pulumi.String("string"),
    	PiName:            pulumi.String("string"),
    	Members: ibm.PiNetworkAddressGroupMemberTypeArray{
    		&ibm.PiNetworkAddressGroupMemberTypeArgs{
    			Cidr: pulumi.String("string"),
    			Id:   pulumi.String("string"),
    		},
    	},
    	PiNetworkAddressGroupId: pulumi.String("string"),
    	PiUserTags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeouts: &ibm.PiNetworkAddressGroupTimeoutsArgs{
    		Delete: pulumi.String("string"),
    	},
    })
    
    var piNetworkAddressGroupResource = new PiNetworkAddressGroup("piNetworkAddressGroupResource", PiNetworkAddressGroupArgs.builder()
        .piCloudInstanceId("string")
        .piName("string")
        .members(PiNetworkAddressGroupMemberArgs.builder()
            .cidr("string")
            .id("string")
            .build())
        .piNetworkAddressGroupId("string")
        .piUserTags("string")
        .timeouts(PiNetworkAddressGroupTimeoutsArgs.builder()
            .delete("string")
            .build())
        .build());
    
    pi_network_address_group_resource = ibm.PiNetworkAddressGroup("piNetworkAddressGroupResource",
        pi_cloud_instance_id="string",
        pi_name="string",
        members=[{
            "cidr": "string",
            "id": "string",
        }],
        pi_network_address_group_id="string",
        pi_user_tags=["string"],
        timeouts={
            "delete": "string",
        })
    
    const piNetworkAddressGroupResource = new ibm.PiNetworkAddressGroup("piNetworkAddressGroupResource", {
        piCloudInstanceId: "string",
        piName: "string",
        members: [{
            cidr: "string",
            id: "string",
        }],
        piNetworkAddressGroupId: "string",
        piUserTags: ["string"],
        timeouts: {
            "delete": "string",
        },
    });
    
    type: ibm:PiNetworkAddressGroup
    properties:
        members:
            - cidr: string
              id: string
        piCloudInstanceId: string
        piName: string
        piNetworkAddressGroupId: string
        piUserTags:
            - string
        timeouts:
            delete: string
    

    PiNetworkAddressGroup 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 PiNetworkAddressGroup resource accepts the following input properties:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiName string
    The name of the Network Address Group.
    Members List<PiNetworkAddressGroupMember>
    (List) The list of IP addresses in CIDR notation in the network address group.
    PiNetworkAddressGroupId string
    (String) The id of the network address group member IP addresses.
    PiUserTags List<string>
    List of user tags attached to the resource.
    Timeouts PiNetworkAddressGroupTimeouts
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiName string
    The name of the Network Address Group.
    Members []PiNetworkAddressGroupMemberTypeArgs
    (List) The list of IP addresses in CIDR notation in the network address group.
    PiNetworkAddressGroupId string
    (String) The id of the network address group member IP addresses.
    PiUserTags []string
    List of user tags attached to the resource.
    Timeouts PiNetworkAddressGroupTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piName String
    The name of the Network Address Group.
    members List<PiNetworkAddressGroupMember>
    (List) The list of IP addresses in CIDR notation in the network address group.
    piNetworkAddressGroupId String
    (String) The id of the network address group member IP addresses.
    piUserTags List<String>
    List of user tags attached to the resource.
    timeouts PiNetworkAddressGroupTimeouts
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piName string
    The name of the Network Address Group.
    members PiNetworkAddressGroupMember[]
    (List) The list of IP addresses in CIDR notation in the network address group.
    piNetworkAddressGroupId string
    (String) The id of the network address group member IP addresses.
    piUserTags string[]
    List of user tags attached to the resource.
    timeouts PiNetworkAddressGroupTimeouts
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_name str
    The name of the Network Address Group.
    members Sequence[PiNetworkAddressGroupMemberArgs]
    (List) The list of IP addresses in CIDR notation in the network address group.
    pi_network_address_group_id str
    (String) The id of the network address group member IP addresses.
    pi_user_tags Sequence[str]
    List of user tags attached to the resource.
    timeouts PiNetworkAddressGroupTimeoutsArgs
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piName String
    The name of the Network Address Group.
    members List<Property Map>
    (List) The list of IP addresses in CIDR notation in the network address group.
    piNetworkAddressGroupId String
    (String) The id of the network address group member IP addresses.
    piUserTags List<String>
    List of user tags attached to the resource.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PiNetworkAddressGroup resource produces the following output properties:

    Crn string
    (String) The network address group's crn.
    Id string
    The provider-assigned unique ID for this managed resource.
    NetworkAddressGroupId string
    (String) The unique identifier of the network address group.
    Crn string
    (String) The network address group's crn.
    Id string
    The provider-assigned unique ID for this managed resource.
    NetworkAddressGroupId string
    (String) The unique identifier of the network address group.
    crn String
    (String) The network address group's crn.
    id String
    The provider-assigned unique ID for this managed resource.
    networkAddressGroupId String
    (String) The unique identifier of the network address group.
    crn string
    (String) The network address group's crn.
    id string
    The provider-assigned unique ID for this managed resource.
    networkAddressGroupId string
    (String) The unique identifier of the network address group.
    crn str
    (String) The network address group's crn.
    id str
    The provider-assigned unique ID for this managed resource.
    network_address_group_id str
    (String) The unique identifier of the network address group.
    crn String
    (String) The network address group's crn.
    id String
    The provider-assigned unique ID for this managed resource.
    networkAddressGroupId String
    (String) The unique identifier of the network address group.

    Look up Existing PiNetworkAddressGroup Resource

    Get an existing PiNetworkAddressGroup 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?: PiNetworkAddressGroupState, opts?: CustomResourceOptions): PiNetworkAddressGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            crn: Optional[str] = None,
            members: Optional[Sequence[PiNetworkAddressGroupMemberArgs]] = None,
            network_address_group_id: Optional[str] = None,
            pi_cloud_instance_id: Optional[str] = None,
            pi_name: Optional[str] = None,
            pi_network_address_group_id: Optional[str] = None,
            pi_user_tags: Optional[Sequence[str]] = None,
            timeouts: Optional[PiNetworkAddressGroupTimeoutsArgs] = None) -> PiNetworkAddressGroup
    func GetPiNetworkAddressGroup(ctx *Context, name string, id IDInput, state *PiNetworkAddressGroupState, opts ...ResourceOption) (*PiNetworkAddressGroup, error)
    public static PiNetworkAddressGroup Get(string name, Input<string> id, PiNetworkAddressGroupState? state, CustomResourceOptions? opts = null)
    public static PiNetworkAddressGroup get(String name, Output<String> id, PiNetworkAddressGroupState state, CustomResourceOptions options)
    resources:  _:    type: ibm:PiNetworkAddressGroup    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.
    The following state arguments are supported:
    Crn string
    (String) The network address group's crn.
    Members List<PiNetworkAddressGroupMember>
    (List) The list of IP addresses in CIDR notation in the network address group.
    NetworkAddressGroupId string
    (String) The unique identifier of the network address group.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiName string
    The name of the Network Address Group.
    PiNetworkAddressGroupId string
    (String) The id of the network address group member IP addresses.
    PiUserTags List<string>
    List of user tags attached to the resource.
    Timeouts PiNetworkAddressGroupTimeouts
    Crn string
    (String) The network address group's crn.
    Members []PiNetworkAddressGroupMemberTypeArgs
    (List) The list of IP addresses in CIDR notation in the network address group.
    NetworkAddressGroupId string
    (String) The unique identifier of the network address group.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiName string
    The name of the Network Address Group.
    PiNetworkAddressGroupId string
    (String) The id of the network address group member IP addresses.
    PiUserTags []string
    List of user tags attached to the resource.
    Timeouts PiNetworkAddressGroupTimeoutsArgs
    crn String
    (String) The network address group's crn.
    members List<PiNetworkAddressGroupMember>
    (List) The list of IP addresses in CIDR notation in the network address group.
    networkAddressGroupId String
    (String) The unique identifier of the network address group.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piName String
    The name of the Network Address Group.
    piNetworkAddressGroupId String
    (String) The id of the network address group member IP addresses.
    piUserTags List<String>
    List of user tags attached to the resource.
    timeouts PiNetworkAddressGroupTimeouts
    crn string
    (String) The network address group's crn.
    members PiNetworkAddressGroupMember[]
    (List) The list of IP addresses in CIDR notation in the network address group.
    networkAddressGroupId string
    (String) The unique identifier of the network address group.
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piName string
    The name of the Network Address Group.
    piNetworkAddressGroupId string
    (String) The id of the network address group member IP addresses.
    piUserTags string[]
    List of user tags attached to the resource.
    timeouts PiNetworkAddressGroupTimeouts
    crn str
    (String) The network address group's crn.
    members Sequence[PiNetworkAddressGroupMemberArgs]
    (List) The list of IP addresses in CIDR notation in the network address group.
    network_address_group_id str
    (String) The unique identifier of the network address group.
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_name str
    The name of the Network Address Group.
    pi_network_address_group_id str
    (String) The id of the network address group member IP addresses.
    pi_user_tags Sequence[str]
    List of user tags attached to the resource.
    timeouts PiNetworkAddressGroupTimeoutsArgs
    crn String
    (String) The network address group's crn.
    members List<Property Map>
    (List) The list of IP addresses in CIDR notation in the network address group.
    networkAddressGroupId String
    (String) The unique identifier of the network address group.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piName String
    The name of the Network Address Group.
    piNetworkAddressGroupId String
    (String) The id of the network address group member IP addresses.
    piUserTags List<String>
    List of user tags attached to the resource.
    timeouts Property Map

    Supporting Types

    PiNetworkAddressGroupMember, PiNetworkAddressGroupMemberArgs

    Cidr string
    (String) The IP addresses in CIDR notation.
    Id string
    (String) The id of the network address group member IP addresses.
    Cidr string
    (String) The IP addresses in CIDR notation.
    Id string
    (String) The id of the network address group member IP addresses.
    cidr String
    (String) The IP addresses in CIDR notation.
    id String
    (String) The id of the network address group member IP addresses.
    cidr string
    (String) The IP addresses in CIDR notation.
    id string
    (String) The id of the network address group member IP addresses.
    cidr str
    (String) The IP addresses in CIDR notation.
    id str
    (String) The id of the network address group member IP addresses.
    cidr String
    (String) The IP addresses in CIDR notation.
    id String
    (String) The id of the network address group member IP addresses.

    PiNetworkAddressGroupTimeouts, PiNetworkAddressGroupTimeoutsArgs

    Delete string
    Delete string
    delete String
    delete string
    delete str
    delete String

    Import

    The ibm_pi_network_address_group resource can be imported by using cloud_instance_id and network_address_group_id.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud