1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. terraformcloud
  5. SecretCreds
HashiCorp Vault v5.20.0 published on Tuesday, Feb 20, 2024 by Pulumi

vault.terraformcloud.SecretCreds

Explore with Pulumi AI

vault logo
HashiCorp Vault v5.20.0 published on Tuesday, Feb 20, 2024 by Pulumi

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Vault.TerraformCloud.SecretBackend("test", new()
        {
            Backend = "terraform",
            Description = "Manages the Terraform Cloud backend",
            Token = "V0idfhi2iksSDU234ucdbi2nidsi...",
        });
    
        var example = new Vault.TerraformCloud.SecretRole("example", new()
        {
            Backend = test.Backend,
            Organization = "example-organization-name",
            TeamId = "team-ieF4isC...",
        });
    
        var token = new Vault.TerraformCloud.SecretCreds("token", new()
        {
            Backend = test.Backend,
            Role = example.Name,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v5/go/vault/terraformcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		test, err := terraformcloud.NewSecretBackend(ctx, "test", &terraformcloud.SecretBackendArgs{
    			Backend:     pulumi.String("terraform"),
    			Description: pulumi.String("Manages the Terraform Cloud backend"),
    			Token:       pulumi.String("V0idfhi2iksSDU234ucdbi2nidsi..."),
    		})
    		if err != nil {
    			return err
    		}
    		example, err := terraformcloud.NewSecretRole(ctx, "example", &terraformcloud.SecretRoleArgs{
    			Backend:      test.Backend,
    			Organization: pulumi.String("example-organization-name"),
    			TeamId:       pulumi.String("team-ieF4isC..."),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = terraformcloud.NewSecretCreds(ctx, "token", &terraformcloud.SecretCredsArgs{
    			Backend: test.Backend,
    			Role:    example.Name,
    		})
    		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.terraformcloud.SecretBackend;
    import com.pulumi.vault.terraformcloud.SecretBackendArgs;
    import com.pulumi.vault.terraformcloud.SecretRole;
    import com.pulumi.vault.terraformcloud.SecretRoleArgs;
    import com.pulumi.vault.terraformcloud.SecretCreds;
    import com.pulumi.vault.terraformcloud.SecretCredsArgs;
    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 SecretBackend("test", SecretBackendArgs.builder()        
                .backend("terraform")
                .description("Manages the Terraform Cloud backend")
                .token("V0idfhi2iksSDU234ucdbi2nidsi...")
                .build());
    
            var example = new SecretRole("example", SecretRoleArgs.builder()        
                .backend(test.backend())
                .organization("example-organization-name")
                .teamId("team-ieF4isC...")
                .build());
    
            var token = new SecretCreds("token", SecretCredsArgs.builder()        
                .backend(test.backend())
                .role(example.name())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_vault as vault
    
    test = vault.terraformcloud.SecretBackend("test",
        backend="terraform",
        description="Manages the Terraform Cloud backend",
        token="V0idfhi2iksSDU234ucdbi2nidsi...")
    example = vault.terraformcloud.SecretRole("example",
        backend=test.backend,
        organization="example-organization-name",
        team_id="team-ieF4isC...")
    token = vault.terraformcloud.SecretCreds("token",
        backend=test.backend,
        role=example.name)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const test = new vault.terraformcloud.SecretBackend("test", {
        backend: "terraform",
        description: "Manages the Terraform Cloud backend",
        token: "V0idfhi2iksSDU234ucdbi2nidsi...",
    });
    const example = new vault.terraformcloud.SecretRole("example", {
        backend: test.backend,
        organization: "example-organization-name",
        teamId: "team-ieF4isC...",
    });
    const token = new vault.terraformcloud.SecretCreds("token", {
        backend: test.backend,
        role: example.name,
    });
    
    resources:
      test:
        type: vault:terraformcloud:SecretBackend
        properties:
          backend: terraform
          description: Manages the Terraform Cloud backend
          token: V0idfhi2iksSDU234ucdbi2nidsi...
      example:
        type: vault:terraformcloud:SecretRole
        properties:
          backend: ${test.backend}
          organization: example-organization-name
          teamId: team-ieF4isC...
      token:
        type: vault:terraformcloud:SecretCreds
        properties:
          backend: ${test.backend}
          role: ${example.name}
    

    Create SecretCreds Resource

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

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

    Backend string
    Terraform Cloud secret backend to generate tokens from
    Role string
    Name of the role.
    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.
    Backend string
    Terraform Cloud secret backend to generate tokens from
    Role string
    Name of the role.
    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.
    backend String
    Terraform Cloud secret backend to generate tokens from
    role String
    Name of the role.
    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.
    backend string
    Terraform Cloud secret backend to generate tokens from
    role string
    Name of the role.
    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.
    backend str
    Terraform Cloud secret backend to generate tokens from
    role str
    Name of the role.
    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.
    backend String
    Terraform Cloud secret backend to generate tokens from
    role String
    Name of the role.
    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 SecretCreds resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    LeaseId string
    The lease associated with the token. Only user tokens will have a Vault lease associated with them.
    Organization string
    The organization associated with the token provided.
    TeamId string
    The team id associated with the token provided.
    Token string
    The actual token that was generated and can be used with API calls to identify the user of the call.
    TokenId string
    The public identifier for a specific token. It can be used to look up information about a token or to revoke a token.
    Id string
    The provider-assigned unique ID for this managed resource.
    LeaseId string
    The lease associated with the token. Only user tokens will have a Vault lease associated with them.
    Organization string
    The organization associated with the token provided.
    TeamId string
    The team id associated with the token provided.
    Token string
    The actual token that was generated and can be used with API calls to identify the user of the call.
    TokenId string
    The public identifier for a specific token. It can be used to look up information about a token or to revoke a token.
    id String
    The provider-assigned unique ID for this managed resource.
    leaseId String
    The lease associated with the token. Only user tokens will have a Vault lease associated with them.
    organization String
    The organization associated with the token provided.
    teamId String
    The team id associated with the token provided.
    token String
    The actual token that was generated and can be used with API calls to identify the user of the call.
    tokenId String
    The public identifier for a specific token. It can be used to look up information about a token or to revoke a token.
    id string
    The provider-assigned unique ID for this managed resource.
    leaseId string
    The lease associated with the token. Only user tokens will have a Vault lease associated with them.
    organization string
    The organization associated with the token provided.
    teamId string
    The team id associated with the token provided.
    token string
    The actual token that was generated and can be used with API calls to identify the user of the call.
    tokenId string
    The public identifier for a specific token. It can be used to look up information about a token or to revoke a token.
    id str
    The provider-assigned unique ID for this managed resource.
    lease_id str
    The lease associated with the token. Only user tokens will have a Vault lease associated with them.
    organization str
    The organization associated with the token provided.
    team_id str
    The team id associated with the token provided.
    token str
    The actual token that was generated and can be used with API calls to identify the user of the call.
    token_id str
    The public identifier for a specific token. It can be used to look up information about a token or to revoke a token.
    id String
    The provider-assigned unique ID for this managed resource.
    leaseId String
    The lease associated with the token. Only user tokens will have a Vault lease associated with them.
    organization String
    The organization associated with the token provided.
    teamId String
    The team id associated with the token provided.
    token String
    The actual token that was generated and can be used with API calls to identify the user of the call.
    tokenId String
    The public identifier for a specific token. It can be used to look up information about a token or to revoke a token.

    Look up Existing SecretCreds Resource

    Get an existing SecretCreds 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?: SecretCredsState, opts?: CustomResourceOptions): SecretCreds
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backend: Optional[str] = None,
            lease_id: Optional[str] = None,
            namespace: Optional[str] = None,
            organization: Optional[str] = None,
            role: Optional[str] = None,
            team_id: Optional[str] = None,
            token: Optional[str] = None,
            token_id: Optional[str] = None) -> SecretCreds
    func GetSecretCreds(ctx *Context, name string, id IDInput, state *SecretCredsState, opts ...ResourceOption) (*SecretCreds, error)
    public static SecretCreds Get(string name, Input<string> id, SecretCredsState? state, CustomResourceOptions? opts = null)
    public static SecretCreds get(String name, Output<String> id, SecretCredsState 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:
    Backend string
    Terraform Cloud secret backend to generate tokens from
    LeaseId string
    The lease associated with the token. Only user tokens will have a Vault lease associated with them.
    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.
    Organization string
    The organization associated with the token provided.
    Role string
    Name of the role.
    TeamId string
    The team id associated with the token provided.
    Token string
    The actual token that was generated and can be used with API calls to identify the user of the call.
    TokenId string
    The public identifier for a specific token. It can be used to look up information about a token or to revoke a token.
    Backend string
    Terraform Cloud secret backend to generate tokens from
    LeaseId string
    The lease associated with the token. Only user tokens will have a Vault lease associated with them.
    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.
    Organization string
    The organization associated with the token provided.
    Role string
    Name of the role.
    TeamId string
    The team id associated with the token provided.
    Token string
    The actual token that was generated and can be used with API calls to identify the user of the call.
    TokenId string
    The public identifier for a specific token. It can be used to look up information about a token or to revoke a token.
    backend String
    Terraform Cloud secret backend to generate tokens from
    leaseId String
    The lease associated with the token. Only user tokens will have a Vault lease associated with them.
    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.
    organization String
    The organization associated with the token provided.
    role String
    Name of the role.
    teamId String
    The team id associated with the token provided.
    token String
    The actual token that was generated and can be used with API calls to identify the user of the call.
    tokenId String
    The public identifier for a specific token. It can be used to look up information about a token or to revoke a token.
    backend string
    Terraform Cloud secret backend to generate tokens from
    leaseId string
    The lease associated with the token. Only user tokens will have a Vault lease associated with them.
    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.
    organization string
    The organization associated with the token provided.
    role string
    Name of the role.
    teamId string
    The team id associated with the token provided.
    token string
    The actual token that was generated and can be used with API calls to identify the user of the call.
    tokenId string
    The public identifier for a specific token. It can be used to look up information about a token or to revoke a token.
    backend str
    Terraform Cloud secret backend to generate tokens from
    lease_id str
    The lease associated with the token. Only user tokens will have a Vault lease associated with them.
    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.
    organization str
    The organization associated with the token provided.
    role str
    Name of the role.
    team_id str
    The team id associated with the token provided.
    token str
    The actual token that was generated and can be used with API calls to identify the user of the call.
    token_id str
    The public identifier for a specific token. It can be used to look up information about a token or to revoke a token.
    backend String
    Terraform Cloud secret backend to generate tokens from
    leaseId String
    The lease associated with the token. Only user tokens will have a Vault lease associated with them.
    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.
    organization String
    The organization associated with the token provided.
    role String
    Name of the role.
    teamId String
    The team id associated with the token provided.
    token String
    The actual token that was generated and can be used with API calls to identify the user of the call.
    tokenId String
    The public identifier for a specific token. It can be used to look up information about a token or to revoke a token.

    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.20.0 published on Tuesday, Feb 20, 2024 by Pulumi