harbor.Registry
Explore with Pulumi AI
Example Usage
resource "harbor_registry" "main" {
provider_name = "docker-hub"
name = "test_docker_harbor"
endpoint_url = "https://hub.docker.com"
}
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: RegistryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Registry(resource_name: str,
opts: Optional[ResourceOptions] = None,
endpoint_url: Optional[str] = None,
provider_name: Optional[str] = None,
access_id: Optional[str] = None,
access_secret: Optional[str] = None,
description: Optional[str] = None,
insecure: Optional[bool] = None,
name: Optional[str] = None)
func NewRegistry(ctx *Context, name string, args RegistryArgs, opts ...ResourceOption) (*Registry, error)
public Registry(string name, RegistryArgs args, CustomResourceOptions? opts = null)
public Registry(String name, RegistryArgs args)
public Registry(String name, RegistryArgs args, CustomResourceOptions options)
type: harbor: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.
Example
The following reference example uses placeholder values for all input properties.
var registryResource = new Harbor.Registry("registryResource", new()
{
EndpointUrl = "string",
ProviderName = "string",
AccessId = "string",
AccessSecret = "string",
Description = "string",
Insecure = false,
Name = "string",
});
example, err := harbor.NewRegistry(ctx, "registryResource", &harbor.RegistryArgs{
EndpointUrl: pulumi.String("string"),
ProviderName: pulumi.String("string"),
AccessId: pulumi.String("string"),
AccessSecret: pulumi.String("string"),
Description: pulumi.String("string"),
Insecure: pulumi.Bool(false),
Name: pulumi.String("string"),
})
var registryResource = new Registry("registryResource", RegistryArgs.builder()
.endpointUrl("string")
.providerName("string")
.accessId("string")
.accessSecret("string")
.description("string")
.insecure(false)
.name("string")
.build());
registry_resource = harbor.Registry("registryResource",
endpoint_url="string",
provider_name="string",
access_id="string",
access_secret="string",
description="string",
insecure=False,
name="string")
const registryResource = new harbor.Registry("registryResource", {
endpointUrl: "string",
providerName: "string",
accessId: "string",
accessSecret: "string",
description: "string",
insecure: false,
name: "string",
});
type: harbor:Registry
properties:
accessId: string
accessSecret: string
description: string
endpointUrl: string
insecure: false
name: string
providerName: 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
The Registry resource accepts the following input properties:
- Endpoint
Url string - Provider
Name string - Access
Id string - Access
Secret string - Description string
- Insecure bool
- Name string
- Endpoint
Url string - Provider
Name string - Access
Id string - Access
Secret string - Description string
- Insecure bool
- Name string
- endpoint
Url String - provider
Name String - access
Id String - access
Secret String - description String
- insecure Boolean
- name String
- endpoint
Url string - provider
Name string - access
Id string - access
Secret string - description string
- insecure boolean
- name string
- endpoint_
url str - provider_
name str - access_
id str - access_
secret str - description str
- insecure bool
- name str
- endpoint
Url String - provider
Name String - access
Id String - access
Secret String - description String
- insecure Boolean
- name String
Outputs
All input properties are implicitly available as output properties. Additionally, the Registry resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Registry
Id int - Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Registry
Id int - Status string
- id String
- The provider-assigned unique ID for this managed resource.
- registry
Id Integer - status String
- id string
- The provider-assigned unique ID for this managed resource.
- registry
Id number - status string
- id str
- The provider-assigned unique ID for this managed resource.
- registry_
id int - status str
- id String
- The provider-assigned unique ID for this managed resource.
- registry
Id Number - status String
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,
access_id: Optional[str] = None,
access_secret: Optional[str] = None,
description: Optional[str] = None,
endpoint_url: Optional[str] = None,
insecure: Optional[bool] = None,
name: Optional[str] = None,
provider_name: Optional[str] = None,
registry_id: Optional[int] = None,
status: Optional[str] = None) -> Registry
func 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)
Resource lookup is not supported in YAML
- 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.
- Access
Id string - Access
Secret string - Description string
- Endpoint
Url string - Insecure bool
- Name string
- Provider
Name string - Registry
Id int - Status string
- Access
Id string - Access
Secret string - Description string
- Endpoint
Url string - Insecure bool
- Name string
- Provider
Name string - Registry
Id int - Status string
- access
Id String - access
Secret String - description String
- endpoint
Url String - insecure Boolean
- name String
- provider
Name String - registry
Id Integer - status String
- access
Id string - access
Secret string - description string
- endpoint
Url string - insecure boolean
- name string
- provider
Name string - registry
Id number - status string
- access_
id str - access_
secret str - description str
- endpoint_
url str - insecure bool
- name str
- provider_
name str - registry_
id int - status str
- access
Id String - access
Secret String - description String
- endpoint
Url String - insecure Boolean
- name String
- provider
Name String - registry
Id Number - status String
Import
Harbor project can be imported using the registry id
eg,<break><break> ```sh<break> $ pulumi import harbor:index/registry:Registry main /registries/7 <break>```<break><break>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harbor pulumiverse/pulumi-harbor
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harbor
Terraform Provider.