gcore.PortAllowedAddressPairs
Manages allowed address pairs for any private port attached to a Virtual Instance.
If the ‘port_id’ belongs to a ‘gcore_reservedfixedip’ resource, it is recommended to add
‘ignore_changes = [allowed_address_pairs]’ to the ‘gcore_reservedfixedip’ resource and include
‘depends_on = [gcore_instancev2.
This ensures that the allowed address pairs are configured only after the Reserved Fixed IP has been associated with the Virtual Instance.
Create PortAllowedAddressPairs Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PortAllowedAddressPairs(name: string, args: PortAllowedAddressPairsArgs, opts?: CustomResourceOptions);@overload
def PortAllowedAddressPairs(resource_name: str,
args: PortAllowedAddressPairsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PortAllowedAddressPairs(resource_name: str,
opts: Optional[ResourceOptions] = None,
port_id: Optional[str] = None,
allowed_address_pairs: Optional[Sequence[PortAllowedAddressPairsAllowedAddressPairArgs]] = None,
port_allowed_address_pairs_id: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
region_id: Optional[float] = None,
region_name: Optional[str] = None)func NewPortAllowedAddressPairs(ctx *Context, name string, args PortAllowedAddressPairsArgs, opts ...ResourceOption) (*PortAllowedAddressPairs, error)public PortAllowedAddressPairs(string name, PortAllowedAddressPairsArgs args, CustomResourceOptions? opts = null)
public PortAllowedAddressPairs(String name, PortAllowedAddressPairsArgs args)
public PortAllowedAddressPairs(String name, PortAllowedAddressPairsArgs args, CustomResourceOptions options)
type: gcore:PortAllowedAddressPairs
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 PortAllowedAddressPairsArgs
- 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 PortAllowedAddressPairsArgs
- 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 PortAllowedAddressPairsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PortAllowedAddressPairsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PortAllowedAddressPairsArgs
- 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 portAllowedAddressPairsResource = new Gcore.PortAllowedAddressPairs("portAllowedAddressPairsResource", new()
{
PortId = "string",
AllowedAddressPairs = new[]
{
new Gcore.Inputs.PortAllowedAddressPairsAllowedAddressPairArgs
{
IpAddress = "string",
MacAddress = "string",
},
},
PortAllowedAddressPairsId = "string",
ProjectId = 0,
ProjectName = "string",
RegionId = 0,
RegionName = "string",
});
example, err := gcore.NewPortAllowedAddressPairs(ctx, "portAllowedAddressPairsResource", &gcore.PortAllowedAddressPairsArgs{
PortId: pulumi.String("string"),
AllowedAddressPairs: gcore.PortAllowedAddressPairsAllowedAddressPairArray{
&gcore.PortAllowedAddressPairsAllowedAddressPairArgs{
IpAddress: pulumi.String("string"),
MacAddress: pulumi.String("string"),
},
},
PortAllowedAddressPairsId: pulumi.String("string"),
ProjectId: pulumi.Float64(0),
ProjectName: pulumi.String("string"),
RegionId: pulumi.Float64(0),
RegionName: pulumi.String("string"),
})
var portAllowedAddressPairsResource = new PortAllowedAddressPairs("portAllowedAddressPairsResource", PortAllowedAddressPairsArgs.builder()
.portId("string")
.allowedAddressPairs(PortAllowedAddressPairsAllowedAddressPairArgs.builder()
.ipAddress("string")
.macAddress("string")
.build())
.portAllowedAddressPairsId("string")
.projectId(0.0)
.projectName("string")
.regionId(0.0)
.regionName("string")
.build());
port_allowed_address_pairs_resource = gcore.PortAllowedAddressPairs("portAllowedAddressPairsResource",
port_id="string",
allowed_address_pairs=[{
"ip_address": "string",
"mac_address": "string",
}],
port_allowed_address_pairs_id="string",
project_id=0,
project_name="string",
region_id=0,
region_name="string")
const portAllowedAddressPairsResource = new gcore.PortAllowedAddressPairs("portAllowedAddressPairsResource", {
portId: "string",
allowedAddressPairs: [{
ipAddress: "string",
macAddress: "string",
}],
portAllowedAddressPairsId: "string",
projectId: 0,
projectName: "string",
regionId: 0,
regionName: "string",
});
type: gcore:PortAllowedAddressPairs
properties:
allowedAddressPairs:
- ipAddress: string
macAddress: string
portAllowedAddressPairsId: string
portId: string
projectId: 0
projectName: string
regionId: 0
regionName: string
PortAllowedAddressPairs 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 PortAllowedAddressPairs resource accepts the following input properties:
- Port
Id string - ID of the port where allowed address pairs will be managed.
- Allowed
Address List<PortPairs Allowed Address Pairs Allowed Address Pair> - List of allowed address pairs to associate with the port.
- Port
Allowed stringAddress Pairs Id - The ID of this resource.
- Project
Id double - Project ID in which the port exists.
- Project
Name string - Project name in which the port exists.
- Region
Id double - Region ID where the port is located.
- Region
Name string - Region name where the port is located.
- Port
Id string - ID of the port where allowed address pairs will be managed.
- Allowed
Address []PortPairs Allowed Address Pairs Allowed Address Pair Args - List of allowed address pairs to associate with the port.
- Port
Allowed stringAddress Pairs Id - The ID of this resource.
- Project
Id float64 - Project ID in which the port exists.
- Project
Name string - Project name in which the port exists.
- Region
Id float64 - Region ID where the port is located.
- Region
Name string - Region name where the port is located.
- port
Id String - ID of the port where allowed address pairs will be managed.
- allowed
Address List<PortPairs Allowed Address Pairs Allowed Address Pair> - List of allowed address pairs to associate with the port.
- port
Allowed StringAddress Pairs Id - The ID of this resource.
- project
Id Double - Project ID in which the port exists.
- project
Name String - Project name in which the port exists.
- region
Id Double - Region ID where the port is located.
- region
Name String - Region name where the port is located.
- port
Id string - ID of the port where allowed address pairs will be managed.
- allowed
Address PortPairs Allowed Address Pairs Allowed Address Pair[] - List of allowed address pairs to associate with the port.
- port
Allowed stringAddress Pairs Id - The ID of this resource.
- project
Id number - Project ID in which the port exists.
- project
Name string - Project name in which the port exists.
- region
Id number - Region ID where the port is located.
- region
Name string - Region name where the port is located.
- port_
id str - ID of the port where allowed address pairs will be managed.
- allowed_
address_ Sequence[Portpairs Allowed Address Pairs Allowed Address Pair Args] - List of allowed address pairs to associate with the port.
- port_
allowed_ straddress_ pairs_ id - The ID of this resource.
- project_
id float - Project ID in which the port exists.
- project_
name str - Project name in which the port exists.
- region_
id float - Region ID where the port is located.
- region_
name str - Region name where the port is located.
- port
Id String - ID of the port where allowed address pairs will be managed.
- allowed
Address List<Property Map>Pairs - List of allowed address pairs to associate with the port.
- port
Allowed StringAddress Pairs Id - The ID of this resource.
- project
Id Number - Project ID in which the port exists.
- project
Name String - Project name in which the port exists.
- region
Id Number - Region ID where the port is located.
- region
Name String - Region name where the port is located.
Outputs
All input properties are implicitly available as output properties. Additionally, the PortAllowedAddressPairs resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PortAllowedAddressPairs Resource
Get an existing PortAllowedAddressPairs 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?: PortAllowedAddressPairsState, opts?: CustomResourceOptions): PortAllowedAddressPairs@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allowed_address_pairs: Optional[Sequence[PortAllowedAddressPairsAllowedAddressPairArgs]] = None,
port_allowed_address_pairs_id: Optional[str] = None,
port_id: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
region_id: Optional[float] = None,
region_name: Optional[str] = None) -> PortAllowedAddressPairsfunc GetPortAllowedAddressPairs(ctx *Context, name string, id IDInput, state *PortAllowedAddressPairsState, opts ...ResourceOption) (*PortAllowedAddressPairs, error)public static PortAllowedAddressPairs Get(string name, Input<string> id, PortAllowedAddressPairsState? state, CustomResourceOptions? opts = null)public static PortAllowedAddressPairs get(String name, Output<String> id, PortAllowedAddressPairsState state, CustomResourceOptions options)resources: _: type: gcore:PortAllowedAddressPairs 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.
- Allowed
Address List<PortPairs Allowed Address Pairs Allowed Address Pair> - List of allowed address pairs to associate with the port.
- Port
Allowed stringAddress Pairs Id - The ID of this resource.
- Port
Id string - ID of the port where allowed address pairs will be managed.
- Project
Id double - Project ID in which the port exists.
- Project
Name string - Project name in which the port exists.
- Region
Id double - Region ID where the port is located.
- Region
Name string - Region name where the port is located.
- Allowed
Address []PortPairs Allowed Address Pairs Allowed Address Pair Args - List of allowed address pairs to associate with the port.
- Port
Allowed stringAddress Pairs Id - The ID of this resource.
- Port
Id string - ID of the port where allowed address pairs will be managed.
- Project
Id float64 - Project ID in which the port exists.
- Project
Name string - Project name in which the port exists.
- Region
Id float64 - Region ID where the port is located.
- Region
Name string - Region name where the port is located.
- allowed
Address List<PortPairs Allowed Address Pairs Allowed Address Pair> - List of allowed address pairs to associate with the port.
- port
Allowed StringAddress Pairs Id - The ID of this resource.
- port
Id String - ID of the port where allowed address pairs will be managed.
- project
Id Double - Project ID in which the port exists.
- project
Name String - Project name in which the port exists.
- region
Id Double - Region ID where the port is located.
- region
Name String - Region name where the port is located.
- allowed
Address PortPairs Allowed Address Pairs Allowed Address Pair[] - List of allowed address pairs to associate with the port.
- port
Allowed stringAddress Pairs Id - The ID of this resource.
- port
Id string - ID of the port where allowed address pairs will be managed.
- project
Id number - Project ID in which the port exists.
- project
Name string - Project name in which the port exists.
- region
Id number - Region ID where the port is located.
- region
Name string - Region name where the port is located.
- allowed_
address_ Sequence[Portpairs Allowed Address Pairs Allowed Address Pair Args] - List of allowed address pairs to associate with the port.
- port_
allowed_ straddress_ pairs_ id - The ID of this resource.
- port_
id str - ID of the port where allowed address pairs will be managed.
- project_
id float - Project ID in which the port exists.
- project_
name str - Project name in which the port exists.
- region_
id float - Region ID where the port is located.
- region_
name str - Region name where the port is located.
- allowed
Address List<Property Map>Pairs - List of allowed address pairs to associate with the port.
- port
Allowed StringAddress Pairs Id - The ID of this resource.
- port
Id String - ID of the port where allowed address pairs will be managed.
- project
Id Number - Project ID in which the port exists.
- project
Name String - Project name in which the port exists.
- region
Id Number - Region ID where the port is located.
- region
Name String - Region name where the port is located.
Supporting Types
PortAllowedAddressPairsAllowedAddressPair, PortAllowedAddressPairsAllowedAddressPairArgs
- Ip
Address string - IP address or subnet of the allowed address pair (e.g., 192.0.2.10/32).
- Mac
Address string - MAC address of the allowed address pair. If omitted, port's MAC address will be used.
- Ip
Address string - IP address or subnet of the allowed address pair (e.g., 192.0.2.10/32).
- Mac
Address string - MAC address of the allowed address pair. If omitted, port's MAC address will be used.
- ip
Address String - IP address or subnet of the allowed address pair (e.g., 192.0.2.10/32).
- mac
Address String - MAC address of the allowed address pair. If omitted, port's MAC address will be used.
- ip
Address string - IP address or subnet of the allowed address pair (e.g., 192.0.2.10/32).
- mac
Address string - MAC address of the allowed address pair. If omitted, port's MAC address will be used.
- ip_
address str - IP address or subnet of the allowed address pair (e.g., 192.0.2.10/32).
- mac_
address str - MAC address of the allowed address pair. If omitted, port's MAC address will be used.
- ip
Address String - IP address or subnet of the allowed address pair (e.g., 192.0.2.10/32).
- mac
Address String - MAC address of the allowed address pair. If omitted, port's MAC address will be used.
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcoreTerraform Provider.
