coder 2.4.0-pre1 published on Tuesday, Apr 15, 2025 by coder
coder.getProvisioner
Explore with Pulumi AI
Use this data source to get information about the Coder provisioner.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as coder from "@pulumi/coder";
const devProvisioner = coder.getProvisioner({});
const devWorkspace = coder.getWorkspace({});
const main = new coder.Agent("main", {
arch: devProvisioner.then(devProvisioner => devProvisioner.arch),
os: devProvisioner.then(devProvisioner => devProvisioner.os),
dir: "/workspace",
displayApps: {
vscode: true,
vscodeInsiders: false,
webTerminal: true,
sshHelper: false,
},
});
import pulumi
import pulumi_coder as coder
dev_provisioner = coder.get_provisioner()
dev_workspace = coder.get_workspace()
main = coder.Agent("main",
arch=dev_provisioner.arch,
os=dev_provisioner.os,
dir="/workspace",
display_apps={
"vscode": True,
"vscode_insiders": False,
"web_terminal": True,
"ssh_helper": False,
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/coder/v2/coder"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
devProvisioner, err := coder.GetProvisioner(ctx, &coder.GetProvisionerArgs{}, nil)
if err != nil {
return err
}
_, err = coder.GetWorkspace(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
_, err = coder.NewAgent(ctx, "main", &coder.AgentArgs{
Arch: pulumi.String(devProvisioner.Arch),
Os: pulumi.String(devProvisioner.Os),
Dir: pulumi.String("/workspace"),
DisplayApps: &coder.AgentDisplayAppsArgs{
Vscode: pulumi.Bool(true),
VscodeInsiders: pulumi.Bool(false),
WebTerminal: pulumi.Bool(true),
SshHelper: pulumi.Bool(false),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Coder = Pulumi.Coder;
return await Deployment.RunAsync(() =>
{
var devProvisioner = Coder.GetProvisioner.Invoke();
var devWorkspace = Coder.GetWorkspace.Invoke();
var main = new Coder.Agent("main", new()
{
Arch = devProvisioner.Apply(getProvisionerResult => getProvisionerResult.Arch),
Os = devProvisioner.Apply(getProvisionerResult => getProvisionerResult.Os),
Dir = "/workspace",
DisplayApps = new Coder.Inputs.AgentDisplayAppsArgs
{
Vscode = true,
VscodeInsiders = false,
WebTerminal = true,
SshHelper = false,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.coder.CoderFunctions;
import com.pulumi.coder.inputs.GetProvisionerArgs;
import com.pulumi.coder.Agent;
import com.pulumi.coder.AgentArgs;
import com.pulumi.coder.inputs.AgentDisplayAppsArgs;
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 devProvisioner = CoderFunctions.getProvisioner();
final var devWorkspace = CoderFunctions.getWorkspace();
var main = new Agent("main", AgentArgs.builder()
.arch(devProvisioner.applyValue(getProvisionerResult -> getProvisionerResult.arch()))
.os(devProvisioner.applyValue(getProvisionerResult -> getProvisionerResult.os()))
.dir("/workspace")
.displayApps(AgentDisplayAppsArgs.builder()
.vscode(true)
.vscodeInsiders(false)
.webTerminal(true)
.sshHelper(false)
.build())
.build());
}
}
resources:
main:
type: coder:Agent
properties:
arch: ${devProvisioner.arch}
os: ${devProvisioner.os}
dir: /workspace
displayApps:
vscode: true
vscodeInsiders: false
webTerminal: true
sshHelper: false
variables:
devProvisioner:
fn::invoke:
function: coder:getProvisioner
arguments: {}
devWorkspace:
fn::invoke:
function: coder:getWorkspace
arguments: {}
Using getProvisioner
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 getProvisioner(args: GetProvisionerArgs, opts?: InvokeOptions): Promise<GetProvisionerResult>
function getProvisionerOutput(args: GetProvisionerOutputArgs, opts?: InvokeOptions): Output<GetProvisionerResult>
def get_provisioner(id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetProvisionerResult
def get_provisioner_output(id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetProvisionerResult]
func GetProvisioner(ctx *Context, args *GetProvisionerArgs, opts ...InvokeOption) (*GetProvisionerResult, error)
func GetProvisionerOutput(ctx *Context, args *GetProvisionerOutputArgs, opts ...InvokeOption) GetProvisionerResultOutput
> Note: This function is named GetProvisioner
in the Go SDK.
public static class GetProvisioner
{
public static Task<GetProvisionerResult> InvokeAsync(GetProvisionerArgs args, InvokeOptions? opts = null)
public static Output<GetProvisionerResult> Invoke(GetProvisionerInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProvisionerResult> getProvisioner(GetProvisionerArgs args, InvokeOptions options)
public static Output<GetProvisionerResult> getProvisioner(GetProvisionerArgs args, InvokeOptions options)
fn::invoke:
function: coder:index/getProvisioner:getProvisioner
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- The ID of this resource.
- Id string
- The ID of this resource.
- id String
- The ID of this resource.
- id string
- The ID of this resource.
- id str
- The ID of this resource.
- id String
- The ID of this resource.
getProvisioner Result
The following output properties are available:
- Arch string
- The architecture of the host. This exposes
runtime.GOARCH
(see Go constants). - Id string
- The ID of this resource.
- Os string
- The operating system of the host. This exposes
runtime.GOOS
(see Go constants).
- Arch string
- The architecture of the host. This exposes
runtime.GOARCH
(see Go constants). - Id string
- The ID of this resource.
- Os string
- The operating system of the host. This exposes
runtime.GOOS
(see Go constants).
- arch String
- The architecture of the host. This exposes
runtime.GOARCH
(see Go constants). - id String
- The ID of this resource.
- os String
- The operating system of the host. This exposes
runtime.GOOS
(see Go constants).
- arch string
- The architecture of the host. This exposes
runtime.GOARCH
(see Go constants). - id string
- The ID of this resource.
- os string
- The operating system of the host. This exposes
runtime.GOOS
(see Go constants).
- arch str
- The architecture of the host. This exposes
runtime.GOARCH
(see Go constants). - id str
- The ID of this resource.
- os str
- The operating system of the host. This exposes
runtime.GOOS
(see Go constants).
- arch String
- The architecture of the host. This exposes
runtime.GOARCH
(see Go constants). - id String
- The ID of this resource.
- os String
- The operating system of the host. This exposes
runtime.GOOS
(see Go constants).
Package Details
- Repository
- coder coder/terraform-provider-coder
- License
- Notes
- This Pulumi package is based on the
coder
Terraform Provider.