Team

Manages policy mappings for Github Teams authenticated via Github. See the Vault documentation for more information.

Example Usage

using Pulumi;
using Vault = Pulumi.Vault;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Vault.GitHub.AuthBackend("example", new Vault.GitHub.AuthBackendArgs
        {
            Organization = "myorg",
        });
        var tfDevs = new Vault.GitHub.Team("tfDevs", new Vault.GitHub.TeamArgs
        {
            Backend = example.Id,
            Team = "terraform-developers",
            Policies = 
            {
                "developer",
                "read-only",
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-vault/sdk/v4/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, "tfDevs", &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
	})
}
import pulumi
import pulumi_vault as vault

example = vault.github.AuthBackend("example", organization="myorg")
tf_devs = vault.github.Team("tfDevs",
    backend=example.id,
    team="terraform-developers",
    policies=[
        "developer",
        "read-only",
    ])
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("tfDevs", {
    backend: example.id,
    team: "terraform-developers",
    policies: [
        "developer",
        "read-only",
    ],
});

Create a Team Resource

new Team(name: string, args: TeamArgs, opts?: CustomResourceOptions);
@overload
def Team(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         backend: Optional[str] = None,
         policies: Optional[Sequence[str]] = None,
         team: Optional[str] = None,
         token_bound_cidrs: Optional[Sequence[str]] = None,
         token_explicit_max_ttl: Optional[int] = None,
         token_max_ttl: Optional[int] = None,
         token_no_default_policy: Optional[bool] = None,
         token_num_uses: Optional[int] = None,
         token_period: Optional[int] = None,
         token_policies: Optional[Sequence[str]] = None,
         token_ttl: Optional[int] = None,
         token_type: Optional[str] = None)
@overload
def Team(resource_name: str,
         args: TeamArgs,
         opts: Optional[ResourceOptions] = None)
func NewTeam(ctx *Context, name string, args TeamArgs, opts ...ResourceOption) (*Team, error)
public Team(string name, TeamArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Team Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Team resource accepts the following input properties:

TeamCity string
GitHub team name in “slugified” format.
Backend string
Path where the github auth backend is mounted. Defaults to github if not specified.
Policies List<string>
An array of strings specifying the policies to be set on tokens issued using this role.
TokenBoundCidrs List<string>
Specifies the blocks of IP addresses which are allowed to use the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenExplicitMaxTtl int
Generated Token’s Explicit Maximum TTL in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenMaxTtl int
The maximum lifetime of the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenNoDefaultPolicy bool
If true, the ‘default’ policy will not automatically be added to generated tokens

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenNumUses int
The maximum number of times a token may be used, a value of zero means unlimited

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenPeriod int
Generated Token’s Period

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenPolicies List<string>
Generated Token’s Policies

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenTtl int
The initial ttl of the token to generate in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenType string
The type of token to generate, service or batch

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

Team string
GitHub team name in “slugified” format.
Backend string
Path where the github auth backend is mounted. Defaults to github if not specified.
Policies []string
An array of strings specifying the policies to be set on tokens issued using this role.
TokenBoundCidrs []string
Specifies the blocks of IP addresses which are allowed to use the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenExplicitMaxTtl int
Generated Token’s Explicit Maximum TTL in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenMaxTtl int
The maximum lifetime of the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenNoDefaultPolicy bool
If true, the ‘default’ policy will not automatically be added to generated tokens

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenNumUses int
The maximum number of times a token may be used, a value of zero means unlimited

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenPeriod int
Generated Token’s Period

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenPolicies []string
Generated Token’s Policies

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenTtl int
The initial ttl of the token to generate in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenType string
The type of token to generate, service or batch

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

team string
GitHub team name in “slugified” format.
backend string
Path where the github auth backend is mounted. Defaults to github if not specified.
policies string[]
An array of strings specifying the policies to be set on tokens issued using this role.
tokenBoundCidrs string[]
Specifies the blocks of IP addresses which are allowed to use the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenExplicitMaxTtl number
Generated Token’s Explicit Maximum TTL in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenMaxTtl number
The maximum lifetime of the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenNoDefaultPolicy boolean
If true, the ‘default’ policy will not automatically be added to generated tokens

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenNumUses number
The maximum number of times a token may be used, a value of zero means unlimited

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenPeriod number
Generated Token’s Period

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenPolicies string[]
Generated Token’s Policies

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenTtl number
The initial ttl of the token to generate in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenType string
The type of token to generate, service or batch

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

team str
GitHub team name in “slugified” format.
backend str
Path where the github auth backend is mounted. Defaults to github if not specified.
policies Sequence[str]
An array of strings specifying the policies to be set on tokens issued using this role.
token_bound_cidrs Sequence[str]
Specifies the blocks of IP addresses which are allowed to use the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_explicit_max_ttl int
Generated Token’s Explicit Maximum TTL in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_max_ttl int
The maximum lifetime of the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_no_default_policy bool
If true, the ‘default’ policy will not automatically be added to generated tokens

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_num_uses int
The maximum number of times a token may be used, a value of zero means unlimited

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_period int
Generated Token’s Period

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_policies Sequence[str]
Generated Token’s Policies

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_ttl int
The initial ttl of the token to generate in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_type str
The type of token to generate, service or batch

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

Outputs

All input properties are implicitly available as output properties. Additionally, the Team resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Team Resource

Get an existing Team resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TeamState, opts?: CustomResourceOptions): Team
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backend: Optional[str] = None,
        policies: Optional[Sequence[str]] = None,
        team: Optional[str] = None,
        token_bound_cidrs: Optional[Sequence[str]] = None,
        token_explicit_max_ttl: Optional[int] = None,
        token_max_ttl: Optional[int] = None,
        token_no_default_policy: Optional[bool] = None,
        token_num_uses: Optional[int] = None,
        token_period: Optional[int] = None,
        token_policies: Optional[Sequence[str]] = None,
        token_ttl: Optional[int] = None,
        token_type: Optional[str] = None) -> Team
func GetTeam(ctx *Context, name string, id IDInput, state *TeamState, opts ...ResourceOption) (*Team, error)
public static Team Get(string name, Input<string> id, TeamState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Backend string
Path where the github auth backend is mounted. Defaults to github if not specified.
Policies List<string>
An array of strings specifying the policies to be set on tokens issued using this role.
TeamCity string
GitHub team name in “slugified” format.
TokenBoundCidrs List<string>
Specifies the blocks of IP addresses which are allowed to use the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenExplicitMaxTtl int
Generated Token’s Explicit Maximum TTL in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenMaxTtl int
The maximum lifetime of the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenNoDefaultPolicy bool
If true, the ‘default’ policy will not automatically be added to generated tokens

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenNumUses int
The maximum number of times a token may be used, a value of zero means unlimited

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenPeriod int
Generated Token’s Period

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenPolicies List<string>
Generated Token’s Policies

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenTtl int
The initial ttl of the token to generate in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenType string
The type of token to generate, service or batch

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

Backend string
Path where the github auth backend is mounted. Defaults to github if not specified.
Policies []string
An array of strings specifying the policies to be set on tokens issued using this role.
Team string
GitHub team name in “slugified” format.
TokenBoundCidrs []string
Specifies the blocks of IP addresses which are allowed to use the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenExplicitMaxTtl int
Generated Token’s Explicit Maximum TTL in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenMaxTtl int
The maximum lifetime of the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenNoDefaultPolicy bool
If true, the ‘default’ policy will not automatically be added to generated tokens

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenNumUses int
The maximum number of times a token may be used, a value of zero means unlimited

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenPeriod int
Generated Token’s Period

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenPolicies []string
Generated Token’s Policies

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenTtl int
The initial ttl of the token to generate in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

TokenType string
The type of token to generate, service or batch

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

backend string
Path where the github auth backend is mounted. Defaults to github if not specified.
policies string[]
An array of strings specifying the policies to be set on tokens issued using this role.
team string
GitHub team name in “slugified” format.
tokenBoundCidrs string[]
Specifies the blocks of IP addresses which are allowed to use the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenExplicitMaxTtl number
Generated Token’s Explicit Maximum TTL in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenMaxTtl number
The maximum lifetime of the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenNoDefaultPolicy boolean
If true, the ‘default’ policy will not automatically be added to generated tokens

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenNumUses number
The maximum number of times a token may be used, a value of zero means unlimited

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenPeriod number
Generated Token’s Period

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenPolicies string[]
Generated Token’s Policies

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenTtl number
The initial ttl of the token to generate in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

tokenType string
The type of token to generate, service or batch

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

backend str
Path where the github auth backend is mounted. Defaults to github if not specified.
policies Sequence[str]
An array of strings specifying the policies to be set on tokens issued using this role.
team str
GitHub team name in “slugified” format.
token_bound_cidrs Sequence[str]
Specifies the blocks of IP addresses which are allowed to use the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_explicit_max_ttl int
Generated Token’s Explicit Maximum TTL in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_max_ttl int
The maximum lifetime of the generated token

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_no_default_policy bool
If true, the ‘default’ policy will not automatically be added to generated tokens

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_num_uses int
The maximum number of times a token may be used, a value of zero means unlimited

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_period int
Generated Token’s Period

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_policies Sequence[str]
Generated Token’s Policies

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_ttl int
The initial ttl of the token to generate in seconds

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

token_type str
The type of token to generate, service or batch

Deprecated: This parameter should be moved to the Github Auth backend config block. It does nothing in a user/team block.

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

Package Details

Repository
https://github.com/pulumi/pulumi-vault
License
Apache-2.0
Notes
This Pulumi package is based on the vault Terraform Provider.