Team
Manages policy mappings for Github Teams authenticated via Github. See the [Vault
documentation](https://www.vaultproject.io/docs/auth/github/) for more information.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const example = new vault.github.AuthBackend("example", {organization: "myorg"});
const tfDevs = new vault.github.Team("tf_devs", {
backend: example.id,
team: "terraform-developers",
policies: [
"developer",
"read-only",
],
});
Content copied to clipboard
import pulumi
import pulumi_vault as vault
example = vault.github.AuthBackend("example", organization="myorg")
tf_devs = vault.github.Team("tf_devs",
backend=example.id,
team="terraform-developers",
policies=[
"developer",
"read-only",
])
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var example = new Vault.GitHub.AuthBackend("example", new()
{
Organization = "myorg",
});
var tfDevs = new Vault.GitHub.Team("tf_devs", new()
{
Backend = example.Id,
TeamCity = "terraform-developers",
Policies = new[]
{
"developer",
"read-only",
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := github.NewAuthBackend(ctx, "example", &github.AuthBackendArgs{
Organization: pulumi.String("myorg"),
})
if err != nil {
return err
}
_, err = github.NewTeam(ctx, "tf_devs", &github.TeamArgs{
Backend: example.ID(),
Team: pulumi.String("terraform-developers"),
Policies: pulumi.StringArray{
pulumi.String("developer"),
pulumi.String("read-only"),
},
})
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.vault.github.AuthBackend;
import com.pulumi.vault.github.AuthBackendArgs;
import com.pulumi.vault.github.Team;
import com.pulumi.vault.github.TeamArgs;
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 AuthBackend("example", AuthBackendArgs.builder()
.organization("myorg")
.build());
var tfDevs = new Team("tfDevs", TeamArgs.builder()
.backend(example.id())
.team("terraform-developers")
.policies(
"developer",
"read-only")
.build());
}
}
Content copied to clipboard
resources:
example:
type: vault:github:AuthBackend
properties:
organization: myorg
tfDevs:
type: vault:github:Team
name: tf_devs
properties:
backend: ${example.id}
team: terraform-developers
policies:
- developer
- read-only
Content copied to clipboard
Import
Github team mappings can be imported using the path
, e.g.
$ pulumi import vault:github/team:Team tf_devs auth/github/map/teams/terraform-developers
Content copied to clipboard