Tailscale v0.17.4 published on Thursday, Oct 24, 2024 by Pulumi
tailscale.get4Via6
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as tailscale from "@pulumi/tailscale";
const example = tailscale.get4Via6({
site: 7,
cidr: "10.1.1.0/24",
});
import pulumi
import pulumi_tailscale as tailscale
example = tailscale.get4_via6(site=7,
cidr="10.1.1.0/24")
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, &tailscale.Get4Via6Args{
Site: 7,
Cidr: "10.1.1.0/24",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tailscale = Pulumi.Tailscale;
return await Deployment.RunAsync(() =>
{
var example = Tailscale.Get4Via6.Invoke(new()
{
Site = 7,
Cidr = "10.1.1.0/24",
});
});
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()
.site(7)
.cidr("10.1.1.0/24")
.build());
}
}
variables:
example:
fn::invoke:
Function: tailscale:get4Via6
Arguments:
site: 7
cidr: 10.1.1.0/24
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:
get4Via6 Result
The following output properties are available:
Package Details
- Repository
- tailscale pulumi/pulumi-tailscale
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
tailscale
Terraform Provider.