1. Packages
  2. Exoscale
  3. API Docs
  4. getElasticIp
Exoscale v0.59.2 published on Monday, Jul 22, 2024 by Pulumiverse

exoscale.getElasticIp

Explore with Pulumi AI

exoscale logo
Exoscale v0.59.2 published on Monday, Jul 22, 2024 by Pulumiverse

    Fetch Exoscale Elastic IPs (EIP) data.

    Corresponding resource: exoscale_elastic_ip.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as exoscale from "@pulumi/exoscale";
    
    const myElasticIp = exoscale.getElasticIp({
        zone: "ch-gva-2",
        ipAddress: "1.2.3.4",
    });
    export const myElasticIpId = myElasticIp.then(myElasticIp => myElasticIp.id);
    
    import pulumi
    import pulumi_exoscale as exoscale
    
    my_elastic_ip = exoscale.get_elastic_ip(zone="ch-gva-2",
        ip_address="1.2.3.4")
    pulumi.export("myElasticIpId", my_elastic_ip.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-exoscale/sdk/go/exoscale"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myElasticIp, err := exoscale.LookupElasticIp(ctx, &exoscale.LookupElasticIpArgs{
    			Zone:      "ch-gva-2",
    			IpAddress: pulumi.StringRef("1.2.3.4"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("myElasticIpId", myElasticIp.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Exoscale = Pulumi.Exoscale;
    
    return await Deployment.RunAsync(() => 
    {
        var myElasticIp = Exoscale.GetElasticIp.Invoke(new()
        {
            Zone = "ch-gva-2",
            IpAddress = "1.2.3.4",
        });
    
        return new Dictionary<string, object?>
        {
            ["myElasticIpId"] = myElasticIp.Apply(getElasticIpResult => getElasticIpResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.exoscale.ExoscaleFunctions;
    import com.pulumi.exoscale.inputs.GetElasticIpArgs;
    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 myElasticIp = ExoscaleFunctions.getElasticIp(GetElasticIpArgs.builder()
                .zone("ch-gva-2")
                .ipAddress("1.2.3.4")
                .build());
    
            ctx.export("myElasticIpId", myElasticIp.applyValue(getElasticIpResult -> getElasticIpResult.id()));
        }
    }
    
    variables:
      myElasticIp:
        fn::invoke:
          Function: exoscale:getElasticIp
          Arguments:
            zone: ch-gva-2
            ipAddress: 1.2.3.4
    outputs:
      myElasticIpId: ${myElasticIp.id}
    

    Please refer to the examples directory for complete configuration examples.

    Using getElasticIp

    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 getElasticIp(args: GetElasticIpArgs, opts?: InvokeOptions): Promise<GetElasticIpResult>
    function getElasticIpOutput(args: GetElasticIpOutputArgs, opts?: InvokeOptions): Output<GetElasticIpResult>
    def get_elastic_ip(id: Optional[str] = None,
                       ip_address: Optional[str] = None,
                       labels: Optional[Mapping[str, str]] = None,
                       zone: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetElasticIpResult
    def get_elastic_ip_output(id: Optional[pulumi.Input[str]] = None,
                       ip_address: Optional[pulumi.Input[str]] = None,
                       labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                       zone: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetElasticIpResult]
    func LookupElasticIp(ctx *Context, args *LookupElasticIpArgs, opts ...InvokeOption) (*LookupElasticIpResult, error)
    func LookupElasticIpOutput(ctx *Context, args *LookupElasticIpOutputArgs, opts ...InvokeOption) LookupElasticIpResultOutput

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

    public static class GetElasticIp 
    {
        public static Task<GetElasticIpResult> InvokeAsync(GetElasticIpArgs args, InvokeOptions? opts = null)
        public static Output<GetElasticIpResult> Invoke(GetElasticIpInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetElasticIpResult> getElasticIp(GetElasticIpArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: exoscale:index/getElasticIp:getElasticIp
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Zone string
    The Exocale Zone name.
    Id string
    The Elastic IP (EIP) ID to match (conflicts with ip_address and labels).
    IpAddress string
    The EIP IPv4 or IPv6 address to match (conflicts with id and labels).
    Labels Dictionary<string, string>
    The EIP labels to match (conflicts with ip_address and id).
    Zone string
    The Exocale Zone name.
    Id string
    The Elastic IP (EIP) ID to match (conflicts with ip_address and labels).
    IpAddress string
    The EIP IPv4 or IPv6 address to match (conflicts with id and labels).
    Labels map[string]string
    The EIP labels to match (conflicts with ip_address and id).
    zone String
    The Exocale Zone name.
    id String
    The Elastic IP (EIP) ID to match (conflicts with ip_address and labels).
    ipAddress String
    The EIP IPv4 or IPv6 address to match (conflicts with id and labels).
    labels Map<String,String>
    The EIP labels to match (conflicts with ip_address and id).
    zone string
    The Exocale Zone name.
    id string
    The Elastic IP (EIP) ID to match (conflicts with ip_address and labels).
    ipAddress string
    The EIP IPv4 or IPv6 address to match (conflicts with id and labels).
    labels {[key: string]: string}
    The EIP labels to match (conflicts with ip_address and id).
    zone str
    The Exocale Zone name.
    id str
    The Elastic IP (EIP) ID to match (conflicts with ip_address and labels).
    ip_address str
    The EIP IPv4 or IPv6 address to match (conflicts with id and labels).
    labels Mapping[str, str]
    The EIP labels to match (conflicts with ip_address and id).
    zone String
    The Exocale Zone name.
    id String
    The Elastic IP (EIP) ID to match (conflicts with ip_address and labels).
    ipAddress String
    The EIP IPv4 or IPv6 address to match (conflicts with id and labels).
    labels Map<String>
    The EIP labels to match (conflicts with ip_address and id).

    getElasticIp Result

    The following output properties are available:

    AddressFamily string
    The Elastic IP (EIP) address family (inet4 or inet6).
    Cidr string
    The Elastic IP (EIP) CIDR.
    Description string
    The Elastic IP (EIP) description.
    Healthchecks List<Pulumiverse.Exoscale.Outputs.GetElasticIpHealthcheck>
    The managed EIP healthcheck configuration.
    ReverseDns string
    Domain name for reverse DNS record.
    Zone string
    The Exocale Zone name.
    Id string
    The Elastic IP (EIP) ID to match (conflicts with ip_address and labels).
    IpAddress string
    The EIP IPv4 or IPv6 address to match (conflicts with id and labels).
    Labels Dictionary<string, string>
    The EIP labels to match (conflicts with ip_address and id).
    AddressFamily string
    The Elastic IP (EIP) address family (inet4 or inet6).
    Cidr string
    The Elastic IP (EIP) CIDR.
    Description string
    The Elastic IP (EIP) description.
    Healthchecks []GetElasticIpHealthcheck
    The managed EIP healthcheck configuration.
    ReverseDns string
    Domain name for reverse DNS record.
    Zone string
    The Exocale Zone name.
    Id string
    The Elastic IP (EIP) ID to match (conflicts with ip_address and labels).
    IpAddress string
    The EIP IPv4 or IPv6 address to match (conflicts with id and labels).
    Labels map[string]string
    The EIP labels to match (conflicts with ip_address and id).
    addressFamily String
    The Elastic IP (EIP) address family (inet4 or inet6).
    cidr String
    The Elastic IP (EIP) CIDR.
    description String
    The Elastic IP (EIP) description.
    healthchecks List<GetElasticIpHealthcheck>
    The managed EIP healthcheck configuration.
    reverseDns String
    Domain name for reverse DNS record.
    zone String
    The Exocale Zone name.
    id String
    The Elastic IP (EIP) ID to match (conflicts with ip_address and labels).
    ipAddress String
    The EIP IPv4 or IPv6 address to match (conflicts with id and labels).
    labels Map<String,String>
    The EIP labels to match (conflicts with ip_address and id).
    addressFamily string
    The Elastic IP (EIP) address family (inet4 or inet6).
    cidr string
    The Elastic IP (EIP) CIDR.
    description string
    The Elastic IP (EIP) description.
    healthchecks GetElasticIpHealthcheck[]
    The managed EIP healthcheck configuration.
    reverseDns string
    Domain name for reverse DNS record.
    zone string
    The Exocale Zone name.
    id string
    The Elastic IP (EIP) ID to match (conflicts with ip_address and labels).
    ipAddress string
    The EIP IPv4 or IPv6 address to match (conflicts with id and labels).
    labels {[key: string]: string}
    The EIP labels to match (conflicts with ip_address and id).
    address_family str
    The Elastic IP (EIP) address family (inet4 or inet6).
    cidr str
    The Elastic IP (EIP) CIDR.
    description str
    The Elastic IP (EIP) description.
    healthchecks Sequence[GetElasticIpHealthcheck]
    The managed EIP healthcheck configuration.
    reverse_dns str
    Domain name for reverse DNS record.
    zone str
    The Exocale Zone name.
    id str
    The Elastic IP (EIP) ID to match (conflicts with ip_address and labels).
    ip_address str
    The EIP IPv4 or IPv6 address to match (conflicts with id and labels).
    labels Mapping[str, str]
    The EIP labels to match (conflicts with ip_address and id).
    addressFamily String
    The Elastic IP (EIP) address family (inet4 or inet6).
    cidr String
    The Elastic IP (EIP) CIDR.
    description String
    The Elastic IP (EIP) description.
    healthchecks List<Property Map>
    The managed EIP healthcheck configuration.
    reverseDns String
    Domain name for reverse DNS record.
    zone String
    The Exocale Zone name.
    id String
    The Elastic IP (EIP) ID to match (conflicts with ip_address and labels).
    ipAddress String
    The EIP IPv4 or IPv6 address to match (conflicts with id and labels).
    labels Map<String>
    The EIP labels to match (conflicts with ip_address and id).

    Supporting Types

    GetElasticIpHealthcheck

    Interval int
    The healthcheck interval in seconds.
    Mode string
    The healthcheck mode.
    Port int
    The healthcheck target port.
    StrikesFail int
    The number of failed healthcheck attempts before considering the target unhealthy.
    StrikesOk int
    The number of successful healthcheck attempts before considering the target healthy.
    Timeout int
    The time in seconds before considering a healthcheck probing failed.
    TlsSkipVerify bool
    Disable TLS certificate verification for healthcheck in https mode.
    TlsSni string
    The healthcheck server name to present with SNI in https mode.
    Uri string
    The healthcheck URI.
    Interval int
    The healthcheck interval in seconds.
    Mode string
    The healthcheck mode.
    Port int
    The healthcheck target port.
    StrikesFail int
    The number of failed healthcheck attempts before considering the target unhealthy.
    StrikesOk int
    The number of successful healthcheck attempts before considering the target healthy.
    Timeout int
    The time in seconds before considering a healthcheck probing failed.
    TlsSkipVerify bool
    Disable TLS certificate verification for healthcheck in https mode.
    TlsSni string
    The healthcheck server name to present with SNI in https mode.
    Uri string
    The healthcheck URI.
    interval Integer
    The healthcheck interval in seconds.
    mode String
    The healthcheck mode.
    port Integer
    The healthcheck target port.
    strikesFail Integer
    The number of failed healthcheck attempts before considering the target unhealthy.
    strikesOk Integer
    The number of successful healthcheck attempts before considering the target healthy.
    timeout Integer
    The time in seconds before considering a healthcheck probing failed.
    tlsSkipVerify Boolean
    Disable TLS certificate verification for healthcheck in https mode.
    tlsSni String
    The healthcheck server name to present with SNI in https mode.
    uri String
    The healthcheck URI.
    interval number
    The healthcheck interval in seconds.
    mode string
    The healthcheck mode.
    port number
    The healthcheck target port.
    strikesFail number
    The number of failed healthcheck attempts before considering the target unhealthy.
    strikesOk number
    The number of successful healthcheck attempts before considering the target healthy.
    timeout number
    The time in seconds before considering a healthcheck probing failed.
    tlsSkipVerify boolean
    Disable TLS certificate verification for healthcheck in https mode.
    tlsSni string
    The healthcheck server name to present with SNI in https mode.
    uri string
    The healthcheck URI.
    interval int
    The healthcheck interval in seconds.
    mode str
    The healthcheck mode.
    port int
    The healthcheck target port.
    strikes_fail int
    The number of failed healthcheck attempts before considering the target unhealthy.
    strikes_ok int
    The number of successful healthcheck attempts before considering the target healthy.
    timeout int
    The time in seconds before considering a healthcheck probing failed.
    tls_skip_verify bool
    Disable TLS certificate verification for healthcheck in https mode.
    tls_sni str
    The healthcheck server name to present with SNI in https mode.
    uri str
    The healthcheck URI.
    interval Number
    The healthcheck interval in seconds.
    mode String
    The healthcheck mode.
    port Number
    The healthcheck target port.
    strikesFail Number
    The number of failed healthcheck attempts before considering the target unhealthy.
    strikesOk Number
    The number of successful healthcheck attempts before considering the target healthy.
    timeout Number
    The time in seconds before considering a healthcheck probing failed.
    tlsSkipVerify Boolean
    Disable TLS certificate verification for healthcheck in https mode.
    tlsSni String
    The healthcheck server name to present with SNI in https mode.
    uri String
    The healthcheck URI.

    Package Details

    Repository
    exoscale pulumiverse/pulumi-exoscale
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the exoscale Terraform Provider.
    exoscale logo
    Exoscale v0.59.2 published on Monday, Jul 22, 2024 by Pulumiverse