ibm.PiNetworkAddressGroup
Explore with Pulumi AI
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:
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Name string - The name of the Network Address Group.
- Members
List<Pi
Network Address Group Member> - (List) The list of IP addresses in CIDR notation in the network address group.
- Pi
Network stringAddress Group Id - (String) The id of the network address group member IP addresses.
- List<string>
- List of user tags attached to the resource.
- Timeouts
Pi
Network Address Group Timeouts
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Name string - The name of the Network Address Group.
- Members
[]Pi
Network Address Group Member Type Args - (List) The list of IP addresses in CIDR notation in the network address group.
- Pi
Network stringAddress Group Id - (String) The id of the network address group member IP addresses.
- []string
- List of user tags attached to the resource.
- Timeouts
Pi
Network Address Group Timeouts Args
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Name String - The name of the Network Address Group.
- members
List<Pi
Network Address Group Member> - (List) The list of IP addresses in CIDR notation in the network address group.
- pi
Network StringAddress Group Id - (String) The id of the network address group member IP addresses.
- List<String>
- List of user tags attached to the resource.
- timeouts
Pi
Network Address Group Timeouts
- pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- pi
Name string - The name of the Network Address Group.
- members
Pi
Network Address Group Member[] - (List) The list of IP addresses in CIDR notation in the network address group.
- pi
Network stringAddress Group Id - (String) The id of the network address group member IP addresses.
- string[]
- List of user tags attached to the resource.
- timeouts
Pi
Network Address Group Timeouts
- pi_
cloud_ strinstance_ id - The GUID of the service instance associated with an account.
- pi_
name str - The name of the Network Address Group.
- members
Sequence[Pi
Network Address Group Member Args] - (List) The list of IP addresses in CIDR notation in the network address group.
- pi_
network_ straddress_ group_ id - (String) The id of the network address group member IP addresses.
- Sequence[str]
- List of user tags attached to the resource.
- timeouts
Pi
Network Address Group Timeouts Args
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Name 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.
- pi
Network StringAddress Group Id - (String) The id of the network address group member IP addresses.
- 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.
- Network
Address stringGroup Id - (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.
- Network
Address stringGroup Id - (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.
- network
Address StringGroup Id - (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.
- network
Address stringGroup Id - (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_ strgroup_ id - (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.
- network
Address StringGroup Id - (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.
- Crn string
- (String) The network address group's crn.
- Members
List<Pi
Network Address Group Member> - (List) The list of IP addresses in CIDR notation in the network address group.
- Network
Address stringGroup Id - (String) The unique identifier of the network address group.
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Name string - The name of the Network Address Group.
- Pi
Network stringAddress Group Id - (String) The id of the network address group member IP addresses.
- List<string>
- List of user tags attached to the resource.
- Timeouts
Pi
Network Address Group Timeouts
- Crn string
- (String) The network address group's crn.
- Members
[]Pi
Network Address Group Member Type Args - (List) The list of IP addresses in CIDR notation in the network address group.
- Network
Address stringGroup Id - (String) The unique identifier of the network address group.
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Name string - The name of the Network Address Group.
- Pi
Network stringAddress Group Id - (String) The id of the network address group member IP addresses.
- []string
- List of user tags attached to the resource.
- Timeouts
Pi
Network Address Group Timeouts Args
- crn String
- (String) The network address group's crn.
- members
List<Pi
Network Address Group Member> - (List) The list of IP addresses in CIDR notation in the network address group.
- network
Address StringGroup Id - (String) The unique identifier of the network address group.
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Name String - The name of the Network Address Group.
- pi
Network StringAddress Group Id - (String) The id of the network address group member IP addresses.
- List<String>
- List of user tags attached to the resource.
- timeouts
Pi
Network Address Group Timeouts
- crn string
- (String) The network address group's crn.
- members
Pi
Network Address Group Member[] - (List) The list of IP addresses in CIDR notation in the network address group.
- network
Address stringGroup Id - (String) The unique identifier of the network address group.
- pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- pi
Name string - The name of the Network Address Group.
- pi
Network stringAddress Group Id - (String) The id of the network address group member IP addresses.
- string[]
- List of user tags attached to the resource.
- timeouts
Pi
Network Address Group Timeouts
- crn str
- (String) The network address group's crn.
- members
Sequence[Pi
Network Address Group Member Args] - (List) The list of IP addresses in CIDR notation in the network address group.
- network_
address_ strgroup_ id - (String) The unique identifier of the network address group.
- pi_
cloud_ strinstance_ id - The GUID of the service instance associated with an account.
- pi_
name str - The name of the Network Address Group.
- pi_
network_ straddress_ group_ id - (String) The id of the network address group member IP addresses.
- Sequence[str]
- List of user tags attached to the resource.
- timeouts
Pi
Network Address Group Timeouts Args
- 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.
- network
Address StringGroup Id - (String) The unique identifier of the network address group.
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Name String - The name of the Network Address Group.
- pi
Network StringAddress Group Id - (String) The id of the network address group member IP addresses.
- List<String>
- List of user tags attached to the resource.
- timeouts Property Map
Supporting Types
PiNetworkAddressGroupMember, PiNetworkAddressGroupMemberArgs
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.