tencentcloud.TcrRepository
Explore with Pulumi AI
Use this resource to create tcr repository.
Example Usage
Create a tcr repository instance
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const exampleTcrInstance = new tencentcloud.TcrInstance("exampleTcrInstance", {
instanceType: "premium",
deleteBucket: true,
});
const exampleTcrNamespace = new tencentcloud.TcrNamespace("exampleTcrNamespace", {
instanceId: exampleTcrInstance.tcrInstanceId,
isPublic: true,
isAutoScan: true,
isPreventVul: true,
severity: "medium",
cveWhitelistItems: [{
cveId: "cve-xxxxx",
}],
});
const exampleTcrRepository = new tencentcloud.TcrRepository("exampleTcrRepository", {
instanceId: exampleTcrInstance.tcrInstanceId,
namespaceName: exampleTcrNamespace.name,
briefDesc: "111",
description: "111111111111111111111111111111111111",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example_tcr_instance = tencentcloud.TcrInstance("exampleTcrInstance",
instance_type="premium",
delete_bucket=True)
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": "cve-xxxxx",
}])
example_tcr_repository = tencentcloud.TcrRepository("exampleTcrRepository",
instance_id=example_tcr_instance.tcr_instance_id,
namespace_name=example_tcr_namespace.name,
brief_desc="111",
description="111111111111111111111111111111111111")
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("premium"),
DeleteBucket: pulumi.Bool(true),
})
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("cve-xxxxx"),
},
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewTcrRepository(ctx, "exampleTcrRepository", &tencentcloud.TcrRepositoryArgs{
InstanceId: exampleTcrInstance.TcrInstanceId,
NamespaceName: exampleTcrNamespace.Name,
BriefDesc: pulumi.String("111"),
Description: pulumi.String("111111111111111111111111111111111111"),
})
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 = "premium",
DeleteBucket = true,
});
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 = "cve-xxxxx",
},
},
});
var exampleTcrRepository = new Tencentcloud.TcrRepository("exampleTcrRepository", new()
{
InstanceId = exampleTcrInstance.TcrInstanceId,
NamespaceName = exampleTcrNamespace.Name,
BriefDesc = "111",
Description = "111111111111111111111111111111111111",
});
});
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.TcrRepository;
import com.pulumi.tencentcloud.TcrRepositoryArgs;
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("premium")
.deleteBucket(true)
.build());
var exampleTcrNamespace = new TcrNamespace("exampleTcrNamespace", TcrNamespaceArgs.builder()
.instanceId(exampleTcrInstance.tcrInstanceId())
.isPublic(true)
.isAutoScan(true)
.isPreventVul(true)
.severity("medium")
.cveWhitelistItems(TcrNamespaceCveWhitelistItemArgs.builder()
.cveId("cve-xxxxx")
.build())
.build());
var exampleTcrRepository = new TcrRepository("exampleTcrRepository", TcrRepositoryArgs.builder()
.instanceId(exampleTcrInstance.tcrInstanceId())
.namespaceName(exampleTcrNamespace.name())
.briefDesc("111")
.description("111111111111111111111111111111111111")
.build());
}
}
resources:
exampleTcrInstance:
type: tencentcloud:TcrInstance
properties:
instanceType: premium
deleteBucket: true
exampleTcrNamespace:
type: tencentcloud:TcrNamespace
properties:
instanceId: ${exampleTcrInstance.tcrInstanceId}
isPublic: true
isAutoScan: true
isPreventVul: true
severity: medium
cveWhitelistItems:
- cveId: cve-xxxxx
exampleTcrRepository:
type: tencentcloud:TcrRepository
properties:
instanceId: ${exampleTcrInstance.tcrInstanceId}
namespaceName: ${exampleTcrNamespace.name}
briefDesc: '111'
description: '111111111111111111111111111111111111'
Create TcrRepository Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TcrRepository(name: string, args: TcrRepositoryArgs, opts?: CustomResourceOptions);
@overload
def TcrRepository(resource_name: str,
args: TcrRepositoryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TcrRepository(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
namespace_name: Optional[str] = None,
brief_desc: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
tcr_repository_id: Optional[str] = None)
func NewTcrRepository(ctx *Context, name string, args TcrRepositoryArgs, opts ...ResourceOption) (*TcrRepository, error)
public TcrRepository(string name, TcrRepositoryArgs args, CustomResourceOptions? opts = null)
public TcrRepository(String name, TcrRepositoryArgs args)
public TcrRepository(String name, TcrRepositoryArgs args, CustomResourceOptions options)
type: tencentcloud:TcrRepository
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 TcrRepositoryArgs
- 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 TcrRepositoryArgs
- 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 TcrRepositoryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TcrRepositoryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TcrRepositoryArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TcrRepository 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 TcrRepository resource accepts the following input properties:
- Instance
Id string - ID of the TCR instance.
- Namespace
Name string - Name of the TCR namespace.
- Brief
Desc string - Brief description of the repository. Valid length is [1~100].
- Description string
- Description of the repository. Valid length is [1~1000].
- Name string
- Name of the TCR repository. Valid length is [2~200]. It can only contain lowercase letters, numbers and separators (
.
,_
,-
,/
), and cannot start, end or continue with separators. Support the use of multi-level address formats, such assub1/sub2/repo
. - Tcr
Repository stringId - ID of the resource.
- Instance
Id string - ID of the TCR instance.
- Namespace
Name string - Name of the TCR namespace.
- Brief
Desc string - Brief description of the repository. Valid length is [1~100].
- Description string
- Description of the repository. Valid length is [1~1000].
- Name string
- Name of the TCR repository. Valid length is [2~200]. It can only contain lowercase letters, numbers and separators (
.
,_
,-
,/
), and cannot start, end or continue with separators. Support the use of multi-level address formats, such assub1/sub2/repo
. - Tcr
Repository stringId - ID of the resource.
- instance
Id String - ID of the TCR instance.
- namespace
Name String - Name of the TCR namespace.
- brief
Desc String - Brief description of the repository. Valid length is [1~100].
- description String
- Description of the repository. Valid length is [1~1000].
- name String
- Name of the TCR repository. Valid length is [2~200]. It can only contain lowercase letters, numbers and separators (
.
,_
,-
,/
), and cannot start, end or continue with separators. Support the use of multi-level address formats, such assub1/sub2/repo
. - tcr
Repository StringId - ID of the resource.
- instance
Id string - ID of the TCR instance.
- namespace
Name string - Name of the TCR namespace.
- brief
Desc string - Brief description of the repository. Valid length is [1~100].
- description string
- Description of the repository. Valid length is [1~1000].
- name string
- Name of the TCR repository. Valid length is [2~200]. It can only contain lowercase letters, numbers and separators (
.
,_
,-
,/
), and cannot start, end or continue with separators. Support the use of multi-level address formats, such assub1/sub2/repo
. - tcr
Repository stringId - ID of the resource.
- instance_
id str - ID of the TCR instance.
- namespace_
name str - Name of the TCR namespace.
- brief_
desc str - Brief description of the repository. Valid length is [1~100].
- description str
- Description of the repository. Valid length is [1~1000].
- name str
- Name of the TCR repository. Valid length is [2~200]. It can only contain lowercase letters, numbers and separators (
.
,_
,-
,/
), and cannot start, end or continue with separators. Support the use of multi-level address formats, such assub1/sub2/repo
. - tcr_
repository_ strid - ID of the resource.
- instance
Id String - ID of the TCR instance.
- namespace
Name String - Name of the TCR namespace.
- brief
Desc String - Brief description of the repository. Valid length is [1~100].
- description String
- Description of the repository. Valid length is [1~1000].
- name String
- Name of the TCR repository. Valid length is [2~200]. It can only contain lowercase letters, numbers and separators (
.
,_
,-
,/
), and cannot start, end or continue with separators. Support the use of multi-level address formats, such assub1/sub2/repo
. - tcr
Repository StringId - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TcrRepository resource produces the following output properties:
- Create
Time string - Create time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Public bool - Indicate the repository is public or not.
- Update
Time string - Last updated time.
- Url string
- URL of the repository.
- Create
Time string - Create time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Public bool - Indicate the repository is public or not.
- Update
Time string - Last updated time.
- Url string
- URL of the repository.
- create
Time String - Create time.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Public Boolean - Indicate the repository is public or not.
- update
Time String - Last updated time.
- url String
- URL of the repository.
- create
Time string - Create time.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Public boolean - Indicate the repository is public or not.
- update
Time string - Last updated time.
- url string
- URL of the repository.
- create_
time str - Create time.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
public bool - Indicate the repository is public or not.
- update_
time str - Last updated time.
- url str
- URL of the repository.
- create
Time String - Create time.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Public Boolean - Indicate the repository is public or not.
- update
Time String - Last updated time.
- url String
- URL of the repository.
Look up Existing TcrRepository Resource
Get an existing TcrRepository 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?: TcrRepositoryState, opts?: CustomResourceOptions): TcrRepository
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
brief_desc: Optional[str] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
instance_id: Optional[str] = None,
is_public: Optional[bool] = None,
name: Optional[str] = None,
namespace_name: Optional[str] = None,
tcr_repository_id: Optional[str] = None,
update_time: Optional[str] = None,
url: Optional[str] = None) -> TcrRepository
func GetTcrRepository(ctx *Context, name string, id IDInput, state *TcrRepositoryState, opts ...ResourceOption) (*TcrRepository, error)
public static TcrRepository Get(string name, Input<string> id, TcrRepositoryState? state, CustomResourceOptions? opts = null)
public static TcrRepository get(String name, Output<String> id, TcrRepositoryState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TcrRepository 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.
- Brief
Desc string - Brief description of the repository. Valid length is [1~100].
- Create
Time string - Create time.
- Description string
- Description of the repository. Valid length is [1~1000].
- Instance
Id string - ID of the TCR instance.
- Is
Public bool - Indicate the repository is public or not.
- Name string
- Name of the TCR repository. Valid length is [2~200]. It can only contain lowercase letters, numbers and separators (
.
,_
,-
,/
), and cannot start, end or continue with separators. Support the use of multi-level address formats, such assub1/sub2/repo
. - Namespace
Name string - Name of the TCR namespace.
- Tcr
Repository stringId - ID of the resource.
- Update
Time string - Last updated time.
- Url string
- URL of the repository.
- Brief
Desc string - Brief description of the repository. Valid length is [1~100].
- Create
Time string - Create time.
- Description string
- Description of the repository. Valid length is [1~1000].
- Instance
Id string - ID of the TCR instance.
- Is
Public bool - Indicate the repository is public or not.
- Name string
- Name of the TCR repository. Valid length is [2~200]. It can only contain lowercase letters, numbers and separators (
.
,_
,-
,/
), and cannot start, end or continue with separators. Support the use of multi-level address formats, such assub1/sub2/repo
. - Namespace
Name string - Name of the TCR namespace.
- Tcr
Repository stringId - ID of the resource.
- Update
Time string - Last updated time.
- Url string
- URL of the repository.
- brief
Desc String - Brief description of the repository. Valid length is [1~100].
- create
Time String - Create time.
- description String
- Description of the repository. Valid length is [1~1000].
- instance
Id String - ID of the TCR instance.
- is
Public Boolean - Indicate the repository is public or not.
- name String
- Name of the TCR repository. Valid length is [2~200]. It can only contain lowercase letters, numbers and separators (
.
,_
,-
,/
), and cannot start, end or continue with separators. Support the use of multi-level address formats, such assub1/sub2/repo
. - namespace
Name String - Name of the TCR namespace.
- tcr
Repository StringId - ID of the resource.
- update
Time String - Last updated time.
- url String
- URL of the repository.
- brief
Desc string - Brief description of the repository. Valid length is [1~100].
- create
Time string - Create time.
- description string
- Description of the repository. Valid length is [1~1000].
- instance
Id string - ID of the TCR instance.
- is
Public boolean - Indicate the repository is public or not.
- name string
- Name of the TCR repository. Valid length is [2~200]. It can only contain lowercase letters, numbers and separators (
.
,_
,-
,/
), and cannot start, end or continue with separators. Support the use of multi-level address formats, such assub1/sub2/repo
. - namespace
Name string - Name of the TCR namespace.
- tcr
Repository stringId - ID of the resource.
- update
Time string - Last updated time.
- url string
- URL of the repository.
- brief_
desc str - Brief description of the repository. Valid length is [1~100].
- create_
time str - Create time.
- description str
- Description of the repository. Valid length is [1~1000].
- instance_
id str - ID of the TCR instance.
- is_
public bool - Indicate the repository is public or not.
- name str
- Name of the TCR repository. Valid length is [2~200]. It can only contain lowercase letters, numbers and separators (
.
,_
,-
,/
), and cannot start, end or continue with separators. Support the use of multi-level address formats, such assub1/sub2/repo
. - namespace_
name str - Name of the TCR namespace.
- tcr_
repository_ strid - ID of the resource.
- update_
time str - Last updated time.
- url str
- URL of the repository.
- brief
Desc String - Brief description of the repository. Valid length is [1~100].
- create
Time String - Create time.
- description String
- Description of the repository. Valid length is [1~1000].
- instance
Id String - ID of the TCR instance.
- is
Public Boolean - Indicate the repository is public or not.
- name String
- Name of the TCR repository. Valid length is [2~200]. It can only contain lowercase letters, numbers and separators (
.
,_
,-
,/
), and cannot start, end or continue with separators. Support the use of multi-level address formats, such assub1/sub2/repo
. - namespace
Name String - Name of the TCR namespace.
- tcr
Repository StringId - ID of the resource.
- update
Time String - Last updated time.
- url String
- URL of the repository.
Import
tcr repository can be imported using the id, e.g.
$ pulumi import tencentcloud:index/tcrRepository:TcrRepository foo instance_id#namespace_name#repository_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.