1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. aws
  5. AuthBackendStsRole
HashiCorp Vault v5.17.0 published on Thursday, Nov 9, 2023 by Pulumi

vault.aws.AuthBackendStsRole

Explore with Pulumi AI

vault logo
HashiCorp Vault v5.17.0 published on Thursday, Nov 9, 2023 by Pulumi

    Import

    AWS auth backend STS roles can be imported using auth/, the backend path, /config/sts/, and the account_id e.g.

     $ pulumi import vault:aws/authBackendStsRole:AuthBackendStsRole example auth/aws/config/sts/1234567890
    

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var aws = new Vault.AuthBackend("aws", new()
        {
            Type = "aws",
        });
    
        var role = new Vault.Aws.AuthBackendStsRole("role", new()
        {
            Backend = aws.Path,
            AccountId = "1234567890",
            StsRole = "arn:aws:iam::1234567890:role/my-role",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v5/go/vault"
    	"github.com/pulumi/pulumi-vault/sdk/v5/go/vault/aws"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		aws, err := vault.NewAuthBackend(ctx, "aws", &vault.AuthBackendArgs{
    			Type: pulumi.String("aws"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = aws.NewAuthBackendStsRole(ctx, "role", &aws.AuthBackendStsRoleArgs{
    			Backend:   aws.Path,
    			AccountId: pulumi.String("1234567890"),
    			StsRole:   pulumi.String("arn:aws:iam::1234567890:role/my-role"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.AuthBackend;
    import com.pulumi.vault.AuthBackendArgs;
    import com.pulumi.vault.aws.AuthBackendStsRole;
    import com.pulumi.vault.aws.AuthBackendStsRoleArgs;
    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 AuthBackend("aws", AuthBackendArgs.builder()        
                .type("aws")
                .build());
    
            var role = new AuthBackendStsRole("role", AuthBackendStsRoleArgs.builder()        
                .backend(aws.path())
                .accountId("1234567890")
                .stsRole("arn:aws:iam::1234567890:role/my-role")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_vault as vault
    
    aws = vault.AuthBackend("aws", type="aws")
    role = vault.aws.AuthBackendStsRole("role",
        backend=aws.path,
        account_id="1234567890",
        sts_role="arn:aws:iam::1234567890:role/my-role")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const aws = new vault.AuthBackend("aws", {type: "aws"});
    const role = new vault.aws.AuthBackendStsRole("role", {
        backend: aws.path,
        accountId: "1234567890",
        stsRole: "arn:aws:iam::1234567890:role/my-role",
    });
    
    resources:
      aws:
        type: vault:AuthBackend
        properties:
          type: aws
      role:
        type: vault:aws:AuthBackendStsRole
        properties:
          backend: ${aws.path}
          accountId: '1234567890'
          stsRole: arn:aws:iam::1234567890:role/my-role
    

    Create AuthBackendStsRole Resource

    new AuthBackendStsRole(name: string, args: AuthBackendStsRoleArgs, opts?: CustomResourceOptions);
    @overload
    def AuthBackendStsRole(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           account_id: Optional[str] = None,
                           backend: Optional[str] = None,
                           namespace: Optional[str] = None,
                           sts_role: Optional[str] = None)
    @overload
    def AuthBackendStsRole(resource_name: str,
                           args: AuthBackendStsRoleArgs,
                           opts: Optional[ResourceOptions] = None)
    func NewAuthBackendStsRole(ctx *Context, name string, args AuthBackendStsRoleArgs, opts ...ResourceOption) (*AuthBackendStsRole, error)
    public AuthBackendStsRole(string name, AuthBackendStsRoleArgs args, CustomResourceOptions? opts = null)
    public AuthBackendStsRole(String name, AuthBackendStsRoleArgs args)
    public AuthBackendStsRole(String name, AuthBackendStsRoleArgs args, CustomResourceOptions options)
    
    type: vault:aws:AuthBackendStsRole
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args AuthBackendStsRoleArgs
    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 AuthBackendStsRoleArgs
    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 AuthBackendStsRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AuthBackendStsRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AuthBackendStsRoleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    AuthBackendStsRole 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 AuthBackendStsRole resource accepts the following input properties:

    AccountId string

    The AWS account ID to configure the STS role for.

    StsRole string

    The STS role to assume when verifying requests made by EC2 instances in the account specified by account_id.

    Backend string

    The path the AWS auth backend being configured was mounted at. Defaults to aws.

    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.

    AccountId string

    The AWS account ID to configure the STS role for.

    StsRole string

    The STS role to assume when verifying requests made by EC2 instances in the account specified by account_id.

    Backend string

    The path the AWS auth backend being configured was mounted at. Defaults to aws.

    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.

    accountId String

    The AWS account ID to configure the STS role for.

    stsRole String

    The STS role to assume when verifying requests made by EC2 instances in the account specified by account_id.

    backend String

    The path the AWS auth backend being configured was mounted at. Defaults to aws.

    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.

    accountId string

    The AWS account ID to configure the STS role for.

    stsRole string

    The STS role to assume when verifying requests made by EC2 instances in the account specified by account_id.

    backend string

    The path the AWS auth backend being configured was mounted at. Defaults to aws.

    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.

    account_id str

    The AWS account ID to configure the STS role for.

    sts_role str

    The STS role to assume when verifying requests made by EC2 instances in the account specified by account_id.

    backend str

    The path the AWS auth backend being configured was mounted at. Defaults to aws.

    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.

    accountId String

    The AWS account ID to configure the STS role for.

    stsRole String

    The STS role to assume when verifying requests made by EC2 instances in the account specified by account_id.

    backend String

    The path the AWS auth backend being configured was mounted at. Defaults to aws.

    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 AuthBackendStsRole 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 AuthBackendStsRole Resource

    Get an existing AuthBackendStsRole 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?: AuthBackendStsRoleState, opts?: CustomResourceOptions): AuthBackendStsRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            backend: Optional[str] = None,
            namespace: Optional[str] = None,
            sts_role: Optional[str] = None) -> AuthBackendStsRole
    func GetAuthBackendStsRole(ctx *Context, name string, id IDInput, state *AuthBackendStsRoleState, opts ...ResourceOption) (*AuthBackendStsRole, error)
    public static AuthBackendStsRole Get(string name, Input<string> id, AuthBackendStsRoleState? state, CustomResourceOptions? opts = null)
    public static AuthBackendStsRole get(String name, Output<String> id, AuthBackendStsRoleState 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.
    The following state arguments are supported:
    AccountId string

    The AWS account ID to configure the STS role for.

    Backend string

    The path the AWS auth backend being configured was mounted at. Defaults to aws.

    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.

    StsRole string

    The STS role to assume when verifying requests made by EC2 instances in the account specified by account_id.

    AccountId string

    The AWS account ID to configure the STS role for.

    Backend string

    The path the AWS auth backend being configured was mounted at. Defaults to aws.

    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.

    StsRole string

    The STS role to assume when verifying requests made by EC2 instances in the account specified by account_id.

    accountId String

    The AWS account ID to configure the STS role for.

    backend String

    The path the AWS auth backend being configured was mounted at. Defaults to aws.

    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.

    stsRole String

    The STS role to assume when verifying requests made by EC2 instances in the account specified by account_id.

    accountId string

    The AWS account ID to configure the STS role for.

    backend string

    The path the AWS auth backend being configured was mounted at. Defaults to aws.

    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.

    stsRole string

    The STS role to assume when verifying requests made by EC2 instances in the account specified by account_id.

    account_id str

    The AWS account ID to configure the STS role for.

    backend str

    The path the AWS auth backend being configured was mounted at. Defaults to aws.

    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.

    sts_role str

    The STS role to assume when verifying requests made by EC2 instances in the account specified by account_id.

    accountId String

    The AWS account ID to configure the STS role for.

    backend String

    The path the AWS auth backend being configured was mounted at. Defaults to aws.

    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.

    stsRole String

    The STS role to assume when verifying requests made by EC2 instances in the account specified by account_id.

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the vault Terraform Provider.

    vault logo
    HashiCorp Vault v5.17.0 published on Thursday, Nov 9, 2023 by Pulumi