vault.identity.OidcAssignment
Explore with Pulumi AI
Manages OIDC Assignments in a Vault server. See the Vault documentation for more information.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const internal = new vault.identity.Group("internal", {
name: "internal",
type: "internal",
policies: [
"dev",
"test",
],
});
const test = new vault.identity.Entity("test", {
name: "test",
policies: ["test"],
});
const _default = new vault.identity.OidcAssignment("default", {
name: "assignment",
entityIds: [test.id],
groupIds: [internal.id],
});
import pulumi
import pulumi_vault as vault
internal = vault.identity.Group("internal",
name="internal",
type="internal",
policies=[
"dev",
"test",
])
test = vault.identity.Entity("test",
name="test",
policies=["test"])
default = vault.identity.OidcAssignment("default",
name="assignment",
entity_ids=[test.id],
group_ids=[internal.id])
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 {
internal, err := identity.NewGroup(ctx, "internal", &identity.GroupArgs{
Name: pulumi.String("internal"),
Type: pulumi.String("internal"),
Policies: pulumi.StringArray{
pulumi.String("dev"),
pulumi.String("test"),
},
})
if err != nil {
return err
}
test, err := identity.NewEntity(ctx, "test", &identity.EntityArgs{
Name: pulumi.String("test"),
Policies: pulumi.StringArray{
pulumi.String("test"),
},
})
if err != nil {
return err
}
_, err = identity.NewOidcAssignment(ctx, "default", &identity.OidcAssignmentArgs{
Name: pulumi.String("assignment"),
EntityIds: pulumi.StringArray{
test.ID(),
},
GroupIds: pulumi.StringArray{
internal.ID(),
},
})
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 @internal = new Vault.Identity.Group("internal", new()
{
Name = "internal",
Type = "internal",
Policies = new[]
{
"dev",
"test",
},
});
var test = new Vault.Identity.Entity("test", new()
{
Name = "test",
Policies = new[]
{
"test",
},
});
var @default = new Vault.Identity.OidcAssignment("default", new()
{
Name = "assignment",
EntityIds = new[]
{
test.Id,
},
GroupIds = new[]
{
@internal.Id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.identity.Group;
import com.pulumi.vault.identity.GroupArgs;
import com.pulumi.vault.identity.Entity;
import com.pulumi.vault.identity.EntityArgs;
import com.pulumi.vault.identity.OidcAssignment;
import com.pulumi.vault.identity.OidcAssignmentArgs;
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 internal = new Group("internal", GroupArgs.builder()
.name("internal")
.type("internal")
.policies(
"dev",
"test")
.build());
var test = new Entity("test", EntityArgs.builder()
.name("test")
.policies("test")
.build());
var default_ = new OidcAssignment("default", OidcAssignmentArgs.builder()
.name("assignment")
.entityIds(test.id())
.groupIds(internal.id())
.build());
}
}
resources:
internal:
type: vault:identity:Group
properties:
name: internal
type: internal
policies:
- dev
- test
test:
type: vault:identity:Entity
properties:
name: test
policies:
- test
default:
type: vault:identity:OidcAssignment
properties:
name: assignment
entityIds:
- ${test.id}
groupIds:
- ${internal.id}
Create OidcAssignment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OidcAssignment(name: string, args?: OidcAssignmentArgs, opts?: CustomResourceOptions);
@overload
def OidcAssignment(resource_name: str,
args: Optional[OidcAssignmentArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def OidcAssignment(resource_name: str,
opts: Optional[ResourceOptions] = None,
entity_ids: Optional[Sequence[str]] = None,
group_ids: Optional[Sequence[str]] = None,
name: Optional[str] = None,
namespace: Optional[str] = None)
func NewOidcAssignment(ctx *Context, name string, args *OidcAssignmentArgs, opts ...ResourceOption) (*OidcAssignment, error)
public OidcAssignment(string name, OidcAssignmentArgs? args = null, CustomResourceOptions? opts = null)
public OidcAssignment(String name, OidcAssignmentArgs args)
public OidcAssignment(String name, OidcAssignmentArgs args, CustomResourceOptions options)
type: vault:identity:OidcAssignment
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 OidcAssignmentArgs
- 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 OidcAssignmentArgs
- 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 OidcAssignmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OidcAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OidcAssignmentArgs
- 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 oidcAssignmentResource = new Vault.Identity.OidcAssignment("oidcAssignmentResource", new()
{
EntityIds = new[]
{
"string",
},
GroupIds = new[]
{
"string",
},
Name = "string",
Namespace = "string",
});
example, err := identity.NewOidcAssignment(ctx, "oidcAssignmentResource", &identity.OidcAssignmentArgs{
EntityIds: pulumi.StringArray{
pulumi.String("string"),
},
GroupIds: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
Namespace: pulumi.String("string"),
})
var oidcAssignmentResource = new OidcAssignment("oidcAssignmentResource", OidcAssignmentArgs.builder()
.entityIds("string")
.groupIds("string")
.name("string")
.namespace("string")
.build());
oidc_assignment_resource = vault.identity.OidcAssignment("oidcAssignmentResource",
entity_ids=["string"],
group_ids=["string"],
name="string",
namespace="string")
const oidcAssignmentResource = new vault.identity.OidcAssignment("oidcAssignmentResource", {
entityIds: ["string"],
groupIds: ["string"],
name: "string",
namespace: "string",
});
type: vault:identity:OidcAssignment
properties:
entityIds:
- string
groupIds:
- string
name: string
namespace: string
OidcAssignment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The OidcAssignment resource accepts the following input properties:
- Entity
Ids List<string> - A set of Vault entity IDs.
- Group
Ids List<string> - A set of Vault group IDs.
- Name string
- The name of the assignment.
- 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.
- Entity
Ids []string - A set of Vault entity IDs.
- Group
Ids []string - A set of Vault group IDs.
- Name string
- The name of the assignment.
- 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.
- entity
Ids List<String> - A set of Vault entity IDs.
- group
Ids List<String> - A set of Vault group IDs.
- name String
- The name of the assignment.
- 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.
- entity
Ids string[] - A set of Vault entity IDs.
- group
Ids string[] - A set of Vault group IDs.
- name string
- The name of the assignment.
- 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.
- entity_
ids Sequence[str] - A set of Vault entity IDs.
- group_
ids Sequence[str] - A set of Vault group IDs.
- name str
- The name of the assignment.
- 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.
- entity
Ids List<String> - A set of Vault entity IDs.
- group
Ids List<String> - A set of Vault group IDs.
- name String
- The name of the assignment.
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the OidcAssignment 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 OidcAssignment Resource
Get an existing OidcAssignment 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?: OidcAssignmentState, opts?: CustomResourceOptions): OidcAssignment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
entity_ids: Optional[Sequence[str]] = None,
group_ids: Optional[Sequence[str]] = None,
name: Optional[str] = None,
namespace: Optional[str] = None) -> OidcAssignment
func GetOidcAssignment(ctx *Context, name string, id IDInput, state *OidcAssignmentState, opts ...ResourceOption) (*OidcAssignment, error)
public static OidcAssignment Get(string name, Input<string> id, OidcAssignmentState? state, CustomResourceOptions? opts = null)
public static OidcAssignment get(String name, Output<String> id, OidcAssignmentState 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.
- Entity
Ids List<string> - A set of Vault entity IDs.
- Group
Ids List<string> - A set of Vault group IDs.
- Name string
- The name of the assignment.
- 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.
- Entity
Ids []string - A set of Vault entity IDs.
- Group
Ids []string - A set of Vault group IDs.
- Name string
- The name of the assignment.
- 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.
- entity
Ids List<String> - A set of Vault entity IDs.
- group
Ids List<String> - A set of Vault group IDs.
- name String
- The name of the assignment.
- 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.
- entity
Ids string[] - A set of Vault entity IDs.
- group
Ids string[] - A set of Vault group IDs.
- name string
- The name of the assignment.
- 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.
- entity_
ids Sequence[str] - A set of Vault entity IDs.
- group_
ids Sequence[str] - A set of Vault group IDs.
- name str
- The name of the assignment.
- 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.
- entity
Ids List<String> - A set of Vault entity IDs.
- group
Ids List<String> - A set of Vault group IDs.
- name String
- The name of the assignment.
- 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.
Import
OIDC Assignments can be imported using the name
, e.g.
$ pulumi import vault:identity/oidcAssignment:OidcAssignment default assignment
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.