You can use this module to provision and configure an IBM Container Registry namespace and optionally, a container registry retention policy.
module "namespace" {
source = "terraform-ibm-modules/container-registry/ibm"
version = "X.X.X" # Replace "X.X.X" with a release version to lock into a specific release
name = "my-namespace"
resource_group_id = "xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX"
images_per_repo = 2
}
- Account Management
- IBM Cloud Container Registry service
Writer
,Manager
service access
- IBM Cloud Container Registry service
Access roles for using Container Registry
Name | Version |
---|---|
terraform | >= 1.3.0 |
ibm | >= 1.49.0, < 2.0.0 |
No modules.
Name | Type |
---|---|
ibm_cr_namespace.cr_namespace | resource |
ibm_cr_retention_policy.cr_retention_policy | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
images_per_repo | (Optional, Integer) Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes Unlimited (all images are retained). The value 0 denotes no retention policy will be created (default) | number |
0 |
no |
name | Name of the container registry namespace | string |
n/a | yes |
resource_group_id | The resource group ID where the IBM container namespace will be created. | string |
n/a | yes |
retain_untagged | (Optional, Bool) Determines whether untagged images are retained when the retention policy is processed. Default value is false, means untagged images can be deleted when the policy runs. | bool |
false |
no |
tags | Optional list of tags to be added to the IBM container namespace. | list(string) |
[] |
no |
Name | Description |
---|---|
namespace_crn | CRN representing the namespace |
You can report issues and request features for this module in GitHub issues in the module repo. See Report an issue or request a feature.
To set up your local development environment, see Local development setup in the project documentation.