Provides a resource to manage cr registry
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
// create cr registry
const fooRegistry = new volcengine.cr.Registry("fooRegistry", {
deleteImmediately: false,
password: "1qaz!QAZ",
project: "default",
});
// create cr namespace
const fooNamespace = new volcengine.cr.Namespace("fooNamespace", {
registry: fooRegistry.id,
project: "default",
});
// create cr repository
const fooRepository = new volcengine.cr.Repository("fooRepository", {
registry: fooRegistry.id,
namespace: fooNamespace.name,
description: "A test repository created by terraform.",
accessLevel: "Public",
});
import pulumi
import pulumi_volcengine as volcengine
# create cr registry
foo_registry = volcengine.cr.Registry("fooRegistry",
delete_immediately=False,
password="1qaz!QAZ",
project="default")
# create cr namespace
foo_namespace = volcengine.cr.Namespace("fooNamespace",
registry=foo_registry.id,
project="default")
# create cr repository
foo_repository = volcengine.cr.Repository("fooRepository",
registry=foo_registry.id,
namespace=foo_namespace.name,
description="A test repository created by terraform.",
access_level="Public")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cr"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// create cr registry
fooRegistry, err := cr.NewRegistry(ctx, "fooRegistry", &cr.RegistryArgs{
DeleteImmediately: pulumi.Bool(false),
Password: pulumi.String("1qaz!QAZ"),
Project: pulumi.String("default"),
})
if err != nil {
return err
}
// create cr namespace
fooNamespace, err := cr.NewNamespace(ctx, "fooNamespace", &cr.NamespaceArgs{
Registry: fooRegistry.ID(),
Project: pulumi.String("default"),
})
if err != nil {
return err
}
// create cr repository
_, err = cr.NewRepository(ctx, "fooRepository", &cr.RepositoryArgs{
Registry: fooRegistry.ID(),
Namespace: fooNamespace.Name,
Description: pulumi.String("A test repository created by terraform."),
AccessLevel: pulumi.String("Public"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
// create cr registry
var fooRegistry = new Volcengine.Cr.Registry("fooRegistry", new()
{
DeleteImmediately = false,
Password = "1qaz!QAZ",
Project = "default",
});
// create cr namespace
var fooNamespace = new Volcengine.Cr.Namespace("fooNamespace", new()
{
Registry = fooRegistry.Id,
Project = "default",
});
// create cr repository
var fooRepository = new Volcengine.Cr.Repository("fooRepository", new()
{
Registry = fooRegistry.Id,
Namespace = fooNamespace.Name,
Description = "A test repository created by terraform.",
AccessLevel = "Public",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.cr.Registry;
import com.pulumi.volcengine.cr.RegistryArgs;
import com.pulumi.volcengine.cr.Namespace;
import com.pulumi.volcengine.cr.NamespaceArgs;
import com.pulumi.volcengine.cr.Repository;
import com.pulumi.volcengine.cr.RepositoryArgs;
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) {
// create cr registry
var fooRegistry = new Registry("fooRegistry", RegistryArgs.builder()
.deleteImmediately(false)
.password("1qaz!QAZ")
.project("default")
.build());
// create cr namespace
var fooNamespace = new Namespace("fooNamespace", NamespaceArgs.builder()
.registry(fooRegistry.id())
.project("default")
.build());
// create cr repository
var fooRepository = new Repository("fooRepository", RepositoryArgs.builder()
.registry(fooRegistry.id())
.namespace(fooNamespace.name())
.description("A test repository created by terraform.")
.accessLevel("Public")
.build());
}
}
resources:
# create cr registry
fooRegistry:
type: volcengine:cr:Registry
properties:
deleteImmediately: false
password: 1qaz!QAZ
project: default
# create cr namespace
fooNamespace:
type: volcengine:cr:Namespace
properties:
registry: ${fooRegistry.id}
project: default
# create cr repository
fooRepository:
type: volcengine:cr:Repository
properties:
registry: ${fooRegistry.id}
namespace: ${fooNamespace.name}
description: A test repository created by terraform.
accessLevel: Public
Create Registry Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Registry(name: string, args?: RegistryArgs, opts?: CustomResourceOptions);@overload
def Registry(resource_name: str,
args: Optional[RegistryArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Registry(resource_name: str,
opts: Optional[ResourceOptions] = None,
delete_immediately: Optional[bool] = None,
name: Optional[str] = None,
password: Optional[str] = None,
project: Optional[str] = None,
proxy_cache: Optional[RegistryProxyCacheArgs] = None,
proxy_cache_enabled: Optional[bool] = None,
resource_tags: Optional[Sequence[RegistryResourceTagArgs]] = None,
type: Optional[str] = None)func NewRegistry(ctx *Context, name string, args *RegistryArgs, opts ...ResourceOption) (*Registry, error)public Registry(string name, RegistryArgs? args = null, CustomResourceOptions? opts = null)
public Registry(String name, RegistryArgs args)
public Registry(String name, RegistryArgs args, CustomResourceOptions options)
type: volcengine:cr:Registry
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 RegistryArgs
- 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 RegistryArgs
- 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 RegistryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RegistryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RegistryArgs
- 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 registryResource = new Volcengine.Cr.Registry("registryResource", new()
{
DeleteImmediately = false,
Name = "string",
Password = "string",
Project = "string",
ProxyCache = new Volcengine.Cr.Inputs.RegistryProxyCacheArgs
{
Type = "string",
Endpoint = "string",
Password = "string",
SkipSslVerify = false,
Username = "string",
},
ProxyCacheEnabled = false,
ResourceTags = new[]
{
new Volcengine.Cr.Inputs.RegistryResourceTagArgs
{
Key = "string",
Value = "string",
},
},
Type = "string",
});
example, err := cr.NewRegistry(ctx, "registryResource", &cr.RegistryArgs{
DeleteImmediately: pulumi.Bool(false),
Name: pulumi.String("string"),
Password: pulumi.String("string"),
Project: pulumi.String("string"),
ProxyCache: &cr.RegistryProxyCacheArgs{
Type: pulumi.String("string"),
Endpoint: pulumi.String("string"),
Password: pulumi.String("string"),
SkipSslVerify: pulumi.Bool(false),
Username: pulumi.String("string"),
},
ProxyCacheEnabled: pulumi.Bool(false),
ResourceTags: cr.RegistryResourceTagArray{
&cr.RegistryResourceTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Type: pulumi.String("string"),
})
var registryResource = new Registry("registryResource", RegistryArgs.builder()
.deleteImmediately(false)
.name("string")
.password("string")
.project("string")
.proxyCache(RegistryProxyCacheArgs.builder()
.type("string")
.endpoint("string")
.password("string")
.skipSslVerify(false)
.username("string")
.build())
.proxyCacheEnabled(false)
.resourceTags(RegistryResourceTagArgs.builder()
.key("string")
.value("string")
.build())
.type("string")
.build());
registry_resource = volcengine.cr.Registry("registryResource",
delete_immediately=False,
name="string",
password="string",
project="string",
proxy_cache={
"type": "string",
"endpoint": "string",
"password": "string",
"skip_ssl_verify": False,
"username": "string",
},
proxy_cache_enabled=False,
resource_tags=[{
"key": "string",
"value": "string",
}],
type="string")
const registryResource = new volcengine.cr.Registry("registryResource", {
deleteImmediately: false,
name: "string",
password: "string",
project: "string",
proxyCache: {
type: "string",
endpoint: "string",
password: "string",
skipSslVerify: false,
username: "string",
},
proxyCacheEnabled: false,
resourceTags: [{
key: "string",
value: "string",
}],
type: "string",
});
type: volcengine:cr:Registry
properties:
deleteImmediately: false
name: string
password: string
project: string
proxyCache:
endpoint: string
password: string
skipSslVerify: false
type: string
username: string
proxyCacheEnabled: false
resourceTags:
- key: string
value: string
type: string
Registry 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 Registry resource accepts the following input properties:
- Delete
Immediately bool - Whether delete registry immediately. Only effected in delete action.
- Name string
- The name of registry.
- Password string
- The password of registry user.
- Project string
- The ProjectName of the cr registry.
- Proxy
Cache RegistryProxy Cache - The proxy cache of registry. This field is valid when proxy_cache_enabled is true.
- Proxy
Cache boolEnabled - Whether to enable proxy cache.
-
List<Registry
Resource Tag> - Tags.
- Type string
- The type of registry. Valid values:
Enterprise,Micro. Default isEnterprise.
- Delete
Immediately bool - Whether delete registry immediately. Only effected in delete action.
- Name string
- The name of registry.
- Password string
- The password of registry user.
- Project string
- The ProjectName of the cr registry.
- Proxy
Cache RegistryProxy Cache Args - The proxy cache of registry. This field is valid when proxy_cache_enabled is true.
- Proxy
Cache boolEnabled - Whether to enable proxy cache.
-
[]Registry
Resource Tag Args - Tags.
- Type string
- The type of registry. Valid values:
Enterprise,Micro. Default isEnterprise.
- delete
Immediately Boolean - Whether delete registry immediately. Only effected in delete action.
- name String
- The name of registry.
- password String
- The password of registry user.
- project String
- The ProjectName of the cr registry.
- proxy
Cache RegistryProxy Cache - The proxy cache of registry. This field is valid when proxy_cache_enabled is true.
- proxy
Cache BooleanEnabled - Whether to enable proxy cache.
-
List<Registry
Resource Tag> - Tags.
- type String
- The type of registry. Valid values:
Enterprise,Micro. Default isEnterprise.
- delete
Immediately boolean - Whether delete registry immediately. Only effected in delete action.
- name string
- The name of registry.
- password string
- The password of registry user.
- project string
- The ProjectName of the cr registry.
- proxy
Cache RegistryProxy Cache - The proxy cache of registry. This field is valid when proxy_cache_enabled is true.
- proxy
Cache booleanEnabled - Whether to enable proxy cache.
-
Registry
Resource Tag[] - Tags.
- type string
- The type of registry. Valid values:
Enterprise,Micro. Default isEnterprise.
- delete_
immediately bool - Whether delete registry immediately. Only effected in delete action.
- name str
- The name of registry.
- password str
- The password of registry user.
- project str
- The ProjectName of the cr registry.
- proxy_
cache RegistryProxy Cache Args - The proxy cache of registry. This field is valid when proxy_cache_enabled is true.
- proxy_
cache_ boolenabled - Whether to enable proxy cache.
-
Sequence[Registry
Resource Tag Args] - Tags.
- type str
- The type of registry. Valid values:
Enterprise,Micro. Default isEnterprise.
- delete
Immediately Boolean - Whether delete registry immediately. Only effected in delete action.
- name String
- The name of registry.
- password String
- The password of registry user.
- project String
- The ProjectName of the cr registry.
- proxy
Cache Property Map - The proxy cache of registry. This field is valid when proxy_cache_enabled is true.
- proxy
Cache BooleanEnabled - Whether to enable proxy cache.
- List<Property Map>
- Tags.
- type String
- The type of registry. Valid values:
Enterprise,Micro. Default isEnterprise.
Outputs
All input properties are implicitly available as output properties. Additionally, the Registry resource produces the following output properties:
- Charge
Type string - The charge type of registry.
- Create
Time string - The creation time of registry.
- Domains
List<Registry
Domain> - The domain of registry.
- Id string
- The provider-assigned unique ID for this managed resource.
- Statuses
List<Registry
Status> - The status of registry.
- User
Status string - The status of user.
- Username string
- The username of cr instance.
- Charge
Type string - The charge type of registry.
- Create
Time string - The creation time of registry.
- Domains
[]Registry
Domain - The domain of registry.
- Id string
- The provider-assigned unique ID for this managed resource.
- Statuses
[]Registry
Status - The status of registry.
- User
Status string - The status of user.
- Username string
- The username of cr instance.
- charge
Type String - The charge type of registry.
- create
Time String - The creation time of registry.
- domains
List<Registry
Domain> - The domain of registry.
- id String
- The provider-assigned unique ID for this managed resource.
- statuses
List<Registry
Status> - The status of registry.
- user
Status String - The status of user.
- username String
- The username of cr instance.
- charge
Type string - The charge type of registry.
- create
Time string - The creation time of registry.
- domains
Registry
Domain[] - The domain of registry.
- id string
- The provider-assigned unique ID for this managed resource.
- statuses
Registry
Status[] - The status of registry.
- user
Status string - The status of user.
- username string
- The username of cr instance.
- charge_
type str - The charge type of registry.
- create_
time str - The creation time of registry.
- domains
Sequence[Registry
Domain] - The domain of registry.
- id str
- The provider-assigned unique ID for this managed resource.
- statuses
Sequence[Registry
Status] - The status of registry.
- user_
status str - The status of user.
- username str
- The username of cr instance.
- charge
Type String - The charge type of registry.
- create
Time String - The creation time of registry.
- domains List<Property Map>
- The domain of registry.
- id String
- The provider-assigned unique ID for this managed resource.
- statuses List<Property Map>
- The status of registry.
- user
Status String - The status of user.
- username String
- The username of cr instance.
Look up Existing Registry Resource
Get an existing Registry 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?: RegistryState, opts?: CustomResourceOptions): Registry@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
charge_type: Optional[str] = None,
create_time: Optional[str] = None,
delete_immediately: Optional[bool] = None,
domains: Optional[Sequence[RegistryDomainArgs]] = None,
name: Optional[str] = None,
password: Optional[str] = None,
project: Optional[str] = None,
proxy_cache: Optional[RegistryProxyCacheArgs] = None,
proxy_cache_enabled: Optional[bool] = None,
resource_tags: Optional[Sequence[RegistryResourceTagArgs]] = None,
statuses: Optional[Sequence[RegistryStatusArgs]] = None,
type: Optional[str] = None,
user_status: Optional[str] = None,
username: Optional[str] = None) -> Registryfunc GetRegistry(ctx *Context, name string, id IDInput, state *RegistryState, opts ...ResourceOption) (*Registry, error)public static Registry Get(string name, Input<string> id, RegistryState? state, CustomResourceOptions? opts = null)public static Registry get(String name, Output<String> id, RegistryState state, CustomResourceOptions options)resources: _: type: volcengine:cr:Registry 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.
- Charge
Type string - The charge type of registry.
- Create
Time string - The creation time of registry.
- Delete
Immediately bool - Whether delete registry immediately. Only effected in delete action.
- Domains
List<Registry
Domain> - The domain of registry.
- Name string
- The name of registry.
- Password string
- The password of registry user.
- Project string
- The ProjectName of the cr registry.
- Proxy
Cache RegistryProxy Cache - The proxy cache of registry. This field is valid when proxy_cache_enabled is true.
- Proxy
Cache boolEnabled - Whether to enable proxy cache.
-
List<Registry
Resource Tag> - Tags.
- Statuses
List<Registry
Status> - The status of registry.
- Type string
- The type of registry. Valid values:
Enterprise,Micro. Default isEnterprise. - User
Status string - The status of user.
- Username string
- The username of cr instance.
- Charge
Type string - The charge type of registry.
- Create
Time string - The creation time of registry.
- Delete
Immediately bool - Whether delete registry immediately. Only effected in delete action.
- Domains
[]Registry
Domain Args - The domain of registry.
- Name string
- The name of registry.
- Password string
- The password of registry user.
- Project string
- The ProjectName of the cr registry.
- Proxy
Cache RegistryProxy Cache Args - The proxy cache of registry. This field is valid when proxy_cache_enabled is true.
- Proxy
Cache boolEnabled - Whether to enable proxy cache.
-
[]Registry
Resource Tag Args - Tags.
- Statuses
[]Registry
Status Args - The status of registry.
- Type string
- The type of registry. Valid values:
Enterprise,Micro. Default isEnterprise. - User
Status string - The status of user.
- Username string
- The username of cr instance.
- charge
Type String - The charge type of registry.
- create
Time String - The creation time of registry.
- delete
Immediately Boolean - Whether delete registry immediately. Only effected in delete action.
- domains
List<Registry
Domain> - The domain of registry.
- name String
- The name of registry.
- password String
- The password of registry user.
- project String
- The ProjectName of the cr registry.
- proxy
Cache RegistryProxy Cache - The proxy cache of registry. This field is valid when proxy_cache_enabled is true.
- proxy
Cache BooleanEnabled - Whether to enable proxy cache.
-
List<Registry
Resource Tag> - Tags.
- statuses
List<Registry
Status> - The status of registry.
- type String
- The type of registry. Valid values:
Enterprise,Micro. Default isEnterprise. - user
Status String - The status of user.
- username String
- The username of cr instance.
- charge
Type string - The charge type of registry.
- create
Time string - The creation time of registry.
- delete
Immediately boolean - Whether delete registry immediately. Only effected in delete action.
- domains
Registry
Domain[] - The domain of registry.
- name string
- The name of registry.
- password string
- The password of registry user.
- project string
- The ProjectName of the cr registry.
- proxy
Cache RegistryProxy Cache - The proxy cache of registry. This field is valid when proxy_cache_enabled is true.
- proxy
Cache booleanEnabled - Whether to enable proxy cache.
-
Registry
Resource Tag[] - Tags.
- statuses
Registry
Status[] - The status of registry.
- type string
- The type of registry. Valid values:
Enterprise,Micro. Default isEnterprise. - user
Status string - The status of user.
- username string
- The username of cr instance.
- charge_
type str - The charge type of registry.
- create_
time str - The creation time of registry.
- delete_
immediately bool - Whether delete registry immediately. Only effected in delete action.
- domains
Sequence[Registry
Domain Args] - The domain of registry.
- name str
- The name of registry.
- password str
- The password of registry user.
- project str
- The ProjectName of the cr registry.
- proxy_
cache RegistryProxy Cache Args - The proxy cache of registry. This field is valid when proxy_cache_enabled is true.
- proxy_
cache_ boolenabled - Whether to enable proxy cache.
-
Sequence[Registry
Resource Tag Args] - Tags.
- statuses
Sequence[Registry
Status Args] - The status of registry.
- type str
- The type of registry. Valid values:
Enterprise,Micro. Default isEnterprise. - user_
status str - The status of user.
- username str
- The username of cr instance.
- charge
Type String - The charge type of registry.
- create
Time String - The creation time of registry.
- delete
Immediately Boolean - Whether delete registry immediately. Only effected in delete action.
- domains List<Property Map>
- The domain of registry.
- name String
- The name of registry.
- password String
- The password of registry user.
- project String
- The ProjectName of the cr registry.
- proxy
Cache Property Map - The proxy cache of registry. This field is valid when proxy_cache_enabled is true.
- proxy
Cache BooleanEnabled - Whether to enable proxy cache.
- List<Property Map>
- Tags.
- statuses List<Property Map>
- The status of registry.
- type String
- The type of registry. Valid values:
Enterprise,Micro. Default isEnterprise. - user
Status String - The status of user.
- username String
- The username of cr instance.
Supporting Types
RegistryDomain, RegistryDomainArgs
RegistryProxyCache, RegistryProxyCacheArgs
- Type string
- The type of proxy cache. Valid values:
DockerHub,DockerRegistry. - Endpoint string
- The endpoint of proxy cache.
- Password string
- The password of proxy cache.
- Skip
Ssl boolVerify - Whether to skip ssl verify.
- Username string
- The username of proxy cache.
- Type string
- The type of proxy cache. Valid values:
DockerHub,DockerRegistry. - Endpoint string
- The endpoint of proxy cache.
- Password string
- The password of proxy cache.
- Skip
Ssl boolVerify - Whether to skip ssl verify.
- Username string
- The username of proxy cache.
- type String
- The type of proxy cache. Valid values:
DockerHub,DockerRegistry. - endpoint String
- The endpoint of proxy cache.
- password String
- The password of proxy cache.
- skip
Ssl BooleanVerify - Whether to skip ssl verify.
- username String
- The username of proxy cache.
- type string
- The type of proxy cache. Valid values:
DockerHub,DockerRegistry. - endpoint string
- The endpoint of proxy cache.
- password string
- The password of proxy cache.
- skip
Ssl booleanVerify - Whether to skip ssl verify.
- username string
- The username of proxy cache.
- type str
- The type of proxy cache. Valid values:
DockerHub,DockerRegistry. - endpoint str
- The endpoint of proxy cache.
- password str
- The password of proxy cache.
- skip_
ssl_ boolverify - Whether to skip ssl verify.
- username str
- The username of proxy cache.
- type String
- The type of proxy cache. Valid values:
DockerHub,DockerRegistry. - endpoint String
- The endpoint of proxy cache.
- password String
- The password of proxy cache.
- skip
Ssl BooleanVerify - Whether to skip ssl verify.
- username String
- The username of proxy cache.
RegistryResourceTag, RegistryResourceTagArgs
RegistryStatus, RegistryStatusArgs
- Conditions List<string>
- The condition of registry.
- Phase string
- The phase status of registry.
- Conditions []string
- The condition of registry.
- Phase string
- The phase status of registry.
- conditions List<String>
- The condition of registry.
- phase String
- The phase status of registry.
- conditions string[]
- The condition of registry.
- phase string
- The phase status of registry.
- conditions Sequence[str]
- The condition of registry.
- phase str
- The phase status of registry.
- conditions List<String>
- The condition of registry.
- phase String
- The phase status of registry.
Import
CR Registry can be imported using the name, e.g.
$ pulumi import volcengine:cr/registry:Registry default enterprise-x
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
