com.pulumi.vault.identity.kotlin.GroupArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-vault-kotlin Show documentation
Show all versions of pulumi-vault-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.vault.identity.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.vault.identity.GroupArgs.builder
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Creates an Identity Group for Vault. The [Identity secrets engine](https://www.vaultproject.io/docs/secrets/identity/index.html) is the identity management solution for Vault.
* A group can contain multiple entities as its members. A group can also have subgroups. Policies set on the group is granted to all members of the group. During request time, when the token's entity ID is being evaluated for the policies that it has access to; along with the policies on the entity itself, policies that are inherited due to group memberships are also granted.
* ## Example Usage
* ### Internal Group
*
* ```typescript
* 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",
* ],
* metadata: {
* version: "2",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* internal = vault.identity.Group("internal",
* name="internal",
* type="internal",
* policies=[
* "dev",
* "test",
* ],
* metadata={
* "version": "2",
* })
* ```
* ```csharp
* 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",
* },
* Metadata =
* {
* { "version", "2" },
* },
* });
* });
* ```
* ```go
* 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.NewGroup(ctx, "internal", &identity.GroupArgs{
* Name: pulumi.String("internal"),
* Type: pulumi.String("internal"),
* Policies: pulumi.StringArray{
* pulumi.String("dev"),
* pulumi.String("test"),
* },
* Metadata: pulumi.StringMap{
* "version": pulumi.String("2"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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 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")
* .metadata(Map.of("version", "2"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* internal:
* type: vault:identity:Group
* properties:
* name: internal
* type: internal
* policies:
* - dev
* - test
* metadata:
* version: '2'
* ```
*
* ### External Group
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const group = new vault.identity.Group("group", {
* name: "external",
* type: "external",
* policies: ["test"],
* metadata: {
* version: "1",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* group = vault.identity.Group("group",
* name="external",
* type="external",
* policies=["test"],
* metadata={
* "version": "1",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var @group = new Vault.Identity.Group("group", new()
* {
* Name = "external",
* Type = "external",
* Policies = new[]
* {
* "test",
* },
* Metadata =
* {
* { "version", "1" },
* },
* });
* });
* ```
* ```go
* 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.NewGroup(ctx, "group", &identity.GroupArgs{
* Name: pulumi.String("external"),
* Type: pulumi.String("external"),
* Policies: pulumi.StringArray{
* pulumi.String("test"),
* },
* Metadata: pulumi.StringMap{
* "version": pulumi.String("1"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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 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 group = new Group("group", GroupArgs.builder()
* .name("external")
* .type("external")
* .policies("test")
* .metadata(Map.of("version", "1"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* group:
* type: vault:identity:Group
* properties:
* name: external
* type: external
* policies:
* - test
* metadata:
* version: '1'
* ```
*
* ## Caveats
* It's important to note that Vault identity groups names are *case-insensitive*. For example the following resources would be equivalent.
* Applying this configuration would result in the provider failing to create one of the identity groups, since the resources share the same `name`.
* This sort of pattern should be avoided:
*
* ```typescript
* 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",
* ],
* metadata: {
* version: "2",
* },
* });
* const internalGroup = new vault.identity.Group("Internal", {
* name: "Internal",
* type: "internal",
* policies: [
* "dev",
* "test",
* ],
* metadata: {
* version: "2",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* internal = vault.identity.Group("internal",
* name="internal",
* type="internal",
* policies=[
* "dev",
* "test",
* ],
* metadata={
* "version": "2",
* })
* internal_group = vault.identity.Group("Internal",
* name="Internal",
* type="internal",
* policies=[
* "dev",
* "test",
* ],
* metadata={
* "version": "2",
* })
* ```
* ```csharp
* 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",
* },
* Metadata =
* {
* { "version", "2" },
* },
* });
* var internalGroup = new Vault.Identity.Group("Internal", new()
* {
* Name = "Internal",
* Type = "internal",
* Policies = new[]
* {
* "dev",
* "test",
* },
* Metadata =
* {
* { "version", "2" },
* },
* });
* });
* ```
* ```go
* 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.NewGroup(ctx, "internal", &identity.GroupArgs{
* Name: pulumi.String("internal"),
* Type: pulumi.String("internal"),
* Policies: pulumi.StringArray{
* pulumi.String("dev"),
* pulumi.String("test"),
* },
* Metadata: pulumi.StringMap{
* "version": pulumi.String("2"),
* },
* })
* if err != nil {
* return err
* }
* _, err = identity.NewGroup(ctx, "Internal", &identity.GroupArgs{
* Name: pulumi.String("Internal"),
* Type: pulumi.String("internal"),
* Policies: pulumi.StringArray{
* pulumi.String("dev"),
* pulumi.String("test"),
* },
* Metadata: pulumi.StringMap{
* "version": pulumi.String("2"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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 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")
* .metadata(Map.of("version", "2"))
* .build());
* var internalGroup = new Group("internalGroup", GroupArgs.builder()
* .name("Internal")
* .type("internal")
* .policies(
* "dev",
* "test")
* .metadata(Map.of("version", "2"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* internal:
* type: vault:identity:Group
* properties:
* name: internal
* type: internal
* policies:
* - dev
* - test
* metadata:
* version: '2'
* internalGroup:
* type: vault:identity:Group
* name: Internal
* properties:
* name: Internal
* type: internal
* policies:
* - dev
* - test
* metadata:
* version: '2'
* ```
*
* ## Import
* Identity group can be imported using the `id`, e.g.
* ```sh
* $ pulumi import vault:identity/group:Group test 'fcbf1efb-2b69-4209-bed8-811e3475dad3'
* ```
* @property externalMemberEntityIds `false` by default. If set to `true`, this resource will ignore any Entity IDs
* returned from Vault or specified in the resource. You can use
* `vault.identity.GroupMemberEntityIds` to manage Entity IDs for this group in a
* decoupled manner.
* @property externalMemberGroupIds `false` by default. If set to `true`, this resource will ignore any Group IDs
* returned from Vault or specified in the resource. You can use
* `vault.identity.GroupMemberGroupIds` to manage Group IDs for this group in a
* decoupled manner.
* @property externalPolicies `false` by default. If set to `true`, this resource will ignore any policies returned from
* Vault or specified in the resource. You can use `vault.identity.GroupPolicies` to manage
* policies for this group in a decoupled manner.
* @property memberEntityIds A list of Entity IDs to be assigned as group members. Not allowed on `external` groups.
* @property memberGroupIds A list of Group IDs to be assigned as group members. Not allowed on `external` groups.
* @property metadata A Map of additional metadata to associate with the group.
* @property name Name of the identity group to create.
* @property namespace 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](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
* @property policies A list of policies to apply to the group.
* @property type Type of the group, internal or external. Defaults to `internal`.
*/
public data class GroupArgs(
public val externalMemberEntityIds: Output? = null,
public val externalMemberGroupIds: Output? = null,
public val externalPolicies: Output? = null,
public val memberEntityIds: Output>? = null,
public val memberGroupIds: Output>? = null,
public val metadata: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy