1. Packages
  2. Packages
  3. HashiCorp Vault Provider
  4. API Docs
  5. alicloud
  6. SecretBackendRole
Viewing docs for HashiCorp Vault v7.11.0
published on Wednesday, Jul 22, 2026 by Pulumi
vault logo
Viewing docs for HashiCorp Vault v7.11.0
published on Wednesday, Jul 22, 2026 by Pulumi

    Creates a role on an AliCloud Secret Backend for Vault. Roles are used to map credentials to the policies or RAM roles that define their permissions.

    The AliCloud secrets engine dynamically generates AliCloud access credentials based on RAM policies or by assuming RAM roles. This provides a secure way to grant temporary, limited-privilege credentials to applications and services.

    Important All data provided in the resource configuration will be written in cleartext to state and plan files generated by Terraform, and will appear in the console output when Terraform runs. Protect these artifacts accordingly. See the main provider documentation for more details.

    Example Usage

    Role with RAM Role ARN (STS Assumed Role)

    Use an existing RAM role. Vault will generate temporary STS credentials by assuming this role.

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const alicloud = new vault.Mount("alicloud", {
        path: "alicloud",
        type: "alicloud",
    });
    const alicloudSecretBackend = new vault.alicloud.SecretBackend("alicloud", {
        mount: alicloud.path,
        accessKey: "LTAI...",
        secretKeyWo: "your-secret-key",
    });
    const role = new vault.alicloud.SecretBackendRole("role", {
        mount: alicloud.path,
        name: "deploy-role",
        roleArn: "acs:ram::123456789012:role/MyApplicationRole",
        ttl: 3600,
        maxTtl: 7200,
    });
    
    import pulumi
    import pulumi_vault as vault
    
    alicloud = vault.Mount("alicloud",
        path="alicloud",
        type="alicloud")
    alicloud_secret_backend = vault.alicloud.SecretBackend("alicloud",
        mount=alicloud.path,
        access_key="LTAI...",
        secret_key_wo="your-secret-key")
    role = vault.alicloud.SecretBackendRole("role",
        mount=alicloud.path,
        name="deploy-role",
        role_arn="acs:ram::123456789012:role/MyApplicationRole",
        ttl=3600,
        max_ttl=7200)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v7/go/vault"
    	"github.com/pulumi/pulumi-vault/sdk/v7/go/vault/alicloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		alicloud2, err := vault.NewMount(ctx, "alicloud", &vault.MountArgs{
    			Path: pulumi.String("alicloud"),
    			Type: pulumi.String("alicloud"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = alicloud.NewSecretBackend(ctx, "alicloud", &alicloud.SecretBackendArgs{
    			Mount:       alicloud2.Path,
    			AccessKey:   pulumi.String("LTAI..."),
    			SecretKeyWo: pulumi.String("your-secret-key"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = alicloud.NewSecretBackendRole(ctx, "role", &alicloud.SecretBackendRoleArgs{
    			Mount:   alicloud2.Path,
    			Name:    pulumi.String("deploy-role"),
    			RoleArn: pulumi.String("acs:ram::123456789012:role/MyApplicationRole"),
    			Ttl:     pulumi.Int(3600),
    			MaxTtl:  pulumi.Int(7200),
    		})
    		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 alicloud = new Vault.Mount("alicloud", new()
        {
            Path = "alicloud",
            Type = "alicloud",
        });
    
        var alicloudSecretBackend = new Vault.AliCloud.SecretBackend("alicloud", new()
        {
            Mount = alicloud.Path,
            AccessKey = "LTAI...",
            SecretKeyWo = "your-secret-key",
        });
    
        var role = new Vault.AliCloud.SecretBackendRole("role", new()
        {
            Mount = alicloud.Path,
            Name = "deploy-role",
            RoleArn = "acs:ram::123456789012:role/MyApplicationRole",
            Ttl = 3600,
            MaxTtl = 7200,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.Mount;
    import com.pulumi.vault.MountArgs;
    import com.pulumi.vault.alicloud.SecretBackend;
    import com.pulumi.vault.alicloud.SecretBackendArgs;
    import com.pulumi.vault.alicloud.SecretBackendRole;
    import com.pulumi.vault.alicloud.SecretBackendRoleArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 alicloud = new Mount("alicloud", MountArgs.builder()
                .path("alicloud")
                .type("alicloud")
                .build());
    
            var alicloudSecretBackend = new SecretBackend("alicloudSecretBackend", SecretBackendArgs.builder()
                .mount(alicloud.path())
                .accessKey("LTAI...")
                .secretKeyWo("your-secret-key")
                .build());
    
            var role = new SecretBackendRole("role", SecretBackendRoleArgs.builder()
                .mount(alicloud.path())
                .name("deploy-role")
                .roleArn("acs:ram::123456789012:role/MyApplicationRole")
                .ttl(3600)
                .maxTtl(7200)
                .build());
    
        }
    }
    
    resources:
      alicloud:
        type: vault:Mount
        properties:
          path: alicloud
          type: alicloud
      alicloudSecretBackend:
        type: vault:alicloud:SecretBackend
        name: alicloud
        properties:
          mount: ${alicloud.path}
          accessKey: LTAI...
          secretKeyWo: your-secret-key
      role:
        type: vault:alicloud:SecretBackendRole
        properties:
          mount: ${alicloud.path}
          name: deploy-role
          roleArn: acs:ram::123456789012:role/MyApplicationRole
          ttl: 3600
          maxTtl: 7200
    
    pulumi {
      required_providers {
        vault = {
          source = "pulumi/vault"
        }
      }
    }
    
    resource "vault_mount" "alicloud" {
      path = "alicloud"
      type = "alicloud"
    }
    resource "vault_alicloud_secretbackend" "alicloud" {
      mount         = vault_mount.alicloud.path
      access_key    = "LTAI..."
      secret_key_wo = "your-secret-key"
    }
    resource "vault_alicloud_secretbackendrole" "role" {
      mount    = vault_mount.alicloud.path
      name     = "deploy-role"
      role_arn = "acs:ram::123456789012:role/MyApplicationRole"
      ttl      = 3600
      max_ttl  = 7200
    }
    

    Role with Remote Policies

    Use remote policies to reference existing system or custom RAM policies. Vault will create a temporary RAM user and attach these policies.

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const role = new vault.alicloud.SecretBackendRole("role", {
        mount: alicloud.path,
        name: "oss-reader",
        remotePolicies: [
            {
                name: "AliyunOSSReadOnlyAccess",
                type: "System",
            },
            {
                name: "AliyunECSReadOnlyAccess",
                type: "System",
            },
        ],
        ttl: 3600,
        maxTtl: 7200,
    });
    
    import pulumi
    import pulumi_vault as vault
    
    role = vault.alicloud.SecretBackendRole("role",
        mount=alicloud["path"],
        name="oss-reader",
        remote_policies=[
            {
                "name": "AliyunOSSReadOnlyAccess",
                "type": "System",
            },
            {
                "name": "AliyunECSReadOnlyAccess",
                "type": "System",
            },
        ],
        ttl=3600,
        max_ttl=7200)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v7/go/vault/alicloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := alicloud.NewSecretBackendRole(ctx, "role", &alicloud.SecretBackendRoleArgs{
    			Mount: pulumi.Any(alicloud.Path),
    			Name:  pulumi.String("oss-reader"),
    			RemotePolicies: alicloud.SecretBackendRoleRemotePolicyArray{
    				&alicloud.SecretBackendRoleRemotePolicyArgs{
    					Name: pulumi.String("AliyunOSSReadOnlyAccess"),
    					Type: pulumi.String("System"),
    				},
    				&alicloud.SecretBackendRoleRemotePolicyArgs{
    					Name: pulumi.String("AliyunECSReadOnlyAccess"),
    					Type: pulumi.String("System"),
    				},
    			},
    			Ttl:    pulumi.Int(3600),
    			MaxTtl: pulumi.Int(7200),
    		})
    		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 role = new Vault.AliCloud.SecretBackendRole("role", new()
        {
            Mount = alicloud.Path,
            Name = "oss-reader",
            RemotePolicies = new[]
            {
                new Vault.AliCloud.Inputs.SecretBackendRoleRemotePolicyArgs
                {
                    Name = "AliyunOSSReadOnlyAccess",
                    Type = "System",
                },
                new Vault.AliCloud.Inputs.SecretBackendRoleRemotePolicyArgs
                {
                    Name = "AliyunECSReadOnlyAccess",
                    Type = "System",
                },
            },
            Ttl = 3600,
            MaxTtl = 7200,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.alicloud.SecretBackendRole;
    import com.pulumi.vault.alicloud.SecretBackendRoleArgs;
    import com.pulumi.vault.alicloud.inputs.SecretBackendRoleRemotePolicyArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 role = new SecretBackendRole("role", SecretBackendRoleArgs.builder()
                .mount(alicloud.path())
                .name("oss-reader")
                .remotePolicies(            
                    SecretBackendRoleRemotePolicyArgs.builder()
                        .name("AliyunOSSReadOnlyAccess")
                        .type("System")
                        .build(),
                    SecretBackendRoleRemotePolicyArgs.builder()
                        .name("AliyunECSReadOnlyAccess")
                        .type("System")
                        .build())
                .ttl(3600)
                .maxTtl(7200)
                .build());
    
        }
    }
    
    resources:
      role:
        type: vault:alicloud:SecretBackendRole
        properties:
          mount: ${alicloud.path}
          name: oss-reader
          remotePolicies:
            - name: AliyunOSSReadOnlyAccess
              type: System
            - name: AliyunECSReadOnlyAccess
              type: System
          ttl: 3600
          maxTtl: 7200
    
    pulumi {
      required_providers {
        vault = {
          source = "pulumi/vault"
        }
      }
    }
    
    resource "vault_alicloud_secretbackendrole" "role" {
      mount = alicloud.path
      name  = "oss-reader"
      remote_policies {
        name = "AliyunOSSReadOnlyAccess"
        type = "System"
      }
      remote_policies {
        name = "AliyunECSReadOnlyAccess"
        type = "System"
      }
      ttl     = 3600
      max_ttl = 7200
    }
    

    Role with Inline Policies

    Inline policies allow you to define custom permissions directly. Vault will create a temporary RAM user and attach the inline policy.

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const role = new vault.alicloud.SecretBackendRole("role", {
        mount: alicloud.path,
        name: "custom-permissions",
        inlinePolicies: [{
            policyDocument: JSON.stringify({
                Statement: [{
                    Action: [
                        "oss:GetObject",
                        "oss:PutObject",
                    ],
                    Effect: "Allow",
                    Resource: ["acs:oss:*:*:my-bucket/*"],
                }],
                Version: "1",
            }),
        }],
        ttl: 3600,
        maxTtl: 7200,
    });
    
    import pulumi
    import json
    import pulumi_vault as vault
    
    role = vault.alicloud.SecretBackendRole("role",
        mount=alicloud["path"],
        name="custom-permissions",
        inline_policies=[{
            "policy_document": json.dumps({
                "Statement": [{
                    "Action": [
                        "oss:GetObject",
                        "oss:PutObject",
                    ],
                    "Effect": "Allow",
                    "Resource": ["acs:oss:*:*:my-bucket/*"],
                }],
                "Version": "1",
            }),
        }],
        ttl=3600,
        max_ttl=7200)
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-vault/sdk/v7/go/vault/alicloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"Statement": []map[string]interface{}{
    				map[string]interface{}{
    					"Action": []string{
    						"oss:GetObject",
    						"oss:PutObject",
    					},
    					"Effect": "Allow",
    					"Resource": []string{
    						"acs:oss:*:*:my-bucket/*",
    					},
    				},
    			},
    			"Version": "1",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = alicloud.NewSecretBackendRole(ctx, "role", &alicloud.SecretBackendRoleArgs{
    			Mount: pulumi.Any(alicloud.Path),
    			Name:  pulumi.String("custom-permissions"),
    			InlinePolicies: alicloud.SecretBackendRoleInlinePolicyArray{
    				&alicloud.SecretBackendRoleInlinePolicyArgs{
    					PolicyDocument: pulumi.String(json0),
    				},
    			},
    			Ttl:    pulumi.Int(3600),
    			MaxTtl: pulumi.Int(7200),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var role = new Vault.AliCloud.SecretBackendRole("role", new()
        {
            Mount = alicloud.Path,
            Name = "custom-permissions",
            InlinePolicies = new[]
            {
                new Vault.AliCloud.Inputs.SecretBackendRoleInlinePolicyArgs
                {
                    PolicyDocument = JsonSerializer.Serialize(new Dictionary<string, object?>
                    {
                        ["Statement"] = new[]
                        {
                            new Dictionary<string, object?>
                            {
                                ["Action"] = new[]
                                {
                                    "oss:GetObject",
                                    "oss:PutObject",
                                },
                                ["Effect"] = "Allow",
                                ["Resource"] = new[]
                                {
                                    "acs:oss:*:*:my-bucket/*",
                                },
                            },
                        },
                        ["Version"] = "1",
                    }),
                },
            },
            Ttl = 3600,
            MaxTtl = 7200,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.alicloud.SecretBackendRole;
    import com.pulumi.vault.alicloud.SecretBackendRoleArgs;
    import com.pulumi.vault.alicloud.inputs.SecretBackendRoleInlinePolicyArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 role = new SecretBackendRole("role", SecretBackendRoleArgs.builder()
                .mount(alicloud.path())
                .name("custom-permissions")
                .inlinePolicies(SecretBackendRoleInlinePolicyArgs.builder()
                    .policyDocument(serializeJson(
                        jsonObject(
                            jsonProperty("Statement", jsonArray(jsonObject(
                                jsonProperty("Action", jsonArray(
                                    "oss:GetObject", 
                                    "oss:PutObject"
                                )),
                                jsonProperty("Effect", "Allow"),
                                jsonProperty("Resource", jsonArray("acs:oss:*:*:my-bucket/*"))
                            ))),
                            jsonProperty("Version", "1")
                        )))
                    .build())
                .ttl(3600)
                .maxTtl(7200)
                .build());
    
        }
    }
    
    resources:
      role:
        type: vault:alicloud:SecretBackendRole
        properties:
          mount: ${alicloud.path}
          name: custom-permissions
          inlinePolicies:
            - policyDocument:
                fn::toJSON:
                  Statement:
                    - Action:
                        - oss:GetObject
                        - oss:PutObject
                      Effect: Allow
                      Resource:
                        - acs:oss:*:*:my-bucket/*
                  Version: '1'
          ttl: 3600
          maxTtl: 7200
    
    pulumi {
      required_providers {
        vault = {
          source = "pulumi/vault"
        }
      }
    }
    
    resource "vault_alicloud_secretbackendrole" "role" {
      mount = alicloud.path
      name  = "custom-permissions"
      inline_policies {
        policy_document = jsonencode({
          "Statement" = [{
            "Action"   = ["oss:GetObject", "oss:PutObject"]
            "Effect"   = "Allow"
            "Resource" = ["acs:oss:*:*:my-bucket/*"]
          }]
          "Version" = "1"
        })
      }
      ttl     = 3600
      max_ttl = 7200
    }
    

    Role with Combined Inline and Remote Policies

    You can combine inline and remote policies on the same role.

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const role = new vault.alicloud.SecretBackendRole("role", {
        mount: alicloud.path,
        name: "combined",
        remotePolicies: [{
            name: "AliyunOSSReadOnlyAccess",
            type: "System",
        }],
        inlinePolicies: [{
            policyDocument: JSON.stringify({
                Statement: [{
                    Action: ["ecs:DescribeInstances"],
                    Effect: "Allow",
                    Resource: ["*"],
                }],
                Version: "1",
            }),
        }],
        ttl: 3600,
        maxTtl: 7200,
    });
    
    import pulumi
    import json
    import pulumi_vault as vault
    
    role = vault.alicloud.SecretBackendRole("role",
        mount=alicloud["path"],
        name="combined",
        remote_policies=[{
            "name": "AliyunOSSReadOnlyAccess",
            "type": "System",
        }],
        inline_policies=[{
            "policy_document": json.dumps({
                "Statement": [{
                    "Action": ["ecs:DescribeInstances"],
                    "Effect": "Allow",
                    "Resource": ["*"],
                }],
                "Version": "1",
            }),
        }],
        ttl=3600,
        max_ttl=7200)
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-vault/sdk/v7/go/vault/alicloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"Statement": []map[string]interface{}{
    				map[string]interface{}{
    					"Action": []string{
    						"ecs:DescribeInstances",
    					},
    					"Effect": "Allow",
    					"Resource": []string{
    						"*",
    					},
    				},
    			},
    			"Version": "1",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = alicloud.NewSecretBackendRole(ctx, "role", &alicloud.SecretBackendRoleArgs{
    			Mount: pulumi.Any(alicloud.Path),
    			Name:  pulumi.String("combined"),
    			RemotePolicies: alicloud.SecretBackendRoleRemotePolicyArray{
    				&alicloud.SecretBackendRoleRemotePolicyArgs{
    					Name: pulumi.String("AliyunOSSReadOnlyAccess"),
    					Type: pulumi.String("System"),
    				},
    			},
    			InlinePolicies: alicloud.SecretBackendRoleInlinePolicyArray{
    				&alicloud.SecretBackendRoleInlinePolicyArgs{
    					PolicyDocument: pulumi.String(json0),
    				},
    			},
    			Ttl:    pulumi.Int(3600),
    			MaxTtl: pulumi.Int(7200),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var role = new Vault.AliCloud.SecretBackendRole("role", new()
        {
            Mount = alicloud.Path,
            Name = "combined",
            RemotePolicies = new[]
            {
                new Vault.AliCloud.Inputs.SecretBackendRoleRemotePolicyArgs
                {
                    Name = "AliyunOSSReadOnlyAccess",
                    Type = "System",
                },
            },
            InlinePolicies = new[]
            {
                new Vault.AliCloud.Inputs.SecretBackendRoleInlinePolicyArgs
                {
                    PolicyDocument = JsonSerializer.Serialize(new Dictionary<string, object?>
                    {
                        ["Statement"] = new[]
                        {
                            new Dictionary<string, object?>
                            {
                                ["Action"] = new[]
                                {
                                    "ecs:DescribeInstances",
                                },
                                ["Effect"] = "Allow",
                                ["Resource"] = new[]
                                {
                                    "*",
                                },
                            },
                        },
                        ["Version"] = "1",
                    }),
                },
            },
            Ttl = 3600,
            MaxTtl = 7200,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.alicloud.SecretBackendRole;
    import com.pulumi.vault.alicloud.SecretBackendRoleArgs;
    import com.pulumi.vault.alicloud.inputs.SecretBackendRoleRemotePolicyArgs;
    import com.pulumi.vault.alicloud.inputs.SecretBackendRoleInlinePolicyArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 role = new SecretBackendRole("role", SecretBackendRoleArgs.builder()
                .mount(alicloud.path())
                .name("combined")
                .remotePolicies(SecretBackendRoleRemotePolicyArgs.builder()
                    .name("AliyunOSSReadOnlyAccess")
                    .type("System")
                    .build())
                .inlinePolicies(SecretBackendRoleInlinePolicyArgs.builder()
                    .policyDocument(serializeJson(
                        jsonObject(
                            jsonProperty("Statement", jsonArray(jsonObject(
                                jsonProperty("Action", jsonArray("ecs:DescribeInstances")),
                                jsonProperty("Effect", "Allow"),
                                jsonProperty("Resource", jsonArray("*"))
                            ))),
                            jsonProperty("Version", "1")
                        )))
                    .build())
                .ttl(3600)
                .maxTtl(7200)
                .build());
    
        }
    }
    
    resources:
      role:
        type: vault:alicloud:SecretBackendRole
        properties:
          mount: ${alicloud.path}
          name: combined
          remotePolicies:
            - name: AliyunOSSReadOnlyAccess
              type: System
          inlinePolicies:
            - policyDocument:
                fn::toJSON:
                  Statement:
                    - Action:
                        - ecs:DescribeInstances
                      Effect: Allow
                      Resource:
                        - '*'
                  Version: '1'
          ttl: 3600
          maxTtl: 7200
    
    pulumi {
      required_providers {
        vault = {
          source = "pulumi/vault"
        }
      }
    }
    
    resource "vault_alicloud_secretbackendrole" "role" {
      mount = alicloud.path
      name  = "combined"
      remote_policies {
        name = "AliyunOSSReadOnlyAccess"
        type = "System"
      }
      inline_policies {
        policy_document = jsonencode({
          "Statement" = [{
            "Action"   = ["ecs:DescribeInstances"]
            "Effect"   = "Allow"
            "Resource" = ["*"]
          }]
          "Version" = "1"
        })
      }
      ttl     = 3600
      max_ttl = 7200
    }
    

    Credential Types Comparison

    MethodUse CaseCredential TypeProsCons
    roleArnProduction deploymentsSTS assumed roleMost secure, leverages existing RAM rolesRequires pre-existing RAM role with trust policy
    remotePoliciesDynamic permissions with existing policiesRAM userReuses existing policies, easier to manageCreates temporary RAM users
    inlinePoliciesCustom permissionsRAM userFlexible, no external dependenciesCreates temporary RAM users

    See Also

    Create SecretBackendRole Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SecretBackendRole(name: string, args: SecretBackendRoleArgs, opts?: CustomResourceOptions);
    @overload
    def SecretBackendRole(resource_name: str,
                          args: SecretBackendRoleArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecretBackendRole(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          mount: Optional[str] = None,
                          inline_policies: Optional[Sequence[SecretBackendRoleInlinePolicyArgs]] = None,
                          max_ttl: Optional[int] = None,
                          name: Optional[str] = None,
                          namespace: Optional[str] = None,
                          remote_policies: Optional[Sequence[SecretBackendRoleRemotePolicyArgs]] = None,
                          role_arn: Optional[str] = None,
                          ttl: Optional[int] = None)
    func NewSecretBackendRole(ctx *Context, name string, args SecretBackendRoleArgs, opts ...ResourceOption) (*SecretBackendRole, error)
    public SecretBackendRole(string name, SecretBackendRoleArgs args, CustomResourceOptions? opts = null)
    public SecretBackendRole(String name, SecretBackendRoleArgs args)
    public SecretBackendRole(String name, SecretBackendRoleArgs args, CustomResourceOptions options)
    
    type: vault:alicloud:SecretBackendRole
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "vault_alicloud_secret_backend_role" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args SecretBackendRoleArgs
    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 SecretBackendRoleArgs
    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 SecretBackendRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecretBackendRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecretBackendRoleArgs
    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 secretBackendRoleResource = new Vault.AliCloud.SecretBackendRole("secretBackendRoleResource", new()
    {
        Mount = "string",
        InlinePolicies = new[]
        {
            new Vault.AliCloud.Inputs.SecretBackendRoleInlinePolicyArgs
            {
                PolicyDocument = "string",
            },
        },
        MaxTtl = 0,
        Name = "string",
        Namespace = "string",
        RemotePolicies = new[]
        {
            new Vault.AliCloud.Inputs.SecretBackendRoleRemotePolicyArgs
            {
                Name = "string",
                Type = "string",
            },
        },
        RoleArn = "string",
        Ttl = 0,
    });
    
    example, err := alicloud.NewSecretBackendRole(ctx, "secretBackendRoleResource", &alicloud.SecretBackendRoleArgs{
    	Mount: pulumi.String("string"),
    	InlinePolicies: alicloud.SecretBackendRoleInlinePolicyArray{
    		&alicloud.SecretBackendRoleInlinePolicyArgs{
    			PolicyDocument: pulumi.String("string"),
    		},
    	},
    	MaxTtl:    pulumi.Int(0),
    	Name:      pulumi.String("string"),
    	Namespace: pulumi.String("string"),
    	RemotePolicies: alicloud.SecretBackendRoleRemotePolicyArray{
    		&alicloud.SecretBackendRoleRemotePolicyArgs{
    			Name: pulumi.String("string"),
    			Type: pulumi.String("string"),
    		},
    	},
    	RoleArn: pulumi.String("string"),
    	Ttl:     pulumi.Int(0),
    })
    
    resource "vault_alicloud_secret_backend_role" "secretBackendRoleResource" {
      lifecycle {
        create_before_destroy = true
      }
      mount = "string"
      inline_policies {
        policy_document = "string"
      }
      max_ttl   = 0
      name      = "string"
      namespace = "string"
      remote_policies {
        name = "string"
        type = "string"
      }
      role_arn = "string"
      ttl      = 0
    }
    
    var secretBackendRoleResource = new com.pulumi.vault.alicloud.SecretBackendRole("secretBackendRoleResource", com.pulumi.vault.alicloud.SecretBackendRoleArgs.builder()
        .mount("string")
        .inlinePolicies(SecretBackendRoleInlinePolicyArgs.builder()
            .policyDocument("string")
            .build())
        .maxTtl(0)
        .name("string")
        .namespace("string")
        .remotePolicies(SecretBackendRoleRemotePolicyArgs.builder()
            .name("string")
            .type("string")
            .build())
        .roleArn("string")
        .ttl(0)
        .build());
    
    secret_backend_role_resource = vault.alicloud.SecretBackendRole("secretBackendRoleResource",
        mount="string",
        inline_policies=[{
            "policy_document": "string",
        }],
        max_ttl=0,
        name="string",
        namespace="string",
        remote_policies=[{
            "name": "string",
            "type": "string",
        }],
        role_arn="string",
        ttl=0)
    
    const secretBackendRoleResource = new vault.alicloud.SecretBackendRole("secretBackendRoleResource", {
        mount: "string",
        inlinePolicies: [{
            policyDocument: "string",
        }],
        maxTtl: 0,
        name: "string",
        namespace: "string",
        remotePolicies: [{
            name: "string",
            type: "string",
        }],
        roleArn: "string",
        ttl: 0,
    });
    
    type: vault:alicloud:SecretBackendRole
    properties:
        inlinePolicies:
            - policyDocument: string
        maxTtl: 0
        mount: string
        name: string
        namespace: string
        remotePolicies:
            - name: string
              type: string
        roleArn: string
        ttl: 0
    

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

    Mount string
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    InlinePolicies List<SecretBackendRoleInlinePolicy>
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    MaxTtl int
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    Name string
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    RemotePolicies List<SecretBackendRoleRemotePolicy>
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    RoleArn string
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    Ttl int
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    Mount string
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    InlinePolicies []SecretBackendRoleInlinePolicyArgs
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    MaxTtl int
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    Name string
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    RemotePolicies []SecretBackendRoleRemotePolicyArgs
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    RoleArn string
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    Ttl int
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    mount string
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    inline_policies list(object)
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    max_ttl number
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    name string
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    remote_policies list(object)
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    role_arn string
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    ttl number
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    mount String
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    inlinePolicies List<SecretBackendRoleInlinePolicy>
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    maxTtl Integer
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    name String
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    remotePolicies List<SecretBackendRoleRemotePolicy>
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    roleArn String
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    ttl Integer
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    mount string
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    inlinePolicies SecretBackendRoleInlinePolicy[]
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    maxTtl number
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    name string
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    remotePolicies SecretBackendRoleRemotePolicy[]
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    roleArn string
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    ttl number
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    mount str
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    inline_policies Sequence[SecretBackendRoleInlinePolicyArgs]
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    max_ttl int
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    name str
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    remote_policies Sequence[SecretBackendRoleRemotePolicyArgs]
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    role_arn str
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    ttl int
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    mount String
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    inlinePolicies List<Property Map>
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    maxTtl Number
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    name String
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    remotePolicies List<Property Map>
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    roleArn String
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    ttl Number
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecretBackendRole 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 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 SecretBackendRole Resource

    Get an existing SecretBackendRole 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?: SecretBackendRoleState, opts?: CustomResourceOptions): SecretBackendRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            inline_policies: Optional[Sequence[SecretBackendRoleInlinePolicyArgs]] = None,
            max_ttl: Optional[int] = None,
            mount: Optional[str] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            remote_policies: Optional[Sequence[SecretBackendRoleRemotePolicyArgs]] = None,
            role_arn: Optional[str] = None,
            ttl: Optional[int] = None) -> SecretBackendRole
    func GetSecretBackendRole(ctx *Context, name string, id IDInput, state *SecretBackendRoleState, opts ...ResourceOption) (*SecretBackendRole, error)
    public static SecretBackendRole Get(string name, Input<string> id, SecretBackendRoleState? state, CustomResourceOptions? opts = null)
    public static SecretBackendRole get(String name, Output<String> id, SecretBackendRoleState state, CustomResourceOptions options)
    resources:  _:    type: vault:alicloud:SecretBackendRole    get:      id: ${id}
    import {
      to = vault_alicloud_secret_backend_role.example
      id = "${id}"
    }
    
    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:
    InlinePolicies List<SecretBackendRoleInlinePolicy>
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    MaxTtl int
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    Mount string
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    Name string
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    RemotePolicies List<SecretBackendRoleRemotePolicy>
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    RoleArn string
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    Ttl int
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    InlinePolicies []SecretBackendRoleInlinePolicyArgs
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    MaxTtl int
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    Mount string
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    Name string
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    RemotePolicies []SecretBackendRoleRemotePolicyArgs
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    RoleArn string
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    Ttl int
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    inline_policies list(object)
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    max_ttl number
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    mount string
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    name string
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    remote_policies list(object)
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    role_arn string
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    ttl number
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    inlinePolicies List<SecretBackendRoleInlinePolicy>
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    maxTtl Integer
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    mount String
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    name String
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    remotePolicies List<SecretBackendRoleRemotePolicy>
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    roleArn String
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    ttl Integer
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    inlinePolicies SecretBackendRoleInlinePolicy[]
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    maxTtl number
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    mount string
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    name string
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    remotePolicies SecretBackendRoleRemotePolicy[]
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    roleArn string
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    ttl number
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    inline_policies Sequence[SecretBackendRoleInlinePolicyArgs]
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    max_ttl int
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    mount str
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    name str
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    remote_policies Sequence[SecretBackendRoleRemotePolicyArgs]
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    role_arn str
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    ttl int
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    inlinePolicies List<Property Map>
    Set of inline policy documents to be applied to the generated credentials. Each block represents one policy with a JSON-encoded policyDocument field.
    maxTtl Number
    The maximum TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.
    mount String
    The path where the AliCloud secret backend is mounted, with no leading or trailing /s.
    name String
    The name of the role. Must be unique within the backend. Changing this forces creation of a new resource.
    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.
    remotePolicies List<Property Map>
    Set of remote policy specifications to attach to the generated credentials. Each block groups a policy name with its type (System or Custom).
    roleArn String
    The ARN of the RAM role to assume. When specified, Vault will generate temporary STS credentials by assuming this role. The role's trust policy must allow the access key configured in the backend to assume it. Cannot be used with inlinePolicies or remotePolicies.
    ttl Number
    The default TTL for credentials issued by this role, in seconds. Defaults to 0, in which case the value will fall back to the system/mount defaults.

    Supporting Types

    SecretBackendRoleInlinePolicy, SecretBackendRoleInlinePolicyArgs

    PolicyDocument string
    A JSON-encoded inline RAM policy document.
    PolicyDocument string
    A JSON-encoded inline RAM policy document.
    policy_document string
    A JSON-encoded inline RAM policy document.
    policyDocument String
    A JSON-encoded inline RAM policy document.
    policyDocument string
    A JSON-encoded inline RAM policy document.
    policy_document str
    A JSON-encoded inline RAM policy document.
    policyDocument String
    A JSON-encoded inline RAM policy document.

    SecretBackendRoleRemotePolicy, SecretBackendRoleRemotePolicyArgs

    Name string
    The name of the remote RAM policy.
    Type string

    The type of the remote policy. Must be System (for AliCloud managed policies) or Custom (for customer-managed policies).

    Note: You must specify either roleArn or at least one inlinePolicies block, or remotePolicies block, or a combination of inlinePolicies and remotePolicies. The role will fail validation if none is provided. roleArn cannot be combined with inlinePolicies or remotePolicies.

    Name string
    The name of the remote RAM policy.
    Type string

    The type of the remote policy. Must be System (for AliCloud managed policies) or Custom (for customer-managed policies).

    Note: You must specify either roleArn or at least one inlinePolicies block, or remotePolicies block, or a combination of inlinePolicies and remotePolicies. The role will fail validation if none is provided. roleArn cannot be combined with inlinePolicies or remotePolicies.

    name string
    The name of the remote RAM policy.
    type string

    The type of the remote policy. Must be System (for AliCloud managed policies) or Custom (for customer-managed policies).

    Note: You must specify either roleArn or at least one inlinePolicies block, or remotePolicies block, or a combination of inlinePolicies and remotePolicies. The role will fail validation if none is provided. roleArn cannot be combined with inlinePolicies or remotePolicies.

    name String
    The name of the remote RAM policy.
    type String

    The type of the remote policy. Must be System (for AliCloud managed policies) or Custom (for customer-managed policies).

    Note: You must specify either roleArn or at least one inlinePolicies block, or remotePolicies block, or a combination of inlinePolicies and remotePolicies. The role will fail validation if none is provided. roleArn cannot be combined with inlinePolicies or remotePolicies.

    name string
    The name of the remote RAM policy.
    type string

    The type of the remote policy. Must be System (for AliCloud managed policies) or Custom (for customer-managed policies).

    Note: You must specify either roleArn or at least one inlinePolicies block, or remotePolicies block, or a combination of inlinePolicies and remotePolicies. The role will fail validation if none is provided. roleArn cannot be combined with inlinePolicies or remotePolicies.

    name str
    The name of the remote RAM policy.
    type str

    The type of the remote policy. Must be System (for AliCloud managed policies) or Custom (for customer-managed policies).

    Note: You must specify either roleArn or at least one inlinePolicies block, or remotePolicies block, or a combination of inlinePolicies and remotePolicies. The role will fail validation if none is provided. roleArn cannot be combined with inlinePolicies or remotePolicies.

    name String
    The name of the remote RAM policy.
    type String

    The type of the remote policy. Must be System (for AliCloud managed policies) or Custom (for customer-managed policies).

    Note: You must specify either roleArn or at least one inlinePolicies block, or remotePolicies block, or a combination of inlinePolicies and remotePolicies. The role will fail validation if none is provided. roleArn cannot be combined with inlinePolicies or remotePolicies.

    Import

    AliCloud secret backend roles can be imported using the full path to the role in the format <mount>/role/<name>, e.g.

    $ pulumi import vault:alicloud/secretBackendRole:SecretBackendRole role alicloud/role/deploy-role
    

    Note: When importing into a Vault namespace, set the TERRAFORM_VAULT_NAMESPACE_IMPORT environment variable to the target namespace before running the import command.

    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.
    vault logo
    Viewing docs for HashiCorp Vault v7.11.0
    published on Wednesday, Jul 22, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial