Exoscale v0.62.7 published on Tuesday, Dec 10, 2024 by Pulumiverse
exoscale.getElasticIp
Explore with Pulumi AI
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)
public static Output<GetElasticIpResult> getElasticIp(GetElasticIpArgs args, InvokeOptions options)
fn::invoke:
  function: exoscale:index/getElasticIp:getElasticIp
  arguments:
    # arguments dictionaryThe following arguments are supported:
- zone str
- The Exocale Zone name.
- id str
- The Elastic IP (EIP) ID to match (conflicts with ip_addressandlabels).
- ip_address str
- The EIP IPv4 or IPv6 address to match (conflicts with idandlabels).
- labels Mapping[str, str]
- The EIP labels to match (conflicts with ip_addressandid).
getElasticIp Result
The following output properties are available:
- AddressFamily string
- The Elastic IP (EIP) address family (inet4orinet6).
- Cidr string
- The Elastic IP (EIP) CIDR.
- Description string
- The Elastic IP (EIP) description.
- Healthchecks
List<Pulumiverse.Exoscale. Outputs. Get Elastic Ip Healthcheck> 
- 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_addressandlabels).
- IpAddress string
- The EIP IPv4 or IPv6 address to match (conflicts with idandlabels).
- Labels Dictionary<string, string>
- The EIP labels to match (conflicts with ip_addressandid).
- AddressFamily string
- The Elastic IP (EIP) address family (inet4orinet6).
- Cidr string
- The Elastic IP (EIP) CIDR.
- Description string
- The Elastic IP (EIP) description.
- Healthchecks
[]GetElastic Ip Healthcheck 
- 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_addressandlabels).
- IpAddress string
- The EIP IPv4 or IPv6 address to match (conflicts with idandlabels).
- Labels map[string]string
- The EIP labels to match (conflicts with ip_addressandid).
- addressFamily String
- The Elastic IP (EIP) address family (inet4orinet6).
- cidr String
- The Elastic IP (EIP) CIDR.
- description String
- The Elastic IP (EIP) description.
- healthchecks
List<GetElastic Ip Healthcheck> 
- 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_addressandlabels).
- ipAddress String
- The EIP IPv4 or IPv6 address to match (conflicts with idandlabels).
- labels Map<String,String>
- The EIP labels to match (conflicts with ip_addressandid).
- addressFamily string
- The Elastic IP (EIP) address family (inet4orinet6).
- cidr string
- The Elastic IP (EIP) CIDR.
- description string
- The Elastic IP (EIP) description.
- healthchecks
GetElastic Ip Healthcheck[] 
- 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_addressandlabels).
- ipAddress string
- The EIP IPv4 or IPv6 address to match (conflicts with idandlabels).
- labels {[key: string]: string}
- The EIP labels to match (conflicts with ip_addressandid).
- address_family str
- The Elastic IP (EIP) address family (inet4orinet6).
- cidr str
- The Elastic IP (EIP) CIDR.
- description str
- The Elastic IP (EIP) description.
- healthchecks
Sequence[GetElastic Ip Healthcheck] 
- 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_addressandlabels).
- ip_address str
- The EIP IPv4 or IPv6 address to match (conflicts with idandlabels).
- labels Mapping[str, str]
- The EIP labels to match (conflicts with ip_addressandid).
- addressFamily String
- The Elastic IP (EIP) address family (inet4orinet6).
- 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_addressandlabels).
- ipAddress String
- The EIP IPv4 or IPv6 address to match (conflicts with idandlabels).
- labels Map<String>
- The EIP labels to match (conflicts with ip_addressandid).
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.
- TlsSkip boolVerify 
- Disable TLS certificate verification for healthcheck in httpsmode.
- TlsSni string
- The healthcheck server name to present with SNI in httpsmode.
- 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.
- TlsSkip boolVerify 
- Disable TLS certificate verification for healthcheck in httpsmode.
- TlsSni string
- The healthcheck server name to present with SNI in httpsmode.
- 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.
- tlsSkip BooleanVerify 
- Disable TLS certificate verification for healthcheck in httpsmode.
- tlsSni String
- The healthcheck server name to present with SNI in httpsmode.
- 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.
- tlsSkip booleanVerify 
- Disable TLS certificate verification for healthcheck in httpsmode.
- tlsSni string
- The healthcheck server name to present with SNI in httpsmode.
- 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_ boolverify 
- Disable TLS certificate verification for healthcheck in httpsmode.
- tls_sni str
- The healthcheck server name to present with SNI in httpsmode.
- 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.
- tlsSkip BooleanVerify 
- Disable TLS certificate verification for healthcheck in httpsmode.
- tlsSni String
- The healthcheck server name to present with SNI in httpsmode.
- uri String
- The healthcheck URI.
Package Details
- Repository
- exoscale pulumiverse/pulumi-exoscale
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the exoscaleTerraform Provider.