tencentcloud.TcrCreateImageSignatureOperation
Explore with Pulumi AI
Provides a resource to operate a tcr image signature.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const exampleTcrInstance = new tencentcloud.TcrInstance("exampleTcrInstance", {
instanceType: "premium",
tags: {
createdBy: "terraform",
},
});
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",
});
const exampleTcrCreateImageSignatureOperation = new tencentcloud.TcrCreateImageSignatureOperation("exampleTcrCreateImageSignatureOperation", {
registryId: exampleTcrInstance.tcrInstanceId,
namespaceName: exampleTcrNamespace.name,
repositoryName: exampleTcrRepository.name,
imageVersion: "v1",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example_tcr_instance = tencentcloud.TcrInstance("exampleTcrInstance",
instance_type="premium",
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": "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")
example_tcr_create_image_signature_operation = tencentcloud.TcrCreateImageSignatureOperation("exampleTcrCreateImageSignatureOperation",
registry_id=example_tcr_instance.tcr_instance_id,
namespace_name=example_tcr_namespace.name,
repository_name=example_tcr_repository.name,
image_version="v1")
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"),
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("cve-xxxxx"),
},
},
})
if err != nil {
return err
}
exampleTcrRepository, 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
}
_, err = tencentcloud.NewTcrCreateImageSignatureOperation(ctx, "exampleTcrCreateImageSignatureOperation", &tencentcloud.TcrCreateImageSignatureOperationArgs{
RegistryId: exampleTcrInstance.TcrInstanceId,
NamespaceName: exampleTcrNamespace.Name,
RepositoryName: exampleTcrRepository.Name,
ImageVersion: pulumi.String("v1"),
})
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",
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 = "cve-xxxxx",
},
},
});
var exampleTcrRepository = new Tencentcloud.TcrRepository("exampleTcrRepository", new()
{
InstanceId = exampleTcrInstance.TcrInstanceId,
NamespaceName = exampleTcrNamespace.Name,
BriefDesc = "111",
Description = "111111111111111111111111111111111111",
});
var exampleTcrCreateImageSignatureOperation = new Tencentcloud.TcrCreateImageSignatureOperation("exampleTcrCreateImageSignatureOperation", new()
{
RegistryId = exampleTcrInstance.TcrInstanceId,
NamespaceName = exampleTcrNamespace.Name,
RepositoryName = exampleTcrRepository.Name,
ImageVersion = "v1",
});
});
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 com.pulumi.tencentcloud.TcrCreateImageSignatureOperation;
import com.pulumi.tencentcloud.TcrCreateImageSignatureOperationArgs;
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")
.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("cve-xxxxx")
.build())
.build());
var exampleTcrRepository = new TcrRepository("exampleTcrRepository", TcrRepositoryArgs.builder()
.instanceId(exampleTcrInstance.tcrInstanceId())
.namespaceName(exampleTcrNamespace.name())
.briefDesc("111")
.description("111111111111111111111111111111111111")
.build());
var exampleTcrCreateImageSignatureOperation = new TcrCreateImageSignatureOperation("exampleTcrCreateImageSignatureOperation", TcrCreateImageSignatureOperationArgs.builder()
.registryId(exampleTcrInstance.tcrInstanceId())
.namespaceName(exampleTcrNamespace.name())
.repositoryName(exampleTcrRepository.name())
.imageVersion("v1")
.build());
}
}
resources:
exampleTcrInstance:
type: tencentcloud:TcrInstance
properties:
instanceType: premium
tags:
createdBy: terraform
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'
exampleTcrCreateImageSignatureOperation:
type: tencentcloud:TcrCreateImageSignatureOperation
properties:
registryId: ${exampleTcrInstance.tcrInstanceId}
namespaceName: ${exampleTcrNamespace.name}
repositoryName: ${exampleTcrRepository.name}
imageVersion: v1
Create TcrCreateImageSignatureOperation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TcrCreateImageSignatureOperation(name: string, args: TcrCreateImageSignatureOperationArgs, opts?: CustomResourceOptions);
@overload
def TcrCreateImageSignatureOperation(resource_name: str,
args: TcrCreateImageSignatureOperationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TcrCreateImageSignatureOperation(resource_name: str,
opts: Optional[ResourceOptions] = None,
image_version: Optional[str] = None,
namespace_name: Optional[str] = None,
registry_id: Optional[str] = None,
repository_name: Optional[str] = None,
tcr_create_image_signature_operation_id: Optional[str] = None)
func NewTcrCreateImageSignatureOperation(ctx *Context, name string, args TcrCreateImageSignatureOperationArgs, opts ...ResourceOption) (*TcrCreateImageSignatureOperation, error)
public TcrCreateImageSignatureOperation(string name, TcrCreateImageSignatureOperationArgs args, CustomResourceOptions? opts = null)
public TcrCreateImageSignatureOperation(String name, TcrCreateImageSignatureOperationArgs args)
public TcrCreateImageSignatureOperation(String name, TcrCreateImageSignatureOperationArgs args, CustomResourceOptions options)
type: tencentcloud:TcrCreateImageSignatureOperation
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 TcrCreateImageSignatureOperationArgs
- 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 TcrCreateImageSignatureOperationArgs
- 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 TcrCreateImageSignatureOperationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TcrCreateImageSignatureOperationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TcrCreateImageSignatureOperationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TcrCreateImageSignatureOperation 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 TcrCreateImageSignatureOperation resource accepts the following input properties:
- Image
Version string - image version name.
- Namespace
Name string - namespace name.
- Registry
Id string - instance id.
- Repository
Name string - repository name.
- Tcr
Create stringImage Signature Operation Id - ID of the resource.
- Image
Version string - image version name.
- Namespace
Name string - namespace name.
- Registry
Id string - instance id.
- Repository
Name string - repository name.
- Tcr
Create stringImage Signature Operation Id - ID of the resource.
- image
Version String - image version name.
- namespace
Name String - namespace name.
- registry
Id String - instance id.
- repository
Name String - repository name.
- tcr
Create StringImage Signature Operation Id - ID of the resource.
- image
Version string - image version name.
- namespace
Name string - namespace name.
- registry
Id string - instance id.
- repository
Name string - repository name.
- tcr
Create stringImage Signature Operation Id - ID of the resource.
- image_
version str - image version name.
- namespace_
name str - namespace name.
- registry_
id str - instance id.
- repository_
name str - repository name.
- tcr_
create_ strimage_ signature_ operation_ id - ID of the resource.
- image
Version String - image version name.
- namespace
Name String - namespace name.
- registry
Id String - instance id.
- repository
Name String - repository name.
- tcr
Create StringImage Signature Operation Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TcrCreateImageSignatureOperation 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 str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TcrCreateImageSignatureOperation Resource
Get an existing TcrCreateImageSignatureOperation 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?: TcrCreateImageSignatureOperationState, opts?: CustomResourceOptions): TcrCreateImageSignatureOperation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
image_version: Optional[str] = None,
namespace_name: Optional[str] = None,
registry_id: Optional[str] = None,
repository_name: Optional[str] = None,
tcr_create_image_signature_operation_id: Optional[str] = None) -> TcrCreateImageSignatureOperation
func GetTcrCreateImageSignatureOperation(ctx *Context, name string, id IDInput, state *TcrCreateImageSignatureOperationState, opts ...ResourceOption) (*TcrCreateImageSignatureOperation, error)
public static TcrCreateImageSignatureOperation Get(string name, Input<string> id, TcrCreateImageSignatureOperationState? state, CustomResourceOptions? opts = null)
public static TcrCreateImageSignatureOperation get(String name, Output<String> id, TcrCreateImageSignatureOperationState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TcrCreateImageSignatureOperation 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.
- Image
Version string - image version name.
- Namespace
Name string - namespace name.
- Registry
Id string - instance id.
- Repository
Name string - repository name.
- Tcr
Create stringImage Signature Operation Id - ID of the resource.
- Image
Version string - image version name.
- Namespace
Name string - namespace name.
- Registry
Id string - instance id.
- Repository
Name string - repository name.
- Tcr
Create stringImage Signature Operation Id - ID of the resource.
- image
Version String - image version name.
- namespace
Name String - namespace name.
- registry
Id String - instance id.
- repository
Name String - repository name.
- tcr
Create StringImage Signature Operation Id - ID of the resource.
- image
Version string - image version name.
- namespace
Name string - namespace name.
- registry
Id string - instance id.
- repository
Name string - repository name.
- tcr
Create stringImage Signature Operation Id - ID of the resource.
- image_
version str - image version name.
- namespace_
name str - namespace name.
- registry_
id str - instance id.
- repository_
name str - repository name.
- tcr_
create_ strimage_ signature_ operation_ id - ID of the resource.
- image
Version String - image version name.
- namespace
Name String - namespace name.
- registry
Id String - instance id.
- repository
Name String - repository name.
- tcr
Create StringImage Signature Operation Id - ID of the resource.
Import
tcr image_signature_operation can be imported using the id, e.g.
$ pulumi import tencentcloud:index/tcrCreateImageSignatureOperation:TcrCreateImageSignatureOperation image_signature_operation image_signature_operation_id
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.