Workspace Service Account Args
data class WorkspaceServiceAccountArgs(val grafanaRole: Output<String>? = null, val name: Output<String>? = null, val workspaceId: Output<String>? = null) : ConvertibleToJava<WorkspaceServiceAccountArgs>
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.grafana.WorkspaceServiceAccount("example", {
name: "example-admin",
grafanaRole: "ADMIN",
workspaceId: exampleAwsGrafanaWorkspace.id,
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
example = aws.grafana.WorkspaceServiceAccount("example",
name="example-admin",
grafana_role="ADMIN",
workspace_id=example_aws_grafana_workspace["id"])
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Grafana.WorkspaceServiceAccount("example", new()
{
Name = "example-admin",
GrafanaRole = "ADMIN",
WorkspaceId = exampleAwsGrafanaWorkspace.Id,
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/grafana"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := grafana.NewWorkspaceServiceAccount(ctx, "example", &grafana.WorkspaceServiceAccountArgs{
Name: pulumi.String("example-admin"),
GrafanaRole: pulumi.String("ADMIN"),
WorkspaceId: pulumi.Any(exampleAwsGrafanaWorkspace.Id),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.grafana.WorkspaceServiceAccount;
import com.pulumi.aws.grafana.WorkspaceServiceAccountArgs;
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) {
var example = new WorkspaceServiceAccount("example", WorkspaceServiceAccountArgs.builder()
.name("example-admin")
.grafanaRole("ADMIN")
.workspaceId(exampleAwsGrafanaWorkspace.id())
.build());
}
}
Content copied to clipboard
resources:
example:
type: aws:grafana:WorkspaceServiceAccount
properties:
name: example-admin
grafanaRole: ADMIN
workspaceId: ${exampleAwsGrafanaWorkspace.id}
Content copied to clipboard
Import
Using pulumi import
, import Managed Grafana Workspace Service Account using the workspace_id
and service_account_id
separated by a comma (,
). For example:
$ pulumi import aws:grafana/workspaceServiceAccount:WorkspaceServiceAccount example g-abc12345,1
Content copied to clipboard
Properties
Link copied to clipboard
The permission level to use for this service account. For more information about the roles and the permissions each has, see the User roles documentation.
Link copied to clipboard
The Grafana workspace with which the service account is associated.