1. Packages
  2. Gcore Provider
  3. API Docs
  4. getReservedfixedip
gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core

gcore.getReservedfixedip

Explore with Pulumi AI

gcore logo
gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core

    Represent reserved ips

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const pr = gcore.getProject({
        name: "test",
    });
    const rg = gcore.getRegion({
        name: "ED-10 Preprod",
    });
    const ip = Promise.all([rg, pr]).then(([rg, pr]) => gcore.getReservedfixedip({
        fixedIpAddress: "192.168.0.66",
        regionId: rg.id,
        projectId: pr.id,
    }));
    export const view = ip;
    
    import pulumi
    import pulumi_gcore as gcore
    
    pr = gcore.get_project(name="test")
    rg = gcore.get_region(name="ED-10 Preprod")
    ip = gcore.get_reservedfixedip(fixed_ip_address="192.168.0.66",
        region_id=rg.id,
        project_id=pr.id)
    pulumi.export("view", ip)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		pr, err := gcore.GetProject(ctx, &gcore.GetProjectArgs{
    			Name: "test",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		rg, err := gcore.GetRegion(ctx, &gcore.GetRegionArgs{
    			Name: "ED-10 Preprod",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ip, err := gcore.LookupReservedfixedip(ctx, &gcore.LookupReservedfixedipArgs{
    			FixedIpAddress: "192.168.0.66",
    			RegionId:       pulumi.Float64Ref(rg.Id),
    			ProjectId:      pulumi.Float64Ref(pr.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("view", ip)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var pr = Gcore.GetProject.Invoke(new()
        {
            Name = "test",
        });
    
        var rg = Gcore.GetRegion.Invoke(new()
        {
            Name = "ED-10 Preprod",
        });
    
        var ip = Gcore.GetReservedfixedip.Invoke(new()
        {
            FixedIpAddress = "192.168.0.66",
            RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
            ProjectId = pr.Apply(getProjectResult => getProjectResult.Id),
        });
    
        return new Dictionary<string, object?>
        {
            ["view"] = ip,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.GcoreFunctions;
    import com.pulumi.gcore.inputs.GetProjectArgs;
    import com.pulumi.gcore.inputs.GetRegionArgs;
    import com.pulumi.gcore.inputs.GetReservedfixedipArgs;
    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) {
            final var pr = GcoreFunctions.getProject(GetProjectArgs.builder()
                .name("test")
                .build());
    
            final var rg = GcoreFunctions.getRegion(GetRegionArgs.builder()
                .name("ED-10 Preprod")
                .build());
    
            final var ip = GcoreFunctions.getReservedfixedip(GetReservedfixedipArgs.builder()
                .fixedIpAddress("192.168.0.66")
                .regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
                .projectId(pr.applyValue(getProjectResult -> getProjectResult.id()))
                .build());
    
            ctx.export("view", ip.applyValue(getReservedfixedipResult -> getReservedfixedipResult));
        }
    }
    
    variables:
      pr:
        fn::invoke:
          function: gcore:getProject
          arguments:
            name: test
      rg:
        fn::invoke:
          function: gcore:getRegion
          arguments:
            name: ED-10 Preprod
      ip:
        fn::invoke:
          function: gcore:getReservedfixedip
          arguments:
            fixedIpAddress: 192.168.0.66
            regionId: ${rg.id}
            projectId: ${pr.id}
    outputs:
      view: ${ip}
    

    Using getReservedfixedip

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getReservedfixedip(args: GetReservedfixedipArgs, opts?: InvokeOptions): Promise<GetReservedfixedipResult>
    function getReservedfixedipOutput(args: GetReservedfixedipOutputArgs, opts?: InvokeOptions): Output<GetReservedfixedipResult>
    def get_reservedfixedip(fixed_ip_address: Optional[str] = None,
                            id: Optional[str] = None,
                            project_id: Optional[float] = None,
                            project_name: Optional[str] = None,
                            region_id: Optional[float] = None,
                            region_name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetReservedfixedipResult
    def get_reservedfixedip_output(fixed_ip_address: Optional[pulumi.Input[str]] = None,
                            id: Optional[pulumi.Input[str]] = None,
                            project_id: Optional[pulumi.Input[float]] = None,
                            project_name: Optional[pulumi.Input[str]] = None,
                            region_id: Optional[pulumi.Input[float]] = None,
                            region_name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetReservedfixedipResult]
    func LookupReservedfixedip(ctx *Context, args *LookupReservedfixedipArgs, opts ...InvokeOption) (*LookupReservedfixedipResult, error)
    func LookupReservedfixedipOutput(ctx *Context, args *LookupReservedfixedipOutputArgs, opts ...InvokeOption) LookupReservedfixedipResultOutput

    > Note: This function is named LookupReservedfixedip in the Go SDK.

    public static class GetReservedfixedip 
    {
        public static Task<GetReservedfixedipResult> InvokeAsync(GetReservedfixedipArgs args, InvokeOptions? opts = null)
        public static Output<GetReservedfixedipResult> Invoke(GetReservedfixedipInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetReservedfixedipResult> getReservedfixedip(GetReservedfixedipArgs args, InvokeOptions options)
    public static Output<GetReservedfixedipResult> getReservedfixedip(GetReservedfixedipArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcore:index/getReservedfixedip:getReservedfixedip
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FixedIpAddress string
    Id string
    The ID of this resource.
    ProjectId double
    ProjectName string
    RegionId double
    RegionName string
    FixedIpAddress string
    Id string
    The ID of this resource.
    ProjectId float64
    ProjectName string
    RegionId float64
    RegionName string
    fixedIpAddress String
    id String
    The ID of this resource.
    projectId Double
    projectName String
    regionId Double
    regionName String
    fixedIpAddress string
    id string
    The ID of this resource.
    projectId number
    projectName string
    regionId number
    regionName string
    fixed_ip_address str
    id str
    The ID of this resource.
    project_id float
    project_name str
    region_id float
    region_name str
    fixedIpAddress String
    id String
    The ID of this resource.
    projectId Number
    projectName String
    regionId Number
    regionName String

    getReservedfixedip Result

    The following output properties are available:

    AllowedAddressPairs List<GetReservedfixedipAllowedAddressPair>
    FixedIpAddress string
    FixedIpv6Address string
    Id string
    The ID of this resource.
    IsVip bool
    NetworkId string
    PortId string
    ID of the port_id underlying the reserved fixed IP
    Status string
    SubnetId string
    SubnetV6Id string
    ProjectId double
    ProjectName string
    RegionId double
    RegionName string
    AllowedAddressPairs []GetReservedfixedipAllowedAddressPair
    FixedIpAddress string
    FixedIpv6Address string
    Id string
    The ID of this resource.
    IsVip bool
    NetworkId string
    PortId string
    ID of the port_id underlying the reserved fixed IP
    Status string
    SubnetId string
    SubnetV6Id string
    ProjectId float64
    ProjectName string
    RegionId float64
    RegionName string
    allowedAddressPairs List<GetReservedfixedipAllowedAddressPair>
    fixedIpAddress String
    fixedIpv6Address String
    id String
    The ID of this resource.
    isVip Boolean
    networkId String
    portId String
    ID of the port_id underlying the reserved fixed IP
    status String
    subnetId String
    subnetV6Id String
    projectId Double
    projectName String
    regionId Double
    regionName String
    allowedAddressPairs GetReservedfixedipAllowedAddressPair[]
    fixedIpAddress string
    fixedIpv6Address string
    id string
    The ID of this resource.
    isVip boolean
    networkId string
    portId string
    ID of the port_id underlying the reserved fixed IP
    status string
    subnetId string
    subnetV6Id string
    projectId number
    projectName string
    regionId number
    regionName string
    allowed_address_pairs Sequence[GetReservedfixedipAllowedAddressPair]
    fixed_ip_address str
    fixed_ipv6_address str
    id str
    The ID of this resource.
    is_vip bool
    network_id str
    port_id str
    ID of the port_id underlying the reserved fixed IP
    status str
    subnet_id str
    subnet_v6_id str
    project_id float
    project_name str
    region_id float
    region_name str
    allowedAddressPairs List<Property Map>
    fixedIpAddress String
    fixedIpv6Address String
    id String
    The ID of this resource.
    isVip Boolean
    networkId String
    portId String
    ID of the port_id underlying the reserved fixed IP
    status String
    subnetId String
    subnetV6Id String
    projectId Number
    projectName String
    regionId Number
    regionName String

    Supporting Types

    GetReservedfixedipAllowedAddressPair

    IpAddress string
    MacAddress string
    IpAddress string
    MacAddress string
    ipAddress String
    macAddress String
    ipAddress string
    macAddress string
    ipAddress String
    macAddress String

    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.22.0 published on Wednesday, Apr 30, 2025 by g-core