HashiCorp Vault v6.0.0 published on Monday, Mar 25, 2024 by Pulumi
vault.gcp.AuthBackendRole
Explore with Pulumi AI
Provides a resource to create a role in an GCP auth backend within Vault.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const gcp = new vault.AuthBackend("gcp", {
path: "gcp",
type: "gcp",
});
const test = new vault.gcp.AuthBackendRole("test", {
backend: gcp.path,
role: "test",
type: "iam",
boundServiceAccounts: ["test"],
boundProjects: ["test"],
tokenTtl: 300,
tokenMaxTtl: 600,
tokenPolicies: [
"policy_a",
"policy_b",
],
addGroupAliases: true,
});
import pulumi
import pulumi_vault as vault
gcp = vault.AuthBackend("gcp",
path="gcp",
type="gcp")
test = vault.gcp.AuthBackendRole("test",
backend=gcp.path,
role="test",
type="iam",
bound_service_accounts=["test"],
bound_projects=["test"],
token_ttl=300,
token_max_ttl=600,
token_policies=[
"policy_a",
"policy_b",
],
add_group_aliases=True)
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/gcp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
gcp, err := vault.NewAuthBackend(ctx, "gcp", &vault.AuthBackendArgs{
Path: pulumi.String("gcp"),
Type: pulumi.String("gcp"),
})
if err != nil {
return err
}
_, err = gcp.NewAuthBackendRole(ctx, "test", &gcp.AuthBackendRoleArgs{
Backend: gcp.Path,
Role: pulumi.String("test"),
Type: pulumi.String("iam"),
BoundServiceAccounts: pulumi.StringArray{
pulumi.String("test"),
},
BoundProjects: pulumi.StringArray{
pulumi.String("test"),
},
TokenTtl: pulumi.Int(300),
TokenMaxTtl: pulumi.Int(600),
TokenPolicies: pulumi.StringArray{
pulumi.String("policy_a"),
pulumi.String("policy_b"),
},
AddGroupAliases: pulumi.Bool(true),
})
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 gcp = new Vault.AuthBackend("gcp", new()
{
Path = "gcp",
Type = "gcp",
});
var test = new Vault.Gcp.AuthBackendRole("test", new()
{
Backend = gcp.Path,
Role = "test",
Type = "iam",
BoundServiceAccounts = new[]
{
"test",
},
BoundProjects = new[]
{
"test",
},
TokenTtl = 300,
TokenMaxTtl = 600,
TokenPolicies = new[]
{
"policy_a",
"policy_b",
},
AddGroupAliases = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.AuthBackend;
import com.pulumi.vault.AuthBackendArgs;
import com.pulumi.vault.gcp.AuthBackendRole;
import com.pulumi.vault.gcp.AuthBackendRoleArgs;
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 gcp = new AuthBackend("gcp", AuthBackendArgs.builder()
.path("gcp")
.type("gcp")
.build());
var test = new AuthBackendRole("test", AuthBackendRoleArgs.builder()
.backend(gcp.path())
.role("test")
.type("iam")
.boundServiceAccounts("test")
.boundProjects("test")
.tokenTtl(300)
.tokenMaxTtl(600)
.tokenPolicies(
"policy_a",
"policy_b")
.addGroupAliases(true)
.build());
}
}
resources:
gcp:
type: vault:AuthBackend
properties:
path: gcp
type: gcp
test:
type: vault:gcp:AuthBackendRole
properties:
backend: ${gcp.path}
role: test
type: iam
boundServiceAccounts:
- test
boundProjects:
- test
tokenTtl: 300
tokenMaxTtl: 600
tokenPolicies:
- policy_a
- policy_b
addGroupAliases: true
Create AuthBackendRole Resource
new AuthBackendRole(name: string, args: AuthBackendRoleArgs, opts?: CustomResourceOptions);
@overload
def AuthBackendRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
add_group_aliases: Optional[bool] = None,
allow_gce_inference: Optional[bool] = None,
backend: Optional[str] = None,
bound_instance_groups: Optional[Sequence[str]] = None,
bound_labels: Optional[Sequence[str]] = None,
bound_projects: Optional[Sequence[str]] = None,
bound_regions: Optional[Sequence[str]] = None,
bound_service_accounts: Optional[Sequence[str]] = None,
bound_zones: Optional[Sequence[str]] = None,
max_jwt_exp: Optional[str] = None,
namespace: Optional[str] = None,
role: 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,
type: Optional[str] = None)
@overload
def AuthBackendRole(resource_name: str,
args: AuthBackendRoleArgs,
opts: Optional[ResourceOptions] = None)
func NewAuthBackendRole(ctx *Context, name string, args AuthBackendRoleArgs, opts ...ResourceOption) (*AuthBackendRole, error)
public AuthBackendRole(string name, AuthBackendRoleArgs args, CustomResourceOptions? opts = null)
public AuthBackendRole(String name, AuthBackendRoleArgs args)
public AuthBackendRole(String name, AuthBackendRoleArgs args, CustomResourceOptions options)
type: vault:gcp:AuthBackendRole
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AuthBackendRoleArgs
- 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 AuthBackendRoleArgs
- 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 AuthBackendRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AuthBackendRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AuthBackendRoleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AuthBackendRole 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 AuthBackendRole resource accepts the following input properties:
- Role string
- Name of the GCP role
- Type string
- Type of GCP authentication role (either
gce
oriam
) - Add
Group boolAliases - Allow
Gce boolInference - A flag to determine if this role should allow GCE instances to authenticate by inferring service accounts from the GCE identity metadata token.
- Backend string
- Path to the mounted GCP auth backend
- Bound
Instance List<string>Groups - The instance groups that an authorized instance must belong to in order to be authenticated. If specified, either
bound_zones
orbound_regions
must be set too. - Bound
Labels List<string> - A comma-separated list of GCP labels formatted as
"key:value"
strings that must be set on authorized GCE instances. Because GCP labels are not currently ACL'd, we recommend that this be used in conjunction with other restrictions. - Bound
Projects List<string> - An array of GCP project IDs. Only entities belonging to this project can authenticate under the role.
- Bound
Regions List<string> - The list of regions that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a regional group and the group must belong to this region. If bound_zones are provided, this attribute is ignored.
- Bound
Service List<string>Accounts - GCP Service Accounts allowed to issue tokens under this role. (Note: Required if role is
iam
) - Bound
Zones List<string> - The list of zones that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a zonal group and the group must belong to this zone.
- Max
Jwt stringExp - The number of seconds past the time of authentication that the login param JWT must expire within. For example, if a user attempts to login with a token that expires within an hour and this is set to 15 minutes, Vault will return an error prompting the user to create a new signed JWT with a shorter
exp
. The GCE metadata tokens currently do not allow theexp
claim to be customized. - 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. - Token
Bound List<string>Cidrs - List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- Token
Explicit intMax Ttl - If set, will encode an
explicit max TTL
onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal. - Token
Max intTtl - The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
No boolDefault Policy - If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- Token
Num intUses - The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- Token
Period int - If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- Token
Policies List<string> - List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- Token
Ttl int - The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
Type string - The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.
- Role string
- Name of the GCP role
- Type string
- Type of GCP authentication role (either
gce
oriam
) - Add
Group boolAliases - Allow
Gce boolInference - A flag to determine if this role should allow GCE instances to authenticate by inferring service accounts from the GCE identity metadata token.
- Backend string
- Path to the mounted GCP auth backend
- Bound
Instance []stringGroups - The instance groups that an authorized instance must belong to in order to be authenticated. If specified, either
bound_zones
orbound_regions
must be set too. - Bound
Labels []string - A comma-separated list of GCP labels formatted as
"key:value"
strings that must be set on authorized GCE instances. Because GCP labels are not currently ACL'd, we recommend that this be used in conjunction with other restrictions. - Bound
Projects []string - An array of GCP project IDs. Only entities belonging to this project can authenticate under the role.
- Bound
Regions []string - The list of regions that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a regional group and the group must belong to this region. If bound_zones are provided, this attribute is ignored.
- Bound
Service []stringAccounts - GCP Service Accounts allowed to issue tokens under this role. (Note: Required if role is
iam
) - Bound
Zones []string - The list of zones that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a zonal group and the group must belong to this zone.
- Max
Jwt stringExp - The number of seconds past the time of authentication that the login param JWT must expire within. For example, if a user attempts to login with a token that expires within an hour and this is set to 15 minutes, Vault will return an error prompting the user to create a new signed JWT with a shorter
exp
. The GCE metadata tokens currently do not allow theexp
claim to be customized. - 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. - Token
Bound []stringCidrs - List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- Token
Explicit intMax Ttl - If set, will encode an
explicit max TTL
onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal. - Token
Max intTtl - The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
No boolDefault Policy - If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- Token
Num intUses - The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- Token
Period int - If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- Token
Policies []string - List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- Token
Ttl int - The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
Type string - The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.
- role String
- Name of the GCP role
- type String
- Type of GCP authentication role (either
gce
oriam
) - add
Group BooleanAliases - allow
Gce BooleanInference - A flag to determine if this role should allow GCE instances to authenticate by inferring service accounts from the GCE identity metadata token.
- backend String
- Path to the mounted GCP auth backend
- bound
Instance List<String>Groups - The instance groups that an authorized instance must belong to in order to be authenticated. If specified, either
bound_zones
orbound_regions
must be set too. - bound
Labels List<String> - A comma-separated list of GCP labels formatted as
"key:value"
strings that must be set on authorized GCE instances. Because GCP labels are not currently ACL'd, we recommend that this be used in conjunction with other restrictions. - bound
Projects List<String> - An array of GCP project IDs. Only entities belonging to this project can authenticate under the role.
- bound
Regions List<String> - The list of regions that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a regional group and the group must belong to this region. If bound_zones are provided, this attribute is ignored.
- bound
Service List<String>Accounts - GCP Service Accounts allowed to issue tokens under this role. (Note: Required if role is
iam
) - bound
Zones List<String> - The list of zones that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a zonal group and the group must belong to this zone.
- max
Jwt StringExp - The number of seconds past the time of authentication that the login param JWT must expire within. For example, if a user attempts to login with a token that expires within an hour and this is set to 15 minutes, Vault will return an error prompting the user to create a new signed JWT with a shorter
exp
. The GCE metadata tokens currently do not allow theexp
claim to be customized. - 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. - token
Bound List<String>Cidrs - List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token
Explicit IntegerMax Ttl - If set, will encode an
explicit max TTL
onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal. - token
Max IntegerTtl - The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
No BooleanDefault Policy - If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token
Num IntegerUses - The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token
Period Integer - If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token
Policies List<String> - List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token
Ttl Integer - The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
Type String - The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.
- role string
- Name of the GCP role
- type string
- Type of GCP authentication role (either
gce
oriam
) - add
Group booleanAliases - allow
Gce booleanInference - A flag to determine if this role should allow GCE instances to authenticate by inferring service accounts from the GCE identity metadata token.
- backend string
- Path to the mounted GCP auth backend
- bound
Instance string[]Groups - The instance groups that an authorized instance must belong to in order to be authenticated. If specified, either
bound_zones
orbound_regions
must be set too. - bound
Labels string[] - A comma-separated list of GCP labels formatted as
"key:value"
strings that must be set on authorized GCE instances. Because GCP labels are not currently ACL'd, we recommend that this be used in conjunction with other restrictions. - bound
Projects string[] - An array of GCP project IDs. Only entities belonging to this project can authenticate under the role.
- bound
Regions string[] - The list of regions that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a regional group and the group must belong to this region. If bound_zones are provided, this attribute is ignored.
- bound
Service string[]Accounts - GCP Service Accounts allowed to issue tokens under this role. (Note: Required if role is
iam
) - bound
Zones string[] - The list of zones that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a zonal group and the group must belong to this zone.
- max
Jwt stringExp - The number of seconds past the time of authentication that the login param JWT must expire within. For example, if a user attempts to login with a token that expires within an hour and this is set to 15 minutes, Vault will return an error prompting the user to create a new signed JWT with a shorter
exp
. The GCE metadata tokens currently do not allow theexp
claim to be customized. - 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. - token
Bound string[]Cidrs - List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token
Explicit numberMax Ttl - If set, will encode an
explicit max TTL
onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal. - token
Max numberTtl - The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
No booleanDefault Policy - If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token
Num numberUses - The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token
Period number - If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token
Policies string[] - List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token
Ttl number - The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
Type string - The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.
- role str
- Name of the GCP role
- type str
- Type of GCP authentication role (either
gce
oriam
) - add_
group_ boolaliases - allow_
gce_ boolinference - A flag to determine if this role should allow GCE instances to authenticate by inferring service accounts from the GCE identity metadata token.
- backend str
- Path to the mounted GCP auth backend
- bound_
instance_ Sequence[str]groups - The instance groups that an authorized instance must belong to in order to be authenticated. If specified, either
bound_zones
orbound_regions
must be set too. - bound_
labels Sequence[str] - A comma-separated list of GCP labels formatted as
"key:value"
strings that must be set on authorized GCE instances. Because GCP labels are not currently ACL'd, we recommend that this be used in conjunction with other restrictions. - bound_
projects Sequence[str] - An array of GCP project IDs. Only entities belonging to this project can authenticate under the role.
- bound_
regions Sequence[str] - The list of regions that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a regional group and the group must belong to this region. If bound_zones are provided, this attribute is ignored.
- bound_
service_ Sequence[str]accounts - GCP Service Accounts allowed to issue tokens under this role. (Note: Required if role is
iam
) - bound_
zones Sequence[str] - The list of zones that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a zonal group and the group must belong to this zone.
- max_
jwt_ strexp - The number of seconds past the time of authentication that the login param JWT must expire within. For example, if a user attempts to login with a token that expires within an hour and this is set to 15 minutes, Vault will return an error prompting the user to create a new signed JWT with a shorter
exp
. The GCE metadata tokens currently do not allow theexp
claim to be customized. - 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. - token_
bound_ Sequence[str]cidrs - List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token_
explicit_ intmax_ ttl - If set, will encode an
explicit max TTL
onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal. - token_
max_ intttl - The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token_
no_ booldefault_ policy - If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token_
num_ intuses - The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token_
period int - If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token_
policies Sequence[str] - List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token_
ttl int - The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token_
type str - The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.
- role String
- Name of the GCP role
- type String
- Type of GCP authentication role (either
gce
oriam
) - add
Group BooleanAliases - allow
Gce BooleanInference - A flag to determine if this role should allow GCE instances to authenticate by inferring service accounts from the GCE identity metadata token.
- backend String
- Path to the mounted GCP auth backend
- bound
Instance List<String>Groups - The instance groups that an authorized instance must belong to in order to be authenticated. If specified, either
bound_zones
orbound_regions
must be set too. - bound
Labels List<String> - A comma-separated list of GCP labels formatted as
"key:value"
strings that must be set on authorized GCE instances. Because GCP labels are not currently ACL'd, we recommend that this be used in conjunction with other restrictions. - bound
Projects List<String> - An array of GCP project IDs. Only entities belonging to this project can authenticate under the role.
- bound
Regions List<String> - The list of regions that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a regional group and the group must belong to this region. If bound_zones are provided, this attribute is ignored.
- bound
Service List<String>Accounts - GCP Service Accounts allowed to issue tokens under this role. (Note: Required if role is
iam
) - bound
Zones List<String> - The list of zones that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a zonal group and the group must belong to this zone.
- max
Jwt StringExp - The number of seconds past the time of authentication that the login param JWT must expire within. For example, if a user attempts to login with a token that expires within an hour and this is set to 15 minutes, Vault will return an error prompting the user to create a new signed JWT with a shorter
exp
. The GCE metadata tokens currently do not allow theexp
claim to be customized. - 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. - token
Bound List<String>Cidrs - List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token
Explicit NumberMax Ttl - If set, will encode an
explicit max TTL
onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal. - token
Max NumberTtl - The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
No BooleanDefault Policy - If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token
Num NumberUses - The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token
Period Number - If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token
Policies List<String> - List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token
Ttl Number - The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
Type String - The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time.
Outputs
All input properties are implicitly available as output properties. Additionally, the AuthBackendRole 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 AuthBackendRole Resource
Get an existing AuthBackendRole 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?: AuthBackendRoleState, opts?: CustomResourceOptions): AuthBackendRole
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
add_group_aliases: Optional[bool] = None,
allow_gce_inference: Optional[bool] = None,
backend: Optional[str] = None,
bound_instance_groups: Optional[Sequence[str]] = None,
bound_labels: Optional[Sequence[str]] = None,
bound_projects: Optional[Sequence[str]] = None,
bound_regions: Optional[Sequence[str]] = None,
bound_service_accounts: Optional[Sequence[str]] = None,
bound_zones: Optional[Sequence[str]] = None,
max_jwt_exp: Optional[str] = None,
namespace: Optional[str] = None,
role: 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,
type: Optional[str] = None) -> AuthBackendRole
func GetAuthBackendRole(ctx *Context, name string, id IDInput, state *AuthBackendRoleState, opts ...ResourceOption) (*AuthBackendRole, error)
public static AuthBackendRole Get(string name, Input<string> id, AuthBackendRoleState? state, CustomResourceOptions? opts = null)
public static AuthBackendRole get(String name, Output<String> id, AuthBackendRoleState 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.
- Add
Group boolAliases - Allow
Gce boolInference - A flag to determine if this role should allow GCE instances to authenticate by inferring service accounts from the GCE identity metadata token.
- Backend string
- Path to the mounted GCP auth backend
- Bound
Instance List<string>Groups - The instance groups that an authorized instance must belong to in order to be authenticated. If specified, either
bound_zones
orbound_regions
must be set too. - Bound
Labels List<string> - A comma-separated list of GCP labels formatted as
"key:value"
strings that must be set on authorized GCE instances. Because GCP labels are not currently ACL'd, we recommend that this be used in conjunction with other restrictions. - Bound
Projects List<string> - An array of GCP project IDs. Only entities belonging to this project can authenticate under the role.
- Bound
Regions List<string> - The list of regions that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a regional group and the group must belong to this region. If bound_zones are provided, this attribute is ignored.
- Bound
Service List<string>Accounts - GCP Service Accounts allowed to issue tokens under this role. (Note: Required if role is
iam
) - Bound
Zones List<string> - The list of zones that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a zonal group and the group must belong to this zone.
- Max
Jwt stringExp - The number of seconds past the time of authentication that the login param JWT must expire within. For example, if a user attempts to login with a token that expires within an hour and this is set to 15 minutes, Vault will return an error prompting the user to create a new signed JWT with a shorter
exp
. The GCE metadata tokens currently do not allow theexp
claim to be customized. - 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. - Role string
- Name of the GCP role
- Token
Bound List<string>Cidrs - List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- Token
Explicit intMax Ttl - If set, will encode an
explicit max TTL
onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal. - Token
Max intTtl - The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
No boolDefault Policy - If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- Token
Num intUses - The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- Token
Period int - If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- Token
Policies List<string> - List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- Token
Ttl int - The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
Type string - The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time. - Type string
- Type of GCP authentication role (either
gce
oriam
)
- Add
Group boolAliases - Allow
Gce boolInference - A flag to determine if this role should allow GCE instances to authenticate by inferring service accounts from the GCE identity metadata token.
- Backend string
- Path to the mounted GCP auth backend
- Bound
Instance []stringGroups - The instance groups that an authorized instance must belong to in order to be authenticated. If specified, either
bound_zones
orbound_regions
must be set too. - Bound
Labels []string - A comma-separated list of GCP labels formatted as
"key:value"
strings that must be set on authorized GCE instances. Because GCP labels are not currently ACL'd, we recommend that this be used in conjunction with other restrictions. - Bound
Projects []string - An array of GCP project IDs. Only entities belonging to this project can authenticate under the role.
- Bound
Regions []string - The list of regions that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a regional group and the group must belong to this region. If bound_zones are provided, this attribute is ignored.
- Bound
Service []stringAccounts - GCP Service Accounts allowed to issue tokens under this role. (Note: Required if role is
iam
) - Bound
Zones []string - The list of zones that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a zonal group and the group must belong to this zone.
- Max
Jwt stringExp - The number of seconds past the time of authentication that the login param JWT must expire within. For example, if a user attempts to login with a token that expires within an hour and this is set to 15 minutes, Vault will return an error prompting the user to create a new signed JWT with a shorter
exp
. The GCE metadata tokens currently do not allow theexp
claim to be customized. - 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. - Role string
- Name of the GCP role
- Token
Bound []stringCidrs - List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- Token
Explicit intMax Ttl - If set, will encode an
explicit max TTL
onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal. - Token
Max intTtl - The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
No boolDefault Policy - If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- Token
Num intUses - The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- Token
Period int - If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- Token
Policies []string - List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- Token
Ttl int - The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- Token
Type string - The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time. - Type string
- Type of GCP authentication role (either
gce
oriam
)
- add
Group BooleanAliases - allow
Gce BooleanInference - A flag to determine if this role should allow GCE instances to authenticate by inferring service accounts from the GCE identity metadata token.
- backend String
- Path to the mounted GCP auth backend
- bound
Instance List<String>Groups - The instance groups that an authorized instance must belong to in order to be authenticated. If specified, either
bound_zones
orbound_regions
must be set too. - bound
Labels List<String> - A comma-separated list of GCP labels formatted as
"key:value"
strings that must be set on authorized GCE instances. Because GCP labels are not currently ACL'd, we recommend that this be used in conjunction with other restrictions. - bound
Projects List<String> - An array of GCP project IDs. Only entities belonging to this project can authenticate under the role.
- bound
Regions List<String> - The list of regions that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a regional group and the group must belong to this region. If bound_zones are provided, this attribute is ignored.
- bound
Service List<String>Accounts - GCP Service Accounts allowed to issue tokens under this role. (Note: Required if role is
iam
) - bound
Zones List<String> - The list of zones that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a zonal group and the group must belong to this zone.
- max
Jwt StringExp - The number of seconds past the time of authentication that the login param JWT must expire within. For example, if a user attempts to login with a token that expires within an hour and this is set to 15 minutes, Vault will return an error prompting the user to create a new signed JWT with a shorter
exp
. The GCE metadata tokens currently do not allow theexp
claim to be customized. - 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. - role String
- Name of the GCP role
- token
Bound List<String>Cidrs - List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token
Explicit IntegerMax Ttl - If set, will encode an
explicit max TTL
onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal. - token
Max IntegerTtl - The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
No BooleanDefault Policy - If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token
Num IntegerUses - The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token
Period Integer - If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token
Policies List<String> - List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token
Ttl Integer - The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
Type String - The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time. - type String
- Type of GCP authentication role (either
gce
oriam
)
- add
Group booleanAliases - allow
Gce booleanInference - A flag to determine if this role should allow GCE instances to authenticate by inferring service accounts from the GCE identity metadata token.
- backend string
- Path to the mounted GCP auth backend
- bound
Instance string[]Groups - The instance groups that an authorized instance must belong to in order to be authenticated. If specified, either
bound_zones
orbound_regions
must be set too. - bound
Labels string[] - A comma-separated list of GCP labels formatted as
"key:value"
strings that must be set on authorized GCE instances. Because GCP labels are not currently ACL'd, we recommend that this be used in conjunction with other restrictions. - bound
Projects string[] - An array of GCP project IDs. Only entities belonging to this project can authenticate under the role.
- bound
Regions string[] - The list of regions that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a regional group and the group must belong to this region. If bound_zones are provided, this attribute is ignored.
- bound
Service string[]Accounts - GCP Service Accounts allowed to issue tokens under this role. (Note: Required if role is
iam
) - bound
Zones string[] - The list of zones that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a zonal group and the group must belong to this zone.
- max
Jwt stringExp - The number of seconds past the time of authentication that the login param JWT must expire within. For example, if a user attempts to login with a token that expires within an hour and this is set to 15 minutes, Vault will return an error prompting the user to create a new signed JWT with a shorter
exp
. The GCE metadata tokens currently do not allow theexp
claim to be customized. - 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. - role string
- Name of the GCP role
- token
Bound string[]Cidrs - List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token
Explicit numberMax Ttl - If set, will encode an
explicit max TTL
onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal. - token
Max numberTtl - The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
No booleanDefault Policy - If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token
Num numberUses - The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token
Period number - If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token
Policies string[] - List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token
Ttl number - The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
Type string - The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time. - type string
- Type of GCP authentication role (either
gce
oriam
)
- add_
group_ boolaliases - allow_
gce_ boolinference - A flag to determine if this role should allow GCE instances to authenticate by inferring service accounts from the GCE identity metadata token.
- backend str
- Path to the mounted GCP auth backend
- bound_
instance_ Sequence[str]groups - The instance groups that an authorized instance must belong to in order to be authenticated. If specified, either
bound_zones
orbound_regions
must be set too. - bound_
labels Sequence[str] - A comma-separated list of GCP labels formatted as
"key:value"
strings that must be set on authorized GCE instances. Because GCP labels are not currently ACL'd, we recommend that this be used in conjunction with other restrictions. - bound_
projects Sequence[str] - An array of GCP project IDs. Only entities belonging to this project can authenticate under the role.
- bound_
regions Sequence[str] - The list of regions that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a regional group and the group must belong to this region. If bound_zones are provided, this attribute is ignored.
- bound_
service_ Sequence[str]accounts - GCP Service Accounts allowed to issue tokens under this role. (Note: Required if role is
iam
) - bound_
zones Sequence[str] - The list of zones that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a zonal group and the group must belong to this zone.
- max_
jwt_ strexp - The number of seconds past the time of authentication that the login param JWT must expire within. For example, if a user attempts to login with a token that expires within an hour and this is set to 15 minutes, Vault will return an error prompting the user to create a new signed JWT with a shorter
exp
. The GCE metadata tokens currently do not allow theexp
claim to be customized. - 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. - role str
- Name of the GCP role
- token_
bound_ Sequence[str]cidrs - List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token_
explicit_ intmax_ ttl - If set, will encode an
explicit max TTL
onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal. - token_
max_ intttl - The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token_
no_ booldefault_ policy - If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token_
num_ intuses - The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token_
period int - If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token_
policies Sequence[str] - List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token_
ttl int - The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token_
type str - The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time. - type str
- Type of GCP authentication role (either
gce
oriam
)
- add
Group BooleanAliases - allow
Gce BooleanInference - A flag to determine if this role should allow GCE instances to authenticate by inferring service accounts from the GCE identity metadata token.
- backend String
- Path to the mounted GCP auth backend
- bound
Instance List<String>Groups - The instance groups that an authorized instance must belong to in order to be authenticated. If specified, either
bound_zones
orbound_regions
must be set too. - bound
Labels List<String> - A comma-separated list of GCP labels formatted as
"key:value"
strings that must be set on authorized GCE instances. Because GCP labels are not currently ACL'd, we recommend that this be used in conjunction with other restrictions. - bound
Projects List<String> - An array of GCP project IDs. Only entities belonging to this project can authenticate under the role.
- bound
Regions List<String> - The list of regions that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a regional group and the group must belong to this region. If bound_zones are provided, this attribute is ignored.
- bound
Service List<String>Accounts - GCP Service Accounts allowed to issue tokens under this role. (Note: Required if role is
iam
) - bound
Zones List<String> - The list of zones that a GCE instance must belong to in order to be authenticated. If bound_instance_groups is provided, it is assumed to be a zonal group and the group must belong to this zone.
- max
Jwt StringExp - The number of seconds past the time of authentication that the login param JWT must expire within. For example, if a user attempts to login with a token that expires within an hour and this is set to 15 minutes, Vault will return an error prompting the user to create a new signed JWT with a shorter
exp
. The GCE metadata tokens currently do not allow theexp
claim to be customized. - 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. - role String
- Name of the GCP role
- token
Bound List<String>Cidrs - List of CIDR blocks; if set, specifies blocks of IP addresses which can authenticate successfully, and ties the resulting token to these blocks as well.
- token
Explicit NumberMax Ttl - If set, will encode an
explicit max TTL
onto the token in number of seconds. This is a hard cap even if
token_ttl
andtoken_max_ttl
would otherwise allow a renewal. - token
Max NumberTtl - The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
No BooleanDefault Policy - If set, the default policy will not be set on generated tokens; otherwise it will be added to the policies set in token_policies.
- token
Num NumberUses - The maximum number of times a generated token may be used (within its lifetime); 0 means unlimited.
- token
Period Number - If set, indicates that the token generated using this role should never expire. The token should be renewed within the duration specified by this value. At each renewal, the token's TTL will be set to the value of this field. Specified in seconds.
- token
Policies List<String> - List of policies to encode onto generated tokens. Depending on the auth method, this list may be supplemented by user/group/other values.
- token
Ttl Number - The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
- token
Type String - The type of token that should be generated. Can be
service
,batch
, ordefault
to use the mount's tuned default (which unless changed will beservice
tokens). For token store roles, there are two additional possibilities:default-service
anddefault-batch
which specify the type to return unless the client requests a different type at generation time. - type String
- Type of GCP authentication role (either
gce
oriam
)
Import
GCP authentication roles can be imported using the path
, e.g.
$ pulumi import vault:gcp/authBackendRole:AuthBackendRole my_role auth/gcp/role/my_role
Package Details
- Repository
- Vault pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vault
Terraform Provider.