1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. TcrServiceAccount
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.TcrServiceAccount

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a tcr service account.

    Example Usage

    Create custom account with specified duration days

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const exampleTcrInstance = new tencentcloud.TcrInstance("exampleTcrInstance", {
        instanceType: "basic",
        deleteBucket: true,
        tags: {
            createdBy: "terraform",
        },
    });
    const exampleTcrNamespace = new tencentcloud.TcrNamespace("exampleTcrNamespace", {
        instanceId: exampleTcrInstance.tcrInstanceId,
        isPublic: true,
        isAutoScan: true,
        isPreventVul: true,
        severity: "medium",
        cveWhitelistItems: [{
            cveId: "tf_example_cve_id",
        }],
    });
    const exampleTcrServiceAccount = new tencentcloud.TcrServiceAccount("exampleTcrServiceAccount", {
        registryId: exampleTcrInstance.tcrInstanceId,
        permissions: [{
            resource: exampleTcrNamespace.name,
            actions: [
                "tcr:PushRepository",
                "tcr:PullRepository",
            ],
        }],
        description: "tf example for tcr custom account",
        duration: 10,
        disable: false,
        tags: {
            createdBy: "terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example_tcr_instance = tencentcloud.TcrInstance("exampleTcrInstance",
        instance_type="basic",
        delete_bucket=True,
        tags={
            "createdBy": "terraform",
        })
    example_tcr_namespace = tencentcloud.TcrNamespace("exampleTcrNamespace",
        instance_id=example_tcr_instance.tcr_instance_id,
        is_public=True,
        is_auto_scan=True,
        is_prevent_vul=True,
        severity="medium",
        cve_whitelist_items=[{
            "cve_id": "tf_example_cve_id",
        }])
    example_tcr_service_account = tencentcloud.TcrServiceAccount("exampleTcrServiceAccount",
        registry_id=example_tcr_instance.tcr_instance_id,
        permissions=[{
            "resource": example_tcr_namespace.name,
            "actions": [
                "tcr:PushRepository",
                "tcr:PullRepository",
            ],
        }],
        description="tf example for tcr custom account",
        duration=10,
        disable=False,
        tags={
            "createdBy": "terraform",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleTcrInstance, err := tencentcloud.NewTcrInstance(ctx, "exampleTcrInstance", &tencentcloud.TcrInstanceArgs{
    			InstanceType: pulumi.String("basic"),
    			DeleteBucket: pulumi.Bool(true),
    			Tags: pulumi.StringMap{
    				"createdBy": pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleTcrNamespace, err := tencentcloud.NewTcrNamespace(ctx, "exampleTcrNamespace", &tencentcloud.TcrNamespaceArgs{
    			InstanceId:   exampleTcrInstance.TcrInstanceId,
    			IsPublic:     pulumi.Bool(true),
    			IsAutoScan:   pulumi.Bool(true),
    			IsPreventVul: pulumi.Bool(true),
    			Severity:     pulumi.String("medium"),
    			CveWhitelistItems: tencentcloud.TcrNamespaceCveWhitelistItemArray{
    				&tencentcloud.TcrNamespaceCveWhitelistItemArgs{
    					CveId: pulumi.String("tf_example_cve_id"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewTcrServiceAccount(ctx, "exampleTcrServiceAccount", &tencentcloud.TcrServiceAccountArgs{
    			RegistryId: exampleTcrInstance.TcrInstanceId,
    			Permissions: tencentcloud.TcrServiceAccountPermissionArray{
    				&tencentcloud.TcrServiceAccountPermissionArgs{
    					Resource: exampleTcrNamespace.Name,
    					Actions: pulumi.StringArray{
    						pulumi.String("tcr:PushRepository"),
    						pulumi.String("tcr:PullRepository"),
    					},
    				},
    			},
    			Description: pulumi.String("tf example for tcr custom account"),
    			Duration:    pulumi.Float64(10),
    			Disable:     pulumi.Bool(false),
    			Tags: pulumi.StringMap{
    				"createdBy": pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleTcrInstance = new Tencentcloud.TcrInstance("exampleTcrInstance", new()
        {
            InstanceType = "basic",
            DeleteBucket = true,
            Tags = 
            {
                { "createdBy", "terraform" },
            },
        });
    
        var exampleTcrNamespace = new Tencentcloud.TcrNamespace("exampleTcrNamespace", new()
        {
            InstanceId = exampleTcrInstance.TcrInstanceId,
            IsPublic = true,
            IsAutoScan = true,
            IsPreventVul = true,
            Severity = "medium",
            CveWhitelistItems = new[]
            {
                new Tencentcloud.Inputs.TcrNamespaceCveWhitelistItemArgs
                {
                    CveId = "tf_example_cve_id",
                },
            },
        });
    
        var exampleTcrServiceAccount = new Tencentcloud.TcrServiceAccount("exampleTcrServiceAccount", new()
        {
            RegistryId = exampleTcrInstance.TcrInstanceId,
            Permissions = new[]
            {
                new Tencentcloud.Inputs.TcrServiceAccountPermissionArgs
                {
                    Resource = exampleTcrNamespace.Name,
                    Actions = new[]
                    {
                        "tcr:PushRepository",
                        "tcr:PullRepository",
                    },
                },
            },
            Description = "tf example for tcr custom account",
            Duration = 10,
            Disable = false,
            Tags = 
            {
                { "createdBy", "terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TcrInstance;
    import com.pulumi.tencentcloud.TcrInstanceArgs;
    import com.pulumi.tencentcloud.TcrNamespace;
    import com.pulumi.tencentcloud.TcrNamespaceArgs;
    import com.pulumi.tencentcloud.inputs.TcrNamespaceCveWhitelistItemArgs;
    import com.pulumi.tencentcloud.TcrServiceAccount;
    import com.pulumi.tencentcloud.TcrServiceAccountArgs;
    import com.pulumi.tencentcloud.inputs.TcrServiceAccountPermissionArgs;
    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 exampleTcrInstance = new TcrInstance("exampleTcrInstance", TcrInstanceArgs.builder()
                .instanceType("basic")
                .deleteBucket(true)
                .tags(Map.of("createdBy", "terraform"))
                .build());
    
            var exampleTcrNamespace = new TcrNamespace("exampleTcrNamespace", TcrNamespaceArgs.builder()
                .instanceId(exampleTcrInstance.tcrInstanceId())
                .isPublic(true)
                .isAutoScan(true)
                .isPreventVul(true)
                .severity("medium")
                .cveWhitelistItems(TcrNamespaceCveWhitelistItemArgs.builder()
                    .cveId("tf_example_cve_id")
                    .build())
                .build());
    
            var exampleTcrServiceAccount = new TcrServiceAccount("exampleTcrServiceAccount", TcrServiceAccountArgs.builder()
                .registryId(exampleTcrInstance.tcrInstanceId())
                .permissions(TcrServiceAccountPermissionArgs.builder()
                    .resource(exampleTcrNamespace.name())
                    .actions(                
                        "tcr:PushRepository",
                        "tcr:PullRepository")
                    .build())
                .description("tf example for tcr custom account")
                .duration(10)
                .disable(false)
                .tags(Map.of("createdBy", "terraform"))
                .build());
    
        }
    }
    
    resources:
      exampleTcrInstance:
        type: tencentcloud:TcrInstance
        properties:
          instanceType: basic
          deleteBucket: true
          tags:
            createdBy: terraform
      exampleTcrNamespace:
        type: tencentcloud:TcrNamespace
        properties:
          instanceId: ${exampleTcrInstance.tcrInstanceId}
          isPublic: true
          isAutoScan: true
          isPreventVul: true
          severity: medium
          cveWhitelistItems:
            - cveId: tf_example_cve_id
      exampleTcrServiceAccount:
        type: tencentcloud:TcrServiceAccount
        properties:
          registryId: ${exampleTcrInstance.tcrInstanceId}
          permissions:
            - resource: ${exampleTcrNamespace.name}
              actions:
                - tcr:PushRepository
                - tcr:PullRepository
          description: tf example for tcr custom account
          duration: 10
          disable: false
          tags:
            createdBy: terraform
    

    With specified expiration time

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.TcrServiceAccount("example", {
        registryId: tencentcloud_tcr_instance.example.id,
        permissions: [{
            resource: tencentcloud_tcr_namespace.example.name,
            actions: [
                "tcr:PushRepository",
                "tcr:PullRepository",
            ],
        }],
        description: "tf example for tcr custom account",
        expiresAt: 1676897989000,
        disable: false,
        tags: {
            createdBy: "terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.TcrServiceAccount("example",
        registry_id=tencentcloud_tcr_instance["example"]["id"],
        permissions=[{
            "resource": tencentcloud_tcr_namespace["example"]["name"],
            "actions": [
                "tcr:PushRepository",
                "tcr:PullRepository",
            ],
        }],
        description="tf example for tcr custom account",
        expires_at=1676897989000,
        disable=False,
        tags={
            "createdBy": "terraform",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewTcrServiceAccount(ctx, "example", &tencentcloud.TcrServiceAccountArgs{
    			RegistryId: pulumi.Any(tencentcloud_tcr_instance.Example.Id),
    			Permissions: tencentcloud.TcrServiceAccountPermissionArray{
    				&tencentcloud.TcrServiceAccountPermissionArgs{
    					Resource: pulumi.Any(tencentcloud_tcr_namespace.Example.Name),
    					Actions: pulumi.StringArray{
    						pulumi.String("tcr:PushRepository"),
    						pulumi.String("tcr:PullRepository"),
    					},
    				},
    			},
    			Description: pulumi.String("tf example for tcr custom account"),
    			ExpiresAt:   pulumi.Float64(1676897989000),
    			Disable:     pulumi.Bool(false),
    			Tags: pulumi.StringMap{
    				"createdBy": pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.TcrServiceAccount("example", new()
        {
            RegistryId = tencentcloud_tcr_instance.Example.Id,
            Permissions = new[]
            {
                new Tencentcloud.Inputs.TcrServiceAccountPermissionArgs
                {
                    Resource = tencentcloud_tcr_namespace.Example.Name,
                    Actions = new[]
                    {
                        "tcr:PushRepository",
                        "tcr:PullRepository",
                    },
                },
            },
            Description = "tf example for tcr custom account",
            ExpiresAt = 1676897989000,
            Disable = false,
            Tags = 
            {
                { "createdBy", "terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TcrServiceAccount;
    import com.pulumi.tencentcloud.TcrServiceAccountArgs;
    import com.pulumi.tencentcloud.inputs.TcrServiceAccountPermissionArgs;
    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 example = new TcrServiceAccount("example", TcrServiceAccountArgs.builder()
                .registryId(tencentcloud_tcr_instance.example().id())
                .permissions(TcrServiceAccountPermissionArgs.builder()
                    .resource(tencentcloud_tcr_namespace.example().name())
                    .actions(                
                        "tcr:PushRepository",
                        "tcr:PullRepository")
                    .build())
                .description("tf example for tcr custom account")
                .expiresAt(1676897989000)
                .disable(false)
                .tags(Map.of("createdBy", "terraform"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:TcrServiceAccount
        properties:
          registryId: ${tencentcloud_tcr_instance.example.id}
          permissions:
            - resource: ${tencentcloud_tcr_namespace.example.name}
              actions:
                - tcr:PushRepository
                - tcr:PullRepository
          description: tf example for tcr custom account
          expiresAt: 1.676897989e+12
          # time stamp
          disable: false
          tags:
            createdBy: terraform
    

    Create TcrServiceAccount Resource

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

    Constructor syntax

    new TcrServiceAccount(name: string, args: TcrServiceAccountArgs, opts?: CustomResourceOptions);
    @overload
    def TcrServiceAccount(resource_name: str,
                          args: TcrServiceAccountArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def TcrServiceAccount(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          permissions: Optional[Sequence[TcrServiceAccountPermissionArgs]] = None,
                          registry_id: Optional[str] = None,
                          description: Optional[str] = None,
                          disable: Optional[bool] = None,
                          duration: Optional[float] = None,
                          expires_at: Optional[float] = None,
                          name: Optional[str] = None,
                          tags: Optional[Mapping[str, str]] = None,
                          tcr_service_account_id: Optional[str] = None)
    func NewTcrServiceAccount(ctx *Context, name string, args TcrServiceAccountArgs, opts ...ResourceOption) (*TcrServiceAccount, error)
    public TcrServiceAccount(string name, TcrServiceAccountArgs args, CustomResourceOptions? opts = null)
    public TcrServiceAccount(String name, TcrServiceAccountArgs args)
    public TcrServiceAccount(String name, TcrServiceAccountArgs args, CustomResourceOptions options)
    
    type: tencentcloud:TcrServiceAccount
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TcrServiceAccountArgs
    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 TcrServiceAccountArgs
    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 TcrServiceAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TcrServiceAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TcrServiceAccountArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Permissions List<TcrServiceAccountPermission>
    strategy list.
    RegistryId string
    instance id.
    Description string
    Service account description.
    Disable bool
    whether to disable Service accounts.
    Duration double
    expiration date (unit: day), calculated from the current time, priority is higher than ExpiresAt Service account description.
    ExpiresAt double
    Service account expiration time (time stamp, unit: milliseconds).
    Name string
    Service account name.
    Tags Dictionary<string, string>
    Tag description list.
    TcrServiceAccountId string
    ID of the resource.
    Permissions []TcrServiceAccountPermissionArgs
    strategy list.
    RegistryId string
    instance id.
    Description string
    Service account description.
    Disable bool
    whether to disable Service accounts.
    Duration float64
    expiration date (unit: day), calculated from the current time, priority is higher than ExpiresAt Service account description.
    ExpiresAt float64
    Service account expiration time (time stamp, unit: milliseconds).
    Name string
    Service account name.
    Tags map[string]string
    Tag description list.
    TcrServiceAccountId string
    ID of the resource.
    permissions List<TcrServiceAccountPermission>
    strategy list.
    registryId String
    instance id.
    description String
    Service account description.
    disable Boolean
    whether to disable Service accounts.
    duration Double
    expiration date (unit: day), calculated from the current time, priority is higher than ExpiresAt Service account description.
    expiresAt Double
    Service account expiration time (time stamp, unit: milliseconds).
    name String
    Service account name.
    tags Map<String,String>
    Tag description list.
    tcrServiceAccountId String
    ID of the resource.
    permissions TcrServiceAccountPermission[]
    strategy list.
    registryId string
    instance id.
    description string
    Service account description.
    disable boolean
    whether to disable Service accounts.
    duration number
    expiration date (unit: day), calculated from the current time, priority is higher than ExpiresAt Service account description.
    expiresAt number
    Service account expiration time (time stamp, unit: milliseconds).
    name string
    Service account name.
    tags {[key: string]: string}
    Tag description list.
    tcrServiceAccountId string
    ID of the resource.
    permissions Sequence[TcrServiceAccountPermissionArgs]
    strategy list.
    registry_id str
    instance id.
    description str
    Service account description.
    disable bool
    whether to disable Service accounts.
    duration float
    expiration date (unit: day), calculated from the current time, priority is higher than ExpiresAt Service account description.
    expires_at float
    Service account expiration time (time stamp, unit: milliseconds).
    name str
    Service account name.
    tags Mapping[str, str]
    Tag description list.
    tcr_service_account_id str
    ID of the resource.
    permissions List<Property Map>
    strategy list.
    registryId String
    instance id.
    description String
    Service account description.
    disable Boolean
    whether to disable Service accounts.
    duration Number
    expiration date (unit: day), calculated from the current time, priority is higher than ExpiresAt Service account description.
    expiresAt Number
    Service account expiration time (time stamp, unit: milliseconds).
    name String
    Service account name.
    tags Map<String>
    Tag description list.
    tcrServiceAccountId String
    ID of the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    Password of the service account.
    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    Password of the service account.
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    Password of the service account.
    id string
    The provider-assigned unique ID for this managed resource.
    password string
    Password of the service account.
    id str
    The provider-assigned unique ID for this managed resource.
    password str
    Password of the service account.
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    Password of the service account.

    Look up Existing TcrServiceAccount Resource

    Get an existing TcrServiceAccount 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?: TcrServiceAccountState, opts?: CustomResourceOptions): TcrServiceAccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            disable: Optional[bool] = None,
            duration: Optional[float] = None,
            expires_at: Optional[float] = None,
            name: Optional[str] = None,
            password: Optional[str] = None,
            permissions: Optional[Sequence[TcrServiceAccountPermissionArgs]] = None,
            registry_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tcr_service_account_id: Optional[str] = None) -> TcrServiceAccount
    func GetTcrServiceAccount(ctx *Context, name string, id IDInput, state *TcrServiceAccountState, opts ...ResourceOption) (*TcrServiceAccount, error)
    public static TcrServiceAccount Get(string name, Input<string> id, TcrServiceAccountState? state, CustomResourceOptions? opts = null)
    public static TcrServiceAccount get(String name, Output<String> id, TcrServiceAccountState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TcrServiceAccount    get:      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:
    Description string
    Service account description.
    Disable bool
    whether to disable Service accounts.
    Duration double
    expiration date (unit: day), calculated from the current time, priority is higher than ExpiresAt Service account description.
    ExpiresAt double
    Service account expiration time (time stamp, unit: milliseconds).
    Name string
    Service account name.
    Password string
    Password of the service account.
    Permissions List<TcrServiceAccountPermission>
    strategy list.
    RegistryId string
    instance id.
    Tags Dictionary<string, string>
    Tag description list.
    TcrServiceAccountId string
    ID of the resource.
    Description string
    Service account description.
    Disable bool
    whether to disable Service accounts.
    Duration float64
    expiration date (unit: day), calculated from the current time, priority is higher than ExpiresAt Service account description.
    ExpiresAt float64
    Service account expiration time (time stamp, unit: milliseconds).
    Name string
    Service account name.
    Password string
    Password of the service account.
    Permissions []TcrServiceAccountPermissionArgs
    strategy list.
    RegistryId string
    instance id.
    Tags map[string]string
    Tag description list.
    TcrServiceAccountId string
    ID of the resource.
    description String
    Service account description.
    disable Boolean
    whether to disable Service accounts.
    duration Double
    expiration date (unit: day), calculated from the current time, priority is higher than ExpiresAt Service account description.
    expiresAt Double
    Service account expiration time (time stamp, unit: milliseconds).
    name String
    Service account name.
    password String
    Password of the service account.
    permissions List<TcrServiceAccountPermission>
    strategy list.
    registryId String
    instance id.
    tags Map<String,String>
    Tag description list.
    tcrServiceAccountId String
    ID of the resource.
    description string
    Service account description.
    disable boolean
    whether to disable Service accounts.
    duration number
    expiration date (unit: day), calculated from the current time, priority is higher than ExpiresAt Service account description.
    expiresAt number
    Service account expiration time (time stamp, unit: milliseconds).
    name string
    Service account name.
    password string
    Password of the service account.
    permissions TcrServiceAccountPermission[]
    strategy list.
    registryId string
    instance id.
    tags {[key: string]: string}
    Tag description list.
    tcrServiceAccountId string
    ID of the resource.
    description str
    Service account description.
    disable bool
    whether to disable Service accounts.
    duration float
    expiration date (unit: day), calculated from the current time, priority is higher than ExpiresAt Service account description.
    expires_at float
    Service account expiration time (time stamp, unit: milliseconds).
    name str
    Service account name.
    password str
    Password of the service account.
    permissions Sequence[TcrServiceAccountPermissionArgs]
    strategy list.
    registry_id str
    instance id.
    tags Mapping[str, str]
    Tag description list.
    tcr_service_account_id str
    ID of the resource.
    description String
    Service account description.
    disable Boolean
    whether to disable Service accounts.
    duration Number
    expiration date (unit: day), calculated from the current time, priority is higher than ExpiresAt Service account description.
    expiresAt Number
    Service account expiration time (time stamp, unit: milliseconds).
    name String
    Service account name.
    password String
    Password of the service account.
    permissions List<Property Map>
    strategy list.
    registryId String
    instance id.
    tags Map<String>
    Tag description list.
    tcrServiceAccountId String
    ID of the resource.

    Supporting Types

    TcrServiceAccountPermission, TcrServiceAccountPermissionArgs

    Actions List<string>
    Actions, currently support: tcr:PushRepository, tcr:PullRepository, tcr:CreateRepository, tcr:CreateHelmChart, tcr:DescribeHelmCharts. Note: This field may return null, indicating that no valid value can be obtained.
    Resource string
    resource path, currently only supports Namespace. Note: This field may return null, indicating that no valid value can be obtained.
    Actions []string
    Actions, currently support: tcr:PushRepository, tcr:PullRepository, tcr:CreateRepository, tcr:CreateHelmChart, tcr:DescribeHelmCharts. Note: This field may return null, indicating that no valid value can be obtained.
    Resource string
    resource path, currently only supports Namespace. Note: This field may return null, indicating that no valid value can be obtained.
    actions List<String>
    Actions, currently support: tcr:PushRepository, tcr:PullRepository, tcr:CreateRepository, tcr:CreateHelmChart, tcr:DescribeHelmCharts. Note: This field may return null, indicating that no valid value can be obtained.
    resource String
    resource path, currently only supports Namespace. Note: This field may return null, indicating that no valid value can be obtained.
    actions string[]
    Actions, currently support: tcr:PushRepository, tcr:PullRepository, tcr:CreateRepository, tcr:CreateHelmChart, tcr:DescribeHelmCharts. Note: This field may return null, indicating that no valid value can be obtained.
    resource string
    resource path, currently only supports Namespace. Note: This field may return null, indicating that no valid value can be obtained.
    actions Sequence[str]
    Actions, currently support: tcr:PushRepository, tcr:PullRepository, tcr:CreateRepository, tcr:CreateHelmChart, tcr:DescribeHelmCharts. Note: This field may return null, indicating that no valid value can be obtained.
    resource str
    resource path, currently only supports Namespace. Note: This field may return null, indicating that no valid value can be obtained.
    actions List<String>
    Actions, currently support: tcr:PushRepository, tcr:PullRepository, tcr:CreateRepository, tcr:CreateHelmChart, tcr:DescribeHelmCharts. Note: This field may return null, indicating that no valid value can be obtained.
    resource String
    resource path, currently only supports Namespace. Note: This field may return null, indicating that no valid value can be obtained.

    Import

    tcr service_account can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/tcrServiceAccount:TcrServiceAccount service_account registry_id#account_name
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack