Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
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.aws.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.aws.SecretBackendRoleArgs.builder
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const aws = new vault.aws.SecretBackend("aws", {
* accessKey: "AKIA.....",
* secretKey: "AWS secret key",
* });
* const role = new vault.aws.SecretBackendRole("role", {
* backend: aws.path,
* name: "deploy",
* credentialType: "iam_user",
* policyDocument: `{
* "Version": "2012-10-17",
* "Statement": [
* {
* "Effect": "Allow",
* "Action": "iam:*",
* "Resource": "*"
* }
* ]
* }
* `,
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* aws = vault.aws.SecretBackend("aws",
* access_key="AKIA.....",
* secret_key="AWS secret key")
* role = vault.aws.SecretBackendRole("role",
* backend=aws.path,
* name="deploy",
* credential_type="iam_user",
* policy_document="""{
* "Version": "2012-10-17",
* "Statement": [
* {
* "Effect": "Allow",
* "Action": "iam:*",
* "Resource": "*"
* }
* ]
* }
* """)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var aws = new Vault.Aws.SecretBackend("aws", new()
* {
* AccessKey = "AKIA.....",
* SecretKey = "AWS secret key",
* });
* var role = new Vault.Aws.SecretBackendRole("role", new()
* {
* Backend = aws.Path,
* Name = "deploy",
* CredentialType = "iam_user",
* PolicyDocument = @"{
* ""Version"": ""2012-10-17"",
* ""Statement"": [
* {
* ""Effect"": ""Allow"",
* ""Action"": ""iam:*"",
* ""Resource"": ""*""
* }
* ]
* }
* ",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/aws"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* aws, err := aws.NewSecretBackend(ctx, "aws", &aws.SecretBackendArgs{
* AccessKey: pulumi.String("AKIA....."),
* SecretKey: pulumi.String("AWS secret key"),
* })
* if err != nil {
* return err
* }
* _, err = aws.NewSecretBackendRole(ctx, "role", &aws.SecretBackendRoleArgs{
* Backend: aws.Path,
* Name: pulumi.String("deploy"),
* CredentialType: pulumi.String("iam_user"),
* PolicyDocument: pulumi.String(`{
* "Version": "2012-10-17",
* "Statement": [
* {
* "Effect": "Allow",
* "Action": "iam:*",
* "Resource": "*"
* }
* ]
* }
* `),
* })
* 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.aws.SecretBackend;
* import com.pulumi.vault.aws.SecretBackendArgs;
* import com.pulumi.vault.aws.SecretBackendRole;
* import com.pulumi.vault.aws.SecretBackendRoleArgs;
* 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 aws = new SecretBackend("aws", SecretBackendArgs.builder()
* .accessKey("AKIA.....")
* .secretKey("AWS secret key")
* .build());
* var role = new SecretBackendRole("role", SecretBackendRoleArgs.builder()
* .backend(aws.path())
* .name("deploy")
* .credentialType("iam_user")
* .policyDocument("""
* {
* "Version": "2012-10-17",
* "Statement": [
* {
* "Effect": "Allow",
* "Action": "iam:*",
* "Resource": "*"
* }
* ]
* }
* """)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* aws:
* type: vault:aws:SecretBackend
* properties:
* accessKey: AKIA.....
* secretKey: AWS secret key
* role:
* type: vault:aws:SecretBackendRole
* properties:
* backend: ${aws.path}
* name: deploy
* credentialType: iam_user
* policyDocument: |
* {
* "Version": "2012-10-17",
* "Statement": [
* {
* "Effect": "Allow",
* "Action": "iam:*",
* "Resource": "*"
* }
* ]
* }
* ```
*
* ## Import
* AWS secret backend roles can be imported using the `path`, e.g.
* ```sh
* $ pulumi import vault:aws/secretBackendRole:SecretBackendRole role aws/roles/deploy
* ```
* @property backend The path the AWS secret backend is mounted at,
* with no leading or trailing `/`s.
* @property credentialType Specifies the type of credential to be used when
* retrieving credentials from the role. Must be one of `iam_user`, `assumed_role`, or
* `federation_token`.
* @property defaultStsTtl The default TTL in seconds for STS credentials.
* When a TTL is not specified when STS credentials are requested,
* and a default TTL is specified on the role,
* then this default TTL will be used. Valid only when `credential_type` is one of
* `assumed_role` or `federation_token`.
* @property externalId External ID to set for assume role creds.
* Valid only when `credential_type` is set to `assumed_role`.
* @property iamGroups A list of IAM group names. IAM users generated
* against this vault role will be added to these IAM Groups. For a credential
* type of `assumed_role` or `federation_token`, the policies sent to the
* corresponding AWS call (sts:AssumeRole or sts:GetFederation) will be the
* policies from each group in `iam_groups` combined with the `policy_document`
* and `policy_arns` parameters.
* @property iamTags A map of strings representing key/value pairs
* to be used as tags for any IAM user that is created by this role.
* @property maxStsTtl The max allowed TTL in seconds for STS credentials
* (credentials TTL are capped to `max_sts_ttl`). Valid only when `credential_type` is
* one of `assumed_role` or `federation_token`.
* @property name The name to identify this role within the backend.
* Must be unique within the backend.
* @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 permissionsBoundaryArn The ARN of the AWS Permissions
* Boundary to attach to IAM users created in the role. Valid only when
* `credential_type` is `iam_user`. If not specified, then no permissions boundary
* policy will be attached.
* @property policyArns Specifies a list of AWS managed policy ARNs. The
* behavior depends on the credential type. With `iam_user`, the policies will be
* attached to IAM users when they are requested. With `assumed_role` and
* `federation_token`, the policy ARNs will act as a filter on what the credentials
* can do, similar to `policy_document`. When `credential_type` is `iam_user` or
* `federation_token`, at least one of `policy_document` or `policy_arns` must
* be specified.
* @property policyDocument The IAM policy document for the role. The
* behavior depends on the credential type. With `iam_user`, the policy document
* will be attached to the IAM user generated and augment the permissions the IAM
* user has. With `assumed_role` and `federation_token`, the policy document will
* act as a filter on what the credentials can do, similar to `policy_arns`.
* @property roleArns Specifies the ARNs of the AWS roles this Vault role
* is allowed to assume. Required when `credential_type` is `assumed_role` and
* prohibited otherwise.
* @property sessionTags A map of strings representing key/value pairs to be set
* during assume role creds creation. Valid only when `credential_type` is set to
* `assumed_role`.
* @property userPath The path for the user name. Valid only when
* `credential_type` is `iam_user`. Default is `/`.
*/
public data class SecretBackendRoleArgs(
public val backend: Output? = null,
public val credentialType: Output? = null,
public val defaultStsTtl: Output? = null,
public val externalId: Output? = null,
public val iamGroups: Output>? = null,
public val iamTags: Output