Skip to content

cloud-labs-infra/terraform-huaweicloud-swr

Repository files navigation

Huawei Cloud Software Repository for Container (SWR)

Requirements

Name Version
terraform ~> 1.7
huaweicloud ~> 1.63

Providers

Name Version
huaweicloud ~> 1.63

Modules

No modules.

Resources

Name Type
huaweicloud_swr_image_retention_policy.main resource
huaweicloud_swr_organization.main resource
huaweicloud_swr_organization_permissions.main resource
huaweicloud_swr_repository.main resource

Inputs

Name Description Type Default Required
organization_name Specifies the name of the organization (namespace) the repository belongs string n/a yes
permissions Specifies the repository name and parameters"
* user_id - IAM User ID;
* user_name - IAM User name;
* permission -the values can be Manage, Write and Read.
set(object({
user_id = string
user_name = optional(string, null)
permission = optional(string, "Read")
}))
[] no
region Specifies the region in which to create the resource, if omitted, the provider-level region will be used string null no
repositories Specifies the repository name and parameters"
* description - specifies the description of the repository;
* is_public - specifies whether the repository is public;
* category - the value can be app_server, linux, framework_app, database, lang, other, windows, arm.
map(object({
description = optional(string, null)
is_public = optional(bool, false)
category = optional(string, "other")
}))
{} no
retention_policy Is retention policy enabled? bool false no
retention_policy_number Specifies the number of retention:

* If type is set to 'date_rule', it represents the number of retention days;
* If type is set to 'tag_rule', it represents the retention number.
number 50 no
retention_policy_type Specifies the retention policy type string "tag_rule" no

Outputs

Name Description
creator The creator user name of the organization
id ID of the organization
login_server The URL that can be used to log into the container registry