vault.identity.Entity
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const test = new vault.identity.Entity("test", {
name: "tester1",
policies: ["test"],
metadata: {
foo: "bar",
},
});
import pulumi
import pulumi_vault as vault
test = vault.identity.Entity("test",
name="tester1",
policies=["test"],
metadata={
"foo": "bar",
})
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/identity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := identity.NewEntity(ctx, "test", &identity.EntityArgs{
Name: pulumi.String("tester1"),
Policies: pulumi.StringArray{
pulumi.String("test"),
},
Metadata: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
})
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 test = new Vault.Identity.Entity("test", new()
{
Name = "tester1",
Policies = new[]
{
"test",
},
Metadata =
{
{ "foo", "bar" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.identity.Entity;
import com.pulumi.vault.identity.EntityArgs;
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 test = new Entity("test", EntityArgs.builder()
.name("tester1")
.policies("test")
.metadata(Map.of("foo", "bar"))
.build());
}
}
resources:
test:
type: vault:identity:Entity
properties:
name: tester1
policies:
- test
metadata:
foo: bar
Create Entity Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Entity(name: string, args?: EntityArgs, opts?: CustomResourceOptions);
@overload
def Entity(resource_name: str,
args: Optional[EntityArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Entity(resource_name: str,
opts: Optional[ResourceOptions] = None,
disabled: Optional[bool] = None,
external_policies: Optional[bool] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
policies: Optional[Sequence[str]] = None)
func NewEntity(ctx *Context, name string, args *EntityArgs, opts ...ResourceOption) (*Entity, error)
public Entity(string name, EntityArgs? args = null, CustomResourceOptions? opts = null)
public Entity(String name, EntityArgs args)
public Entity(String name, EntityArgs args, CustomResourceOptions options)
type: vault:identity:Entity
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args EntityArgs
- 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 EntityArgs
- 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 EntityArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EntityArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EntityArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var entityResource = new Vault.Identity.Entity("entityResource", new()
{
Disabled = false,
ExternalPolicies = false,
Metadata =
{
{ "string", "string" },
},
Name = "string",
Namespace = "string",
Policies = new[]
{
"string",
},
});
example, err := identity.NewEntity(ctx, "entityResource", &identity.EntityArgs{
Disabled: pulumi.Bool(false),
ExternalPolicies: pulumi.Bool(false),
Metadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Namespace: pulumi.String("string"),
Policies: pulumi.StringArray{
pulumi.String("string"),
},
})
var entityResource = new Entity("entityResource", EntityArgs.builder()
.disabled(false)
.externalPolicies(false)
.metadata(Map.of("string", "string"))
.name("string")
.namespace("string")
.policies("string")
.build());
entity_resource = vault.identity.Entity("entityResource",
disabled=False,
external_policies=False,
metadata={
"string": "string",
},
name="string",
namespace="string",
policies=["string"])
const entityResource = new vault.identity.Entity("entityResource", {
disabled: false,
externalPolicies: false,
metadata: {
string: "string",
},
name: "string",
namespace: "string",
policies: ["string"],
});
type: vault:identity:Entity
properties:
disabled: false
externalPolicies: false
metadata:
string: string
name: string
namespace: string
policies:
- string
Entity 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 Entity resource accepts the following input properties:
- Disabled bool
- True/false Is this entity currently disabled. Defaults to
false
- External
Policies bool false
by default. If set totrue
, this resource will ignore any policies return from Vault or specified in the resource. You can usevault.identity.EntityPolicies
to manage policies for this entity in a decoupled manner.- Metadata Dictionary<string, string>
- A Map of additional metadata to associate with the user.
- Name string
- Name of the identity entity to create.
- Namespace string
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise. - Policies List<string>
- A list of policies to apply to the entity.
- Disabled bool
- True/false Is this entity currently disabled. Defaults to
false
- External
Policies bool false
by default. If set totrue
, this resource will ignore any policies return from Vault or specified in the resource. You can usevault.identity.EntityPolicies
to manage policies for this entity in a decoupled manner.- Metadata map[string]string
- A Map of additional metadata to associate with the user.
- Name string
- Name of the identity entity to create.
- Namespace string
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise. - Policies []string
- A list of policies to apply to the entity.
- disabled Boolean
- True/false Is this entity currently disabled. Defaults to
false
- external
Policies Boolean false
by default. If set totrue
, this resource will ignore any policies return from Vault or specified in the resource. You can usevault.identity.EntityPolicies
to manage policies for this entity in a decoupled manner.- metadata Map<String,String>
- A Map of additional metadata to associate with the user.
- name String
- Name of the identity entity to create.
- namespace String
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise. - policies List<String>
- A list of policies to apply to the entity.
- disabled boolean
- True/false Is this entity currently disabled. Defaults to
false
- external
Policies boolean false
by default. If set totrue
, this resource will ignore any policies return from Vault or specified in the resource. You can usevault.identity.EntityPolicies
to manage policies for this entity in a decoupled manner.- metadata {[key: string]: string}
- A Map of additional metadata to associate with the user.
- name string
- Name of the identity entity to create.
- namespace string
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise. - policies string[]
- A list of policies to apply to the entity.
- disabled bool
- True/false Is this entity currently disabled. Defaults to
false
- external_
policies bool false
by default. If set totrue
, this resource will ignore any policies return from Vault or specified in the resource. You can usevault.identity.EntityPolicies
to manage policies for this entity in a decoupled manner.- metadata Mapping[str, str]
- A Map of additional metadata to associate with the user.
- name str
- Name of the identity entity to create.
- namespace str
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise. - policies Sequence[str]
- A list of policies to apply to the entity.
- disabled Boolean
- True/false Is this entity currently disabled. Defaults to
false
- external
Policies Boolean false
by default. If set totrue
, this resource will ignore any policies return from Vault or specified in the resource. You can usevault.identity.EntityPolicies
to manage policies for this entity in a decoupled manner.- metadata Map<String>
- A Map of additional metadata to associate with the user.
- name String
- Name of the identity entity to create.
- namespace String
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise. - policies List<String>
- A list of policies to apply to the entity.
Outputs
All input properties are implicitly available as output properties. Additionally, the Entity 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 Entity Resource
Get an existing Entity 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?: EntityState, opts?: CustomResourceOptions): Entity
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
disabled: Optional[bool] = None,
external_policies: Optional[bool] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
policies: Optional[Sequence[str]] = None) -> Entity
func GetEntity(ctx *Context, name string, id IDInput, state *EntityState, opts ...ResourceOption) (*Entity, error)
public static Entity Get(string name, Input<string> id, EntityState? state, CustomResourceOptions? opts = null)
public static Entity get(String name, Output<String> id, EntityState 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.
- Disabled bool
- True/false Is this entity currently disabled. Defaults to
false
- External
Policies bool false
by default. If set totrue
, this resource will ignore any policies return from Vault or specified in the resource. You can usevault.identity.EntityPolicies
to manage policies for this entity in a decoupled manner.- Metadata Dictionary<string, string>
- A Map of additional metadata to associate with the user.
- Name string
- Name of the identity entity to create.
- Namespace string
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise. - Policies List<string>
- A list of policies to apply to the entity.
- Disabled bool
- True/false Is this entity currently disabled. Defaults to
false
- External
Policies bool false
by default. If set totrue
, this resource will ignore any policies return from Vault or specified in the resource. You can usevault.identity.EntityPolicies
to manage policies for this entity in a decoupled manner.- Metadata map[string]string
- A Map of additional metadata to associate with the user.
- Name string
- Name of the identity entity to create.
- Namespace string
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise. - Policies []string
- A list of policies to apply to the entity.
- disabled Boolean
- True/false Is this entity currently disabled. Defaults to
false
- external
Policies Boolean false
by default. If set totrue
, this resource will ignore any policies return from Vault or specified in the resource. You can usevault.identity.EntityPolicies
to manage policies for this entity in a decoupled manner.- metadata Map<String,String>
- A Map of additional metadata to associate with the user.
- name String
- Name of the identity entity to create.
- namespace String
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise. - policies List<String>
- A list of policies to apply to the entity.
- disabled boolean
- True/false Is this entity currently disabled. Defaults to
false
- external
Policies boolean false
by default. If set totrue
, this resource will ignore any policies return from Vault or specified in the resource. You can usevault.identity.EntityPolicies
to manage policies for this entity in a decoupled manner.- metadata {[key: string]: string}
- A Map of additional metadata to associate with the user.
- name string
- Name of the identity entity to create.
- namespace string
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise. - policies string[]
- A list of policies to apply to the entity.
- disabled bool
- True/false Is this entity currently disabled. Defaults to
false
- external_
policies bool false
by default. If set totrue
, this resource will ignore any policies return from Vault or specified in the resource. You can usevault.identity.EntityPolicies
to manage policies for this entity in a decoupled manner.- metadata Mapping[str, str]
- A Map of additional metadata to associate with the user.
- name str
- Name of the identity entity to create.
- namespace str
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise. - policies Sequence[str]
- A list of policies to apply to the entity.
- disabled Boolean
- True/false Is this entity currently disabled. Defaults to
false
- external
Policies Boolean false
by default. If set totrue
, this resource will ignore any policies return from Vault or specified in the resource. You can usevault.identity.EntityPolicies
to manage policies for this entity in a decoupled manner.- metadata Map<String>
- A Map of additional metadata to associate with the user.
- name String
- Name of the identity entity to create.
- namespace String
- The namespace to provision the resource in.
The value should not contain leading or trailing forward slashes.
The
namespace
is always relative to the provider's configured namespace. Available only for Vault Enterprise. - policies List<String>
- A list of policies to apply to the entity.
Import
Identity entity can be imported using the id
, e.g.
$ pulumi import vault:identity/entity:Entity test "ae6f8ued-0f1a-9f6b-2915-1a2be20dc053"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Vault pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vault
Terraform Provider.