1. Packages
  2. Temporalcloud Provider
  3. API Docs
  4. ServiceAccount
temporalcloud 0.7.0 published on Friday, Apr 4, 2025 by temporalio

temporalcloud.ServiceAccount

Explore with Pulumi AI

Provisions a Temporal Cloud Service Account.

Create ServiceAccount Resource

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

Constructor syntax

new ServiceAccount(name: string, args: ServiceAccountArgs, opts?: CustomResourceOptions);
@overload
def ServiceAccount(resource_name: str,
                   args: ServiceAccountArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def ServiceAccount(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   account_access: Optional[str] = None,
                   name: Optional[str] = None,
                   namespace_accesses: Optional[Sequence[ServiceAccountNamespaceAccessArgs]] = None,
                   timeouts: Optional[ServiceAccountTimeoutsArgs] = None)
func NewServiceAccount(ctx *Context, name string, args ServiceAccountArgs, opts ...ResourceOption) (*ServiceAccount, error)
public ServiceAccount(string name, ServiceAccountArgs args, CustomResourceOptions? opts = null)
public ServiceAccount(String name, ServiceAccountArgs args)
public ServiceAccount(String name, ServiceAccountArgs args, CustomResourceOptions options)
type: temporalcloud:ServiceAccount
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ServiceAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ServiceAccountArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceAccountArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServiceAccountArgs
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 serviceAccountResource = new Temporalcloud.ServiceAccount("serviceAccountResource", new()
{
    AccountAccess = "string",
    Name = "string",
    NamespaceAccesses = new[]
    {
        new Temporalcloud.Inputs.ServiceAccountNamespaceAccessArgs
        {
            NamespaceId = "string",
            Permission = "string",
        },
    },
    Timeouts = new Temporalcloud.Inputs.ServiceAccountTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
    },
});
Copy
example, err := temporalcloud.NewServiceAccount(ctx, "serviceAccountResource", &temporalcloud.ServiceAccountArgs{
AccountAccess: pulumi.String("string"),
Name: pulumi.String("string"),
NamespaceAccesses: .ServiceAccountNamespaceAccessArray{
&.ServiceAccountNamespaceAccessArgs{
NamespaceId: pulumi.String("string"),
Permission: pulumi.String("string"),
},
},
Timeouts: &.ServiceAccountTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
Copy
var serviceAccountResource = new ServiceAccount("serviceAccountResource", ServiceAccountArgs.builder()
    .accountAccess("string")
    .name("string")
    .namespaceAccesses(ServiceAccountNamespaceAccessArgs.builder()
        .namespaceId("string")
        .permission("string")
        .build())
    .timeouts(ServiceAccountTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .build())
    .build());
Copy
service_account_resource = temporalcloud.ServiceAccount("serviceAccountResource",
    account_access="string",
    name="string",
    namespace_accesses=[{
        "namespace_id": "string",
        "permission": "string",
    }],
    timeouts={
        "create": "string",
        "delete": "string",
    })
Copy
const serviceAccountResource = new temporalcloud.ServiceAccount("serviceAccountResource", {
    accountAccess: "string",
    name: "string",
    namespaceAccesses: [{
        namespaceId: "string",
        permission: "string",
    }],
    timeouts: {
        create: "string",
        "delete": "string",
    },
});
Copy
type: temporalcloud:ServiceAccount
properties:
    accountAccess: string
    name: string
    namespaceAccesses:
        - namespaceId: string
          permission: string
    timeouts:
        create: string
        delete: string
Copy

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

AccountAccess This property is required. string
The role on the account. Must be one of admin, developer, or read (case-insensitive).
Name string
The name associated with the service account.
NamespaceAccesses List<ServiceAccountNamespaceAccess>
The set of namespace accesses. Empty sets are not allowed, omit the attribute instead. Service Accounts with an account*access role of admin cannot be assigned explicit permissions to namespaces. Admins implicitly receive access to all Namespaces.
Timeouts ServiceAccountTimeouts
AccountAccess This property is required. string
The role on the account. Must be one of admin, developer, or read (case-insensitive).
Name string
The name associated with the service account.
NamespaceAccesses []ServiceAccountNamespaceAccessArgs
The set of namespace accesses. Empty sets are not allowed, omit the attribute instead. Service Accounts with an account*access role of admin cannot be assigned explicit permissions to namespaces. Admins implicitly receive access to all Namespaces.
Timeouts ServiceAccountTimeoutsArgs
accountAccess This property is required. String
The role on the account. Must be one of admin, developer, or read (case-insensitive).
name String
The name associated with the service account.
namespaceAccesses List<ServiceAccountNamespaceAccess>
The set of namespace accesses. Empty sets are not allowed, omit the attribute instead. Service Accounts with an account*access role of admin cannot be assigned explicit permissions to namespaces. Admins implicitly receive access to all Namespaces.
timeouts ServiceAccountTimeouts
accountAccess This property is required. string
The role on the account. Must be one of admin, developer, or read (case-insensitive).
name string
The name associated with the service account.
namespaceAccesses ServiceAccountNamespaceAccess[]
The set of namespace accesses. Empty sets are not allowed, omit the attribute instead. Service Accounts with an account*access role of admin cannot be assigned explicit permissions to namespaces. Admins implicitly receive access to all Namespaces.
timeouts ServiceAccountTimeouts
account_access This property is required. str
The role on the account. Must be one of admin, developer, or read (case-insensitive).
name str
The name associated with the service account.
namespace_accesses Sequence[ServiceAccountNamespaceAccessArgs]
The set of namespace accesses. Empty sets are not allowed, omit the attribute instead. Service Accounts with an account*access role of admin cannot be assigned explicit permissions to namespaces. Admins implicitly receive access to all Namespaces.
timeouts ServiceAccountTimeoutsArgs
accountAccess This property is required. String
The role on the account. Must be one of admin, developer, or read (case-insensitive).
name String
The name associated with the service account.
namespaceAccesses List<Property Map>
The set of namespace accesses. Empty sets are not allowed, omit the attribute instead. Service Accounts with an account*access role of admin cannot be assigned explicit permissions to namespaces. Admins implicitly receive access to all Namespaces.
timeouts Property Map

Outputs

All input properties are implicitly available as output properties. Additionally, the ServiceAccount resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
State string
The current state of the Service Account.
Id string
The provider-assigned unique ID for this managed resource.
State string
The current state of the Service Account.
id String
The provider-assigned unique ID for this managed resource.
state String
The current state of the Service Account.
id string
The provider-assigned unique ID for this managed resource.
state string
The current state of the Service Account.
id str
The provider-assigned unique ID for this managed resource.
state str
The current state of the Service Account.
id String
The provider-assigned unique ID for this managed resource.
state String
The current state of the Service Account.

Look up Existing ServiceAccount Resource

Get an existing ServiceAccount 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?: ServiceAccountState, opts?: CustomResourceOptions): ServiceAccount
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_access: Optional[str] = None,
        name: Optional[str] = None,
        namespace_accesses: Optional[Sequence[ServiceAccountNamespaceAccessArgs]] = None,
        state: Optional[str] = None,
        timeouts: Optional[ServiceAccountTimeoutsArgs] = None) -> ServiceAccount
func GetServiceAccount(ctx *Context, name string, id IDInput, state *ServiceAccountState, opts ...ResourceOption) (*ServiceAccount, error)
public static ServiceAccount Get(string name, Input<string> id, ServiceAccountState? state, CustomResourceOptions? opts = null)
public static ServiceAccount get(String name, Output<String> id, ServiceAccountState state, CustomResourceOptions options)
resources:  _:    type: temporalcloud:ServiceAccount    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AccountAccess string
The role on the account. Must be one of admin, developer, or read (case-insensitive).
Name string
The name associated with the service account.
NamespaceAccesses List<ServiceAccountNamespaceAccess>
The set of namespace accesses. Empty sets are not allowed, omit the attribute instead. Service Accounts with an account*access role of admin cannot be assigned explicit permissions to namespaces. Admins implicitly receive access to all Namespaces.
State string
The current state of the Service Account.
Timeouts ServiceAccountTimeouts
AccountAccess string
The role on the account. Must be one of admin, developer, or read (case-insensitive).
Name string
The name associated with the service account.
NamespaceAccesses []ServiceAccountNamespaceAccessArgs
The set of namespace accesses. Empty sets are not allowed, omit the attribute instead. Service Accounts with an account*access role of admin cannot be assigned explicit permissions to namespaces. Admins implicitly receive access to all Namespaces.
State string
The current state of the Service Account.
Timeouts ServiceAccountTimeoutsArgs
accountAccess String
The role on the account. Must be one of admin, developer, or read (case-insensitive).
name String
The name associated with the service account.
namespaceAccesses List<ServiceAccountNamespaceAccess>
The set of namespace accesses. Empty sets are not allowed, omit the attribute instead. Service Accounts with an account*access role of admin cannot be assigned explicit permissions to namespaces. Admins implicitly receive access to all Namespaces.
state String
The current state of the Service Account.
timeouts ServiceAccountTimeouts
accountAccess string
The role on the account. Must be one of admin, developer, or read (case-insensitive).
name string
The name associated with the service account.
namespaceAccesses ServiceAccountNamespaceAccess[]
The set of namespace accesses. Empty sets are not allowed, omit the attribute instead. Service Accounts with an account*access role of admin cannot be assigned explicit permissions to namespaces. Admins implicitly receive access to all Namespaces.
state string
The current state of the Service Account.
timeouts ServiceAccountTimeouts
account_access str
The role on the account. Must be one of admin, developer, or read (case-insensitive).
name str
The name associated with the service account.
namespace_accesses Sequence[ServiceAccountNamespaceAccessArgs]
The set of namespace accesses. Empty sets are not allowed, omit the attribute instead. Service Accounts with an account*access role of admin cannot be assigned explicit permissions to namespaces. Admins implicitly receive access to all Namespaces.
state str
The current state of the Service Account.
timeouts ServiceAccountTimeoutsArgs
accountAccess String
The role on the account. Must be one of admin, developer, or read (case-insensitive).
name String
The name associated with the service account.
namespaceAccesses List<Property Map>
The set of namespace accesses. Empty sets are not allowed, omit the attribute instead. Service Accounts with an account*access role of admin cannot be assigned explicit permissions to namespaces. Admins implicitly receive access to all Namespaces.
state String
The current state of the Service Account.
timeouts Property Map

Supporting Types

ServiceAccountNamespaceAccess
, ServiceAccountNamespaceAccessArgs

NamespaceId This property is required. string
The namespace to assign permissions to.
Permission This property is required. string
The permission to assign. Must be one of admin, write, or read (case-insensitive)
NamespaceId This property is required. string
The namespace to assign permissions to.
Permission This property is required. string
The permission to assign. Must be one of admin, write, or read (case-insensitive)
namespaceId This property is required. String
The namespace to assign permissions to.
permission This property is required. String
The permission to assign. Must be one of admin, write, or read (case-insensitive)
namespaceId This property is required. string
The namespace to assign permissions to.
permission This property is required. string
The permission to assign. Must be one of admin, write, or read (case-insensitive)
namespace_id This property is required. str
The namespace to assign permissions to.
permission This property is required. str
The permission to assign. Must be one of admin, write, or read (case-insensitive)
namespaceId This property is required. String
The namespace to assign permissions to.
permission This property is required. String
The permission to assign. Must be one of admin, write, or read (case-insensitive)

ServiceAccountTimeouts
, ServiceAccountTimeoutsArgs

Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
create str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.

Import

Service Accounts can be imported to incorporate existing Service Accounts into your Terraform pipeline.

To import a Service Account, you need

  • a resource configuration in your Terraform configuration file/module to accept the imported Service Account. In the example below, the placeholder is “temporalcloud_service_account” “saimport”

  • the Service Accounts’s ID, which is found using the Temporal Cloud CLI tcld sa l. In the example below, this is e3cb94fbdbb845f480044d053d00665b

$ pulumi import temporalcloud:index/serviceAccount:ServiceAccount saimport e3cb94fbdbb845f480044d053d00665b
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
temporalcloud temporalio/terraform-provider-temporalcloud
License
Notes
This Pulumi package is based on the temporalcloud Terraform Provider.