1. Packages
  2. Gcore Provider
  3. API Docs
  4. PortAllowedAddressPairs
gcore 0.31.1 published on Friday, Oct 24, 2025 by g-core

gcore.PortAllowedAddressPairs

Get Started
gcore logo
gcore 0.31.1 published on Friday, Oct 24, 2025 by g-core

    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.]’ in the current resource.

    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:

    PortId string
    ID of the port where allowed address pairs will be managed.
    AllowedAddressPairs List<PortAllowedAddressPairsAllowedAddressPair>
    List of allowed address pairs to associate with the port.
    PortAllowedAddressPairsId string
    The ID of this resource.
    ProjectId double
    Project ID in which the port exists.
    ProjectName string
    Project name in which the port exists.
    RegionId double
    Region ID where the port is located.
    RegionName string
    Region name where the port is located.
    PortId string
    ID of the port where allowed address pairs will be managed.
    AllowedAddressPairs []PortAllowedAddressPairsAllowedAddressPairArgs
    List of allowed address pairs to associate with the port.
    PortAllowedAddressPairsId string
    The ID of this resource.
    ProjectId float64
    Project ID in which the port exists.
    ProjectName string
    Project name in which the port exists.
    RegionId float64
    Region ID where the port is located.
    RegionName string
    Region name where the port is located.
    portId String
    ID of the port where allowed address pairs will be managed.
    allowedAddressPairs List<PortAllowedAddressPairsAllowedAddressPair>
    List of allowed address pairs to associate with the port.
    portAllowedAddressPairsId String
    The ID of this resource.
    projectId Double
    Project ID in which the port exists.
    projectName String
    Project name in which the port exists.
    regionId Double
    Region ID where the port is located.
    regionName String
    Region name where the port is located.
    portId string
    ID of the port where allowed address pairs will be managed.
    allowedAddressPairs PortAllowedAddressPairsAllowedAddressPair[]
    List of allowed address pairs to associate with the port.
    portAllowedAddressPairsId string
    The ID of this resource.
    projectId number
    Project ID in which the port exists.
    projectName string
    Project name in which the port exists.
    regionId number
    Region ID where the port is located.
    regionName string
    Region name where the port is located.
    port_id str
    ID of the port where allowed address pairs will be managed.
    allowed_address_pairs Sequence[PortAllowedAddressPairsAllowedAddressPairArgs]
    List of allowed address pairs to associate with the port.
    port_allowed_address_pairs_id str
    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.
    portId String
    ID of the port where allowed address pairs will be managed.
    allowedAddressPairs List<Property Map>
    List of allowed address pairs to associate with the port.
    portAllowedAddressPairsId String
    The ID of this resource.
    projectId Number
    Project ID in which the port exists.
    projectName String
    Project name in which the port exists.
    regionId Number
    Region ID where the port is located.
    regionName 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) -> PortAllowedAddressPairs
    func 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.
    The following state arguments are supported:
    AllowedAddressPairs List<PortAllowedAddressPairsAllowedAddressPair>
    List of allowed address pairs to associate with the port.
    PortAllowedAddressPairsId string
    The ID of this resource.
    PortId string
    ID of the port where allowed address pairs will be managed.
    ProjectId double
    Project ID in which the port exists.
    ProjectName string
    Project name in which the port exists.
    RegionId double
    Region ID where the port is located.
    RegionName string
    Region name where the port is located.
    AllowedAddressPairs []PortAllowedAddressPairsAllowedAddressPairArgs
    List of allowed address pairs to associate with the port.
    PortAllowedAddressPairsId string
    The ID of this resource.
    PortId string
    ID of the port where allowed address pairs will be managed.
    ProjectId float64
    Project ID in which the port exists.
    ProjectName string
    Project name in which the port exists.
    RegionId float64
    Region ID where the port is located.
    RegionName string
    Region name where the port is located.
    allowedAddressPairs List<PortAllowedAddressPairsAllowedAddressPair>
    List of allowed address pairs to associate with the port.
    portAllowedAddressPairsId String
    The ID of this resource.
    portId String
    ID of the port where allowed address pairs will be managed.
    projectId Double
    Project ID in which the port exists.
    projectName String
    Project name in which the port exists.
    regionId Double
    Region ID where the port is located.
    regionName String
    Region name where the port is located.
    allowedAddressPairs PortAllowedAddressPairsAllowedAddressPair[]
    List of allowed address pairs to associate with the port.
    portAllowedAddressPairsId string
    The ID of this resource.
    portId string
    ID of the port where allowed address pairs will be managed.
    projectId number
    Project ID in which the port exists.
    projectName string
    Project name in which the port exists.
    regionId number
    Region ID where the port is located.
    regionName string
    Region name where the port is located.
    allowed_address_pairs Sequence[PortAllowedAddressPairsAllowedAddressPairArgs]
    List of allowed address pairs to associate with the port.
    port_allowed_address_pairs_id str
    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.
    allowedAddressPairs List<Property Map>
    List of allowed address pairs to associate with the port.
    portAllowedAddressPairsId String
    The ID of this resource.
    portId String
    ID of the port where allowed address pairs will be managed.
    projectId Number
    Project ID in which the port exists.
    projectName String
    Project name in which the port exists.
    regionId Number
    Region ID where the port is located.
    regionName String
    Region name where the port is located.

    Supporting Types

    PortAllowedAddressPairsAllowedAddressPair, PortAllowedAddressPairsAllowedAddressPairArgs

    IpAddress string
    IP address or subnet of the allowed address pair (e.g., 192.0.2.10/32).
    MacAddress string
    MAC address of the allowed address pair. If omitted, port's MAC address will be used.
    IpAddress string
    IP address or subnet of the allowed address pair (e.g., 192.0.2.10/32).
    MacAddress string
    MAC address of the allowed address pair. If omitted, port's MAC address will be used.
    ipAddress String
    IP address or subnet of the allowed address pair (e.g., 192.0.2.10/32).
    macAddress String
    MAC address of the allowed address pair. If omitted, port's MAC address will be used.
    ipAddress string
    IP address or subnet of the allowed address pair (e.g., 192.0.2.10/32).
    macAddress 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.
    ipAddress String
    IP address or subnet of the allowed address pair (e.g., 192.0.2.10/32).
    macAddress 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 gcore Terraform Provider.
    gcore logo
    gcore 0.31.1 published on Friday, Oct 24, 2025 by g-core
      Meet Neo: Your AI Platform Teammate