Show / Hide Table of Contents

Class GetAddress

Inheritance
System.Object
GetAddress
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Compute
Assembly: Pulumi.Gcp.dll
Syntax
public static class GetAddress

Methods

View Source

InvokeAsync(GetAddressArgs, InvokeOptions)

Get the IP address from a static address. For more information see the official API documentation.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var myAddress = Output.Create(Gcp.Compute.GetAddress.InvokeAsync(new Gcp.Compute.GetAddressArgs
    {
        Name = "foobar",
    }));
    var prod = new Gcp.Dns.ManagedZone("prod", new Gcp.Dns.ManagedZoneArgs
    {
        DnsName = "prod.mydomain.com.",
    });
    var frontend = new Gcp.Dns.RecordSet("frontend", new Gcp.Dns.RecordSetArgs
    {
        Type = "A",
        Ttl = 300,
        ManagedZone = prod.Name,
        Rrdatas = 
        {
            myAddress.Apply(myAddress => myAddress.Address),
        },
    });
}

}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetAddressResult> InvokeAsync(GetAddressArgs args, InvokeOptions options = null)
Parameters
Type Name Description
GetAddressArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetAddressResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.