app_role¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-vault repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-vault repo.
- class
pulumi_vault.app_role.AuthBackendLogin(resource_name, opts=None, backend=None, role_id=None, secret_id=None, __props__=None, __name__=None, __opts__=None)¶ Logs into Vault using the AppRole auth backend. See the Vault documentation for more information.
import pulumi import pulumi_vault as vault approle = vault.AuthBackend("approle", type="approle") example = vault.app_role.AuthBackendRole("example", backend=approle.path, policies=[ "default", "dev", "prod", ], role_name="test-role") id = vault.app_role.AuthBackendRoleSecretID("id", backend=approle.path, role_name=example.role_name) login = vault.app_role.AuthBackendLogin("login", backend=approle.path, role_id=example.role_id, secret_id=id.secret_id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
backend (pulumi.Input[str]) – The unique path of the Vault backend to log in with.
role_id (pulumi.Input[str]) – The ID of the role to log in with.
secret_id (pulumi.Input[str]) – The secret ID of the role to log in with. Required unless
bind_secret_idis set to false on the role.
accessor: pulumi.Output[str] = None¶The accessor for the token.
backend: pulumi.Output[str] = None¶The unique path of the Vault backend to log in with.
client_token: pulumi.Output[str] = None¶The Vault token created.
lease_duration: pulumi.Output[float] = None¶How long the token is valid for, in seconds.
lease_started: pulumi.Output[str] = None¶The date and time the lease started, in RFC 3339 format.
metadata: pulumi.Output[dict] = None¶The metadata associated with the token.
policies: pulumi.Output[list] = None¶A list of policies applied to the token.
renewable: pulumi.Output[bool] = None¶Whether the token is renewable or not.
role_id: pulumi.Output[str] = None¶The ID of the role to log in with.
secret_id: pulumi.Output[str] = None¶The secret ID of the role to log in with. Required unless
bind_secret_idis set to false on the role.
- static
get(resource_name, id, opts=None, accessor=None, backend=None, client_token=None, lease_duration=None, lease_started=None, metadata=None, policies=None, renewable=None, role_id=None, secret_id=None)¶ Get an existing AuthBackendLogin resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
accessor (pulumi.Input[str]) – The accessor for the token.
backend (pulumi.Input[str]) – The unique path of the Vault backend to log in with.
client_token (pulumi.Input[str]) – The Vault token created.
lease_duration (pulumi.Input[float]) – How long the token is valid for, in seconds.
lease_started (pulumi.Input[str]) – The date and time the lease started, in RFC 3339 format.
metadata (pulumi.Input[dict]) – The metadata associated with the token.
policies (pulumi.Input[list]) – A list of policies applied to the token.
renewable (pulumi.Input[bool]) – Whether the token is renewable or not.
role_id (pulumi.Input[str]) – The ID of the role to log in with.
secret_id (pulumi.Input[str]) – The secret ID of the role to log in with. Required unless
bind_secret_idis set to false on the role.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_vault.app_role.AuthBackendRole(resource_name, opts=None, backend=None, bind_secret_id=None, bound_cidr_lists=None, period=None, policies=None, role_id=None, role_name=None, secret_id_bound_cidrs=None, secret_id_num_uses=None, secret_id_ttl=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, __props__=None, __name__=None, __opts__=None)¶ Manages an AppRole auth backend role in a Vault server. See the Vault documentation for more information.
import pulumi import pulumi_vault as vault approle = vault.AuthBackend("approle", type="approle") example = vault.app_role.AuthBackendRole("example", backend=approle.path, role_name="test-role", token_policies=[ "default", "dev", "prod", ])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
backend (pulumi.Input[str]) – The unique name of the auth backend to configure. Defaults to
approle.bind_secret_id (pulumi.Input[bool]) – Whether or not to require
secret_idto be presented when logging in using this AppRole. Defaults totrue.bound_cidr_lists (pulumi.Input[list]) – If set, specifies blocks of IP addresses which can perform the login operation.
period (pulumi.Input[float]) – 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.
policies (pulumi.Input[list]) – An array of strings specifying the policies to be set on tokens issued using this role.
role_id (pulumi.Input[str]) – The RoleID of this role. If not specified, one will be auto-generated.
role_name (pulumi.Input[str]) – The name of the role.
secret_id_bound_cidrs (pulumi.Input[list]) – If set, specifies blocks of IP addresses which can perform the login operation.
secret_id_num_uses (pulumi.Input[float]) – The number of times any particular SecretID can be used to fetch a token from this AppRole, after which the SecretID will expire. A value of zero will allow unlimited uses.
secret_id_ttl (pulumi.Input[float]) – The number of seconds after which any SecretID expires.
token_bound_cidrs (pulumi.Input[list]) – 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_max_ttl (pulumi.Input[float]) – If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttlandtoken_max_ttlwould otherwise allow a renewal.token_max_ttl (pulumi.Input[float]) – The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
token_no_default_policy (pulumi.Input[bool]) – 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_uses (pulumi.Input[float]) – The period, if any, in number of seconds to set on the token.
token_period (pulumi.Input[float]) – 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 (pulumi.Input[list]) – 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 (pulumi.Input[float]) – The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
token_type (pulumi.Input[str]) – The type of token that should be generated. Can be
service,batch, ordefaultto use the mount’s tuned default (which unless changed will beservicetokens). For token store roles, there are two additional possibilities:default-serviceanddefault-batchwhich specify the type to return unless the client requests a different type at generation time.
backend: pulumi.Output[str] = None¶The unique name of the auth backend to configure. Defaults to
approle.
bind_secret_id: pulumi.Output[bool] = None¶Whether or not to require
secret_idto be presented when logging in using this AppRole. Defaults totrue.
bound_cidr_lists: pulumi.Output[list] = None¶If set, specifies blocks of IP addresses which can perform the login operation.
period: pulumi.Output[float] = None¶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.
policies: pulumi.Output[list] = None¶An array of strings specifying the policies to be set on tokens issued using this role.
role_id: pulumi.Output[str] = None¶The RoleID of this role. If not specified, one will be auto-generated.
role_name: pulumi.Output[str] = None¶The name of the role.
secret_id_bound_cidrs: pulumi.Output[list] = None¶If set, specifies blocks of IP addresses which can perform the login operation.
secret_id_num_uses: pulumi.Output[float] = None¶The number of times any particular SecretID can be used to fetch a token from this AppRole, after which the SecretID will expire. A value of zero will allow unlimited uses.
secret_id_ttl: pulumi.Output[float] = None¶The number of seconds after which any SecretID expires.
token_bound_cidrs: pulumi.Output[list] = None¶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_max_ttl: pulumi.Output[float] = None¶If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttlandtoken_max_ttlwould otherwise allow a renewal.
token_max_ttl: pulumi.Output[float] = None¶The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
token_no_default_policy: pulumi.Output[bool] = None¶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_uses: pulumi.Output[float] = None¶The period, if any, in number of seconds to set on the token.
token_period: pulumi.Output[float] = None¶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: pulumi.Output[list] = None¶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: pulumi.Output[float] = None¶The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
token_type: pulumi.Output[str] = None¶The type of token that should be generated. Can be
service,batch, ordefaultto use the mount’s tuned default (which unless changed will beservicetokens). For token store roles, there are two additional possibilities:default-serviceanddefault-batchwhich specify the type to return unless the client requests a different type at generation time.
- static
get(resource_name, id, opts=None, backend=None, bind_secret_id=None, bound_cidr_lists=None, period=None, policies=None, role_id=None, role_name=None, secret_id_bound_cidrs=None, secret_id_num_uses=None, secret_id_ttl=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)¶ Get an existing AuthBackendRole resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
backend (pulumi.Input[str]) – The unique name of the auth backend to configure. Defaults to
approle.bind_secret_id (pulumi.Input[bool]) – Whether or not to require
secret_idto be presented when logging in using this AppRole. Defaults totrue.bound_cidr_lists (pulumi.Input[list]) – If set, specifies blocks of IP addresses which can perform the login operation.
period (pulumi.Input[float]) – 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.
policies (pulumi.Input[list]) – An array of strings specifying the policies to be set on tokens issued using this role.
role_id (pulumi.Input[str]) – The RoleID of this role. If not specified, one will be auto-generated.
role_name (pulumi.Input[str]) – The name of the role.
secret_id_bound_cidrs (pulumi.Input[list]) – If set, specifies blocks of IP addresses which can perform the login operation.
secret_id_num_uses (pulumi.Input[float]) – The number of times any particular SecretID can be used to fetch a token from this AppRole, after which the SecretID will expire. A value of zero will allow unlimited uses.
secret_id_ttl (pulumi.Input[float]) – The number of seconds after which any SecretID expires.
token_bound_cidrs (pulumi.Input[list]) – 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_max_ttl (pulumi.Input[float]) –
If set, will encode an explicit max TTL onto the token in number of seconds. This is a hard cap even if
token_ttlandtoken_max_ttlwould otherwise allow a renewal.token_max_ttl (pulumi.Input[float]) – The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
token_no_default_policy (pulumi.Input[bool]) – 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_uses (pulumi.Input[float]) –
The period, if any, in number of seconds to set on the token.
token_period (pulumi.Input[float]) – 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 (pulumi.Input[list]) – 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 (pulumi.Input[float]) – The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
token_type (pulumi.Input[str]) – The type of token that should be generated. Can be
service,batch, ordefaultto use the mount’s tuned default (which unless changed will beservicetokens). For token store roles, there are two additional possibilities:default-serviceanddefault-batchwhich specify the type to return unless the client requests a different type at generation time.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_vault.app_role.AuthBackendRoleSecretID(resource_name, opts=None, backend=None, cidr_lists=None, metadata=None, role_name=None, secret_id=None, wrapping_ttl=None, __props__=None, __name__=None, __opts__=None)¶ Manages an AppRole auth backend SecretID in a Vault server. See the Vault documentation for more information.
import pulumi import pulumi_vault as vault approle = vault.AuthBackend("approle", type="approle") example = vault.app_role.AuthBackendRole("example", backend=approle.path, policies=[ "default", "dev", "prod", ], role_name="test-role") id = vault.app_role.AuthBackendRoleSecretID("id", backend=approle.path, metadata="""{ "hello": "world" } """, role_name=example.role_name)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
backend (pulumi.Input[str]) – Unique name of the auth backend to configure.
cidr_lists (pulumi.Input[list]) – If set, specifies blocks of IP addresses which can perform the login operation using this SecretID.
metadata (pulumi.Input[str]) – A JSON-encoded string containing metadata in key-value pairs to be set on tokens issued with this SecretID.
role_name (pulumi.Input[str]) – The name of the role to create the SecretID for.
secret_id (pulumi.Input[str]) – The SecretID to be created. If set, uses “Push” mode. Defaults to Vault auto-generating SecretIDs.
wrapping_ttl (pulumi.Input[str]) – If set, the SecretID response will be response-wrapped and available for the duration specified. Only a single unwrapping of the token is allowed.
accessor: pulumi.Output[str] = None¶The unique ID for this SecretID that can be safely logged.
backend: pulumi.Output[str] = None¶Unique name of the auth backend to configure.
cidr_lists: pulumi.Output[list] = None¶If set, specifies blocks of IP addresses which can perform the login operation using this SecretID.
metadata: pulumi.Output[str] = None¶A JSON-encoded string containing metadata in key-value pairs to be set on tokens issued with this SecretID.
role_name: pulumi.Output[str] = None¶The name of the role to create the SecretID for.
secret_id: pulumi.Output[str] = None¶The SecretID to be created. If set, uses “Push” mode. Defaults to Vault auto-generating SecretIDs.
wrapping_accessor: pulumi.Output[str] = None¶The unique ID for the response-wrapped SecretID that can be safely logged.
wrapping_token: pulumi.Output[str] = None¶The token used to retrieve a response-wrapped SecretID.
wrapping_ttl: pulumi.Output[str] = None¶If set, the SecretID response will be response-wrapped and available for the duration specified. Only a single unwrapping of the token is allowed.
- static
get(resource_name, id, opts=None, accessor=None, backend=None, cidr_lists=None, metadata=None, role_name=None, secret_id=None, wrapping_accessor=None, wrapping_token=None, wrapping_ttl=None)¶ Get an existing AuthBackendRoleSecretID resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
accessor (pulumi.Input[str]) – The unique ID for this SecretID that can be safely logged.
backend (pulumi.Input[str]) – Unique name of the auth backend to configure.
cidr_lists (pulumi.Input[list]) – If set, specifies blocks of IP addresses which can perform the login operation using this SecretID.
metadata (pulumi.Input[str]) – A JSON-encoded string containing metadata in key-value pairs to be set on tokens issued with this SecretID.
role_name (pulumi.Input[str]) – The name of the role to create the SecretID for.
secret_id (pulumi.Input[str]) – The SecretID to be created. If set, uses “Push” mode. Defaults to Vault auto-generating SecretIDs.
wrapping_accessor (pulumi.Input[str]) – The unique ID for the response-wrapped SecretID that can be safely logged.
wrapping_token (pulumi.Input[str]) – The token used to retrieve a response-wrapped SecretID.
wrapping_ttl (pulumi.Input[str]) –
If set, the SecretID response will be response-wrapped and available for the duration specified. Only a single unwrapping of the token is allowed.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_vault.app_role.AwaitableGetAuthBackendRoleIdResult(backend=None, id=None, role_id=None, role_name=None)¶
- class
pulumi_vault.app_role.GetAuthBackendRoleIdResult(backend=None, id=None, role_id=None, role_name=None)¶ A collection of values returned by getAuthBackendRoleId.
id= None¶The provider-assigned unique ID for this managed resource.
role_id= None¶The RoleID of the role.
pulumi_vault.app_role.get_auth_backend_role_id(backend=None, role_name=None, opts=None)¶Reads the Role ID of an AppRole from a Vault server.
import pulumi import pulumi_vault as vault role = vault.appRole.get_auth_backend_role_id(backend="my-approle-backend", role_name="my-role") pulumi.export("role-id", role.role_id)
- Parameters
backend (str) – The unique name for the AppRole backend the role to retrieve a RoleID for resides in. Defaults to “approle”.
role_name (str) – The name of the role to retrieve the Role ID for.