1. Packages
  2. Pulumi Vault Provider
  3. API Docs
  4. github
  5. Team
HashiCorp Vault v6.4.0 published on Wednesday, Nov 20, 2024 by Pulumi

vault.github.Team

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.4.0 published on Wednesday, Nov 20, 2024 by Pulumi

    Manages policy mappings for Github Teams authenticated via Github. See the Vault documentation 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",
        ],
    });
    
    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",
        ])
    
    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
    	})
    }
    
    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",
            },
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    Create Team Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Team(name: string, args: TeamArgs, opts?: CustomResourceOptions);
    @overload
    def Team(resource_name: str,
             args: TeamArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Team(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             team: Optional[str] = None,
             backend: Optional[str] = None,
             namespace: Optional[str] = None,
             policies: Optional[Sequence[str]] = None)
    func NewTeam(ctx *Context, name string, args TeamArgs, opts ...ResourceOption) (*Team, error)
    public Team(string name, TeamArgs args, CustomResourceOptions? opts = null)
    public Team(String name, TeamArgs args)
    public Team(String name, TeamArgs args, CustomResourceOptions options)
    
    type: vault:github:Team
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.
    name String
    The unique name of the resource.
    args TeamArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var teamResource = new Vault.GitHub.Team("teamResource", new()
    {
        TeamCity = "string",
        Backend = "string",
        Namespace = "string",
        Policies = new[]
        {
            "string",
        },
    });
    
    example, err := github.NewTeam(ctx, "teamResource", &github.TeamArgs{
    	Team:      pulumi.String("string"),
    	Backend:   pulumi.String("string"),
    	Namespace: pulumi.String("string"),
    	Policies: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var teamResource = new Team("teamResource", TeamArgs.builder()
        .team("string")
        .backend("string")
        .namespace("string")
        .policies("string")
        .build());
    
    team_resource = vault.github.Team("teamResource",
        team="string",
        backend="string",
        namespace="string",
        policies=["string"])
    
    const teamResource = new vault.github.Team("teamResource", {
        team: "string",
        backend: "string",
        namespace: "string",
        policies: ["string"],
    });
    
    type: vault:github:Team
    properties:
        backend: string
        namespace: string
        policies:
            - string
        team: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Policies List<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.
    Backend string
    Path where the github auth backend is mounted. Defaults to github if not specified.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    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.
    backend String
    Path where the github auth backend is mounted. Defaults to github if not specified.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    policies List<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.
    backend string
    Path where the github auth backend is mounted. Defaults to github if not specified.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    policies string[]
    An array of strings specifying the policies to be set on tokens issued using this role.
    team str
    GitHub team name in "slugified" format.
    backend str
    Path where the github auth backend is mounted. Defaults to github if not specified.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    policies Sequence[str]
    An array of strings specifying the policies to be set on tokens issued using this role.
    team String
    GitHub team name in "slugified" format.
    backend String
    Path where the github auth backend is mounted. Defaults to github if not specified.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    policies List<String>
    An array of strings specifying the policies to be set on tokens issued using this role.

    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 string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up 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,
            namespace: Optional[str] = None,
            policies: Optional[Sequence[str]] = None,
            team: 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)
    public static Team get(String name, Output<String> id, TeamState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    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.
    Backend string
    Path where the github auth backend is mounted. Defaults to github if not specified.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    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.
    backend String
    Path where the github auth backend is mounted. Defaults to github if not specified.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    policies List<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.
    backend string
    Path where the github auth backend is mounted. Defaults to github if not specified.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    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.
    backend str
    Path where the github auth backend is mounted. Defaults to github if not specified.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    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.
    backend String
    Path where the github auth backend is mounted. Defaults to github if not specified.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    policies List<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.

    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
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vault Terraform Provider.
    vault logo
    HashiCorp Vault v6.4.0 published on Wednesday, Nov 20, 2024 by Pulumi