Class ReservedIpBlock
Provides a resource to create and manage blocks of reserved IP addresses in a project.
When a user provisions first device in a facility, Packet API automatically allocates IPv6/56 and private IPv4/25 blocks. The new device then gets IPv6 and private IPv4 addresses from those block. It also gets a public IPv4/31 address. Every new device in the project and facility will automatically get IPv6 and private IPv4 addresses from these pre-allocated blocks. The IPv6 and private IPv4 blocks can't be created, only imported. With this resource, it's possible to create either public IPv4 blocks or global IPv4 blocks.
Public blocks are allocated in a facility. Addresses from public blocks can only be assigned to devices in the facility. Public blocks can have mask from /24 (256 addresses) to /32 (1 address). If you create public block with this resource, you must fill the facility argmument.
Addresses from global blocks can be assigned in any facility. Global blocks can have mask from /30 (4 addresses), to /32 (1 address). If you create global block with this resource, you must specify type = "global_ipv4" and you must omit the facility argument.
Once IP block is allocated or imported, an address from it can be assigned to device with the packet..IpAttachment resource.
Inherited Members
Namespace: Pulumi.Packet
Assembly: Pulumi.Packet.dll
Syntax
public class ReservedIpBlock : CustomResource
Constructors
View SourceReservedIpBlock(String, ReservedIpBlockArgs, CustomResourceOptions)
Create a ReservedIpBlock resource with the given unique name, arguments, and options.
Declaration
public ReservedIpBlock(string name, ReservedIpBlockArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ReservedIpBlockArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAddress
Declaration
public Output<string> Address { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AddressFamily
Address family as integer (4 or 6)
Declaration
public Output<int> AddressFamily { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Cidr
length of CIDR prefix of the block as integer
Declaration
public Output<int> Cidr { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
CidrNotation
Address and mask in CIDR notation, e.g. "147.229.15.30/31"
Declaration
public Output<string> CidrNotation { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
Arbitrary description
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Facility
Facility where to allocate the public IP address block, makes sense only for type==public_ipv4, must be empty for type==global_ipv4
Declaration
public Output<string> Facility { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Gateway
Declaration
public Output<string> Gateway { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Global
boolean flag whether addresses from a block are global (i.e. can be assigned in any facility)
Declaration
public Output<bool> Global { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Manageable
Declaration
public Output<bool> Manageable { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Management
Declaration
public Output<bool> Management { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Netmask
Mask in decimal notation, e.g. "255.255.255.0"
Declaration
public Output<string> Netmask { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Network
Network IP address portion of the block specification
Declaration
public Output<string> Network { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ProjectId
The packet project ID where to allocate the address block
Declaration
public Output<string> ProjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Public
boolean flag whether addresses from a block are public
Declaration
public Output<bool> Public { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Quantity
The number of allocated /32 addresses, a power of 2
Declaration
public Output<int> Quantity { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Type
Either "global_ipv4" or "public_ipv4", defaults to "public_ipv4" for backward compatibility
Declaration
public Output<string> Type { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ReservedIpBlockState, CustomResourceOptions)
Get an existing ReservedIpBlock resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ReservedIpBlock Get(string name, Input<string> id, ReservedIpBlockState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ReservedIpBlockState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ReservedIpBlock |