Tailscale

v0.11.0 published on Tuesday, Aug 30, 2022 by Pulumi

get4Via6

The 4via6 data source is calculates an IPv6 prefix for a given site ID and IPv4 CIDR. See Tailscale documentation for 4via6 subnets for more details.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Tailscale = Pulumi.Tailscale;

return await Deployment.RunAsync(() => 
{
    var example = Tailscale.Get4Via6.Invoke(new()
    {
        Cidr = "10.1.1.0/24",
        Site = 7,
    });

});
package main

import (
	"github.com/pulumi/pulumi-tailscale/sdk/go/tailscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tailscale.Get4Via6(ctx, &Get4Via6Args{
			Cidr: "10.1.1.0/24",
			Site: 7,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tailscale.TailscaleFunctions;
import com.pulumi.tailscale.inputs.Get4Via6Args;
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 example = TailscaleFunctions.get4Via6(Get4Via6Args.builder()
            .cidr("10.1.1.0/24")
            .site(7)
            .build());

    }
}
import pulumi
import pulumi_tailscale as tailscale

example = tailscale.get4_via6(cidr="10.1.1.0/24",
    site=7)
import * as pulumi from "@pulumi/pulumi";
import * as tailscale from "@pulumi/tailscale";

const example = pulumi.output(tailscale.get4Via6({
    cidr: "10.1.1.0/24",
    site: 7,
}));
variables:
  example:
    Fn::Invoke:
      Function: tailscale:get4Via6
      Arguments:
        cidr: 10.1.1.0/24
        site: 7

Using get4Via6

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 get4Via6(args: Get4Via6Args, opts?: InvokeOptions): Promise<Get4Via6Result>
function get4Via6Output(args: Get4Via6OutputArgs, opts?: InvokeOptions): Output<Get4Via6Result>
def get4_via6(cidr: Optional[str] = None,
              site: Optional[int] = None,
              opts: Optional[InvokeOptions] = None) -> Get4Via6Result
def get4_via6_output(cidr: Optional[pulumi.Input[str]] = None,
              site: Optional[pulumi.Input[int]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[Get4Via6Result]
func Get4Via6(ctx *Context, args *Get4Via6Args, opts ...InvokeOption) (*Get4Via6Result, error)
func Get4Via6Output(ctx *Context, args *Get4Via6OutputArgs, opts ...InvokeOption) Get4Via6ResultOutput

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

public static class Get4Via6 
{
    public static Task<Get4Via6Result> InvokeAsync(Get4Via6Args args, InvokeOptions? opts = null)
    public static Output<Get4Via6Result> Invoke(Get4Via6InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<Get4Via6Result> get4Via6(Get4Via6Args args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: tailscale:index/get4Via6:get4Via6
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Cidr string

The IPv4 CIDR to map

Site int

Site ID (between 0 and 255)

Cidr string

The IPv4 CIDR to map

Site int

Site ID (between 0 and 255)

cidr String

The IPv4 CIDR to map

site Integer

Site ID (between 0 and 255)

cidr string

The IPv4 CIDR to map

site number

Site ID (between 0 and 255)

cidr str

The IPv4 CIDR to map

site int

Site ID (between 0 and 255)

cidr String

The IPv4 CIDR to map

site Number

Site ID (between 0 and 255)

get4Via6 Result

The following output properties are available:

Cidr string

The IPv4 CIDR to map

Id string

The provider-assigned unique ID for this managed resource.

Ipv6 string

The 4via6 mapped address

Site int

Site ID (between 0 and 255)

Cidr string

The IPv4 CIDR to map

Id string

The provider-assigned unique ID for this managed resource.

Ipv6 string

The 4via6 mapped address

Site int

Site ID (between 0 and 255)

cidr String

The IPv4 CIDR to map

id String

The provider-assigned unique ID for this managed resource.

ipv6 String

The 4via6 mapped address

site Integer

Site ID (between 0 and 255)

cidr string

The IPv4 CIDR to map

id string

The provider-assigned unique ID for this managed resource.

ipv6 string

The 4via6 mapped address

site number

Site ID (between 0 and 255)

cidr str

The IPv4 CIDR to map

id str

The provider-assigned unique ID for this managed resource.

ipv6 str

The 4via6 mapped address

site int

Site ID (between 0 and 255)

cidr String

The IPv4 CIDR to map

id String

The provider-assigned unique ID for this managed resource.

ipv6 String

The 4via6 mapped address

site Number

Site ID (between 0 and 255)

Package Details

Repository
https://github.com/pulumi/pulumi-tailscale
License
Apache-2.0
Notes

This Pulumi package is based on the tailscale Terraform Provider.