User
Manages policy mappings for Github Users 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 tfUser = new Vault.GitHub.User("tfUser", new Vault.GitHub.UserArgs
{
Backend = example.Id,
User = "john.doe",
TokenPolicies =
{
"developer",
"read-only",
},
});
}
}
Coming soon!
import pulumi
import pulumi_vault as vault
example = vault.github.AuthBackend("example", organization="myorg")
tf_user = vault.github.User("tfUser",
backend=example.id,
user="john.doe",
token_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 tfUser = new vault.github.User("tfUser", {
backend: example.id,
user: "john.doe",
tokenPolicies: [
"developer",
"read-only",
],
});Create a User Resource
new User(name: string, args: UserArgs, opts?: CustomResourceOptions);def User(resource_name, opts=None, backend=None, policies=None, token_bound_cidrs=None, token_explicit_max_ttl=None, token_max_ttl=None, token_no_default_policy=None, token_num_uses=None, token_period=None, token_policies=None, token_ttl=None, token_type=None, user=None, __props__=None);public User(string name, UserArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
User Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The User resource accepts the following input properties:
- User
Name string GitHub user name.
- Backend string
Path where the github auth backend is mounted. Defaults to
githubif not specified.- Policies List<string>
An array of strings specifying the policies to be set on tokens issued using this role.
- Token
Bound List<string>Cidrs Specifies the blocks of IP addresses which are allowed to use the generated token
- Token
Explicit intMax Ttl Generated Token’s Explicit Maximum TTL in seconds
- Token
Max intTtl The maximum lifetime of the generated token
- Token
No boolDefault Policy If true, the ‘default’ policy will not automatically be added to generated tokens
- Token
Num intUses The maximum number of times a token may be used, a value of zero means unlimited
- Token
Period int Generated Token’s Period
- Token
Policies List<string> Generated Token’s Policies
- Token
Ttl int The initial ttl of the token to generate in seconds
- Token
Type string The type of token to generate, service or batch
- User string
GitHub user name.
- Backend string
Path where the github auth backend is mounted. Defaults to
githubif not specified.- Policies []string
An array of strings specifying the policies to be set on tokens issued using this role.
- Token
Bound []stringCidrs Specifies the blocks of IP addresses which are allowed to use the generated token
- Token
Explicit intMax Ttl Generated Token’s Explicit Maximum TTL in seconds
- Token
Max intTtl The maximum lifetime of the generated token
- Token
No boolDefault Policy If true, the ‘default’ policy will not automatically be added to generated tokens
- Token
Num intUses The maximum number of times a token may be used, a value of zero means unlimited
- Token
Period int Generated Token’s Period
- Token
Policies []string Generated Token’s Policies
- Token
Ttl int The initial ttl of the token to generate in seconds
- Token
Type string The type of token to generate, service or batch
- user string
GitHub user name.
- backend string
Path where the github auth backend is mounted. Defaults to
githubif not specified.- policies string[]
An array of strings specifying the policies to be set on tokens issued using this role.
- token
Bound string[]Cidrs Specifies the blocks of IP addresses which are allowed to use the generated token
- token
Explicit numberMax Ttl Generated Token’s Explicit Maximum TTL in seconds
- token
Max numberTtl The maximum lifetime of the generated token
- token
No booleanDefault Policy If true, the ‘default’ policy will not automatically be added to generated tokens
- token
Num numberUses The maximum number of times a token may be used, a value of zero means unlimited
- token
Period number Generated Token’s Period
- token
Policies string[] Generated Token’s Policies
- token
Ttl number The initial ttl of the token to generate in seconds
- token
Type string The type of token to generate, service or batch
- user str
GitHub user name.
- backend str
Path where the github auth backend is mounted. Defaults to
githubif not specified.- policies List[str]
An array of strings specifying the policies to be set on tokens issued using this role.
- token_
bound_ List[str]cidrs Specifies the blocks of IP addresses which are allowed to use the generated token
- token_
explicit_ floatmax_ ttl Generated Token’s Explicit Maximum TTL in seconds
- token_
max_ floatttl The maximum lifetime of the generated token
- token_
no_ booldefault_ policy If true, the ‘default’ policy will not automatically be added to generated tokens
- token_
num_ floatuses The maximum number of times a token may be used, a value of zero means unlimited
- token_
period float Generated Token’s Period
- token_
policies List[str] Generated Token’s Policies
- token_
ttl float The initial ttl of the token to generate in seconds
- token_
type str The type of token to generate, service or batch
Outputs
All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:
Look up an Existing User Resource
Get an existing User 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?: UserState, opts?: CustomResourceOptions): Userstatic get(resource_name, id, opts=None, backend=None, policies=None, token_bound_cidrs=None, token_explicit_max_ttl=None, token_max_ttl=None, token_no_default_policy=None, token_num_uses=None, token_period=None, token_policies=None, token_ttl=None, token_type=None, user=None, __props__=None);public static User Get(string name, Input<string> id, UserState? 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
githubif not specified.- Policies List<string>
An array of strings specifying the policies to be set on tokens issued using this role.
- Token
Bound List<string>Cidrs Specifies the blocks of IP addresses which are allowed to use the generated token
- Token
Explicit intMax Ttl Generated Token’s Explicit Maximum TTL in seconds
- Token
Max intTtl The maximum lifetime of the generated token
- Token
No boolDefault Policy If true, the ‘default’ policy will not automatically be added to generated tokens
- Token
Num intUses The maximum number of times a token may be used, a value of zero means unlimited
- Token
Period int Generated Token’s Period
- Token
Policies List<string> Generated Token’s Policies
- Token
Ttl int The initial ttl of the token to generate in seconds
- Token
Type string The type of token to generate, service or batch
- User
Name string GitHub user name.
- Backend string
Path where the github auth backend is mounted. Defaults to
githubif not specified.- Policies []string
An array of strings specifying the policies to be set on tokens issued using this role.
- Token
Bound []stringCidrs Specifies the blocks of IP addresses which are allowed to use the generated token
- Token
Explicit intMax Ttl Generated Token’s Explicit Maximum TTL in seconds
- Token
Max intTtl The maximum lifetime of the generated token
- Token
No boolDefault Policy If true, the ‘default’ policy will not automatically be added to generated tokens
- Token
Num intUses The maximum number of times a token may be used, a value of zero means unlimited
- Token
Period int Generated Token’s Period
- Token
Policies []string Generated Token’s Policies
- Token
Ttl int The initial ttl of the token to generate in seconds
- Token
Type string The type of token to generate, service or batch
- User string
GitHub user name.
- backend string
Path where the github auth backend is mounted. Defaults to
githubif not specified.- policies string[]
An array of strings specifying the policies to be set on tokens issued using this role.
- token
Bound string[]Cidrs Specifies the blocks of IP addresses which are allowed to use the generated token
- token
Explicit numberMax Ttl Generated Token’s Explicit Maximum TTL in seconds
- token
Max numberTtl The maximum lifetime of the generated token
- token
No booleanDefault Policy If true, the ‘default’ policy will not automatically be added to generated tokens
- token
Num numberUses The maximum number of times a token may be used, a value of zero means unlimited
- token
Period number Generated Token’s Period
- token
Policies string[] Generated Token’s Policies
- token
Ttl number The initial ttl of the token to generate in seconds
- token
Type string The type of token to generate, service or batch
- user string
GitHub user name.
- backend str
Path where the github auth backend is mounted. Defaults to
githubif not specified.- policies List[str]
An array of strings specifying the policies to be set on tokens issued using this role.
- token_
bound_ List[str]cidrs Specifies the blocks of IP addresses which are allowed to use the generated token
- token_
explicit_ floatmax_ ttl Generated Token’s Explicit Maximum TTL in seconds
- token_
max_ floatttl The maximum lifetime of the generated token
- token_
no_ booldefault_ policy If true, the ‘default’ policy will not automatically be added to generated tokens
- token_
num_ floatuses The maximum number of times a token may be used, a value of zero means unlimited
- token_
period float Generated Token’s Period
- token_
policies List[str] Generated Token’s Policies
- token_
ttl float The initial ttl of the token to generate in seconds
- token_
type str The type of token to generate, service or batch
- user str
GitHub user name.
Package Details
- Repository
- https://github.com/pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vaultTerraform Provider.