Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registry doc updates #2821

Merged
merged 3 commits into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions website/docs/d/cr_namespaces.html.markdown
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
---
subcategory: "Container Registry"
layout: "ibm"
page_title: "IBM: cr_namespaces"
page_title: "IBM: ibm_cr_namespaces"
description: |-
Reads IBM Container Registry namespaces.
Reads IBM Cloud Container Registry namespaces.
---

# ibm_cr_namespaces
Lists an IBM Cloud Container Registry namespaces of an account in the targeted region.. For more information, about container registry, see [about IBM Cloud Container Registry](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_overview).

Lists all IBM Cloud Container Registry namespaces in your account in the targeted region. For more information about Container Registry, see [About IBM Cloud Container Registry](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_overview).

## Example usage
The following example shows how to configure a `namespace`.

The following example retrieves namespaces for your account in the targeted region.

```terraform
data "ibm_cr_namespaces" "test" {}

```

## Argument reference
The input parameters are not supported for this data source.

Input parameters are not supported for this data source.

## Attribute reference

Review the attribute references that are exported.

- `id` - (String) The unique identifier of the namespace datasource.
- `namespaces` - (List) List of namespaces available in the account.
- `id` - (String) The unique identifier of the ibm_cr_namespaces datasource.
- `namespaces` - (List) List of namespaces that are available in the account.

Nested scheme for `namespace`:
- `account` - (String) The IBM Cloud account that owns the namespace.
- `crn` - (String) The `CRN` of the namespace. If the namespace has been assigned to a resource group.
- `created_date` - (Timestamp) The created time of the namespace.
- `name` - (String) The name of the namespace to create.
- `resource_group_id` - (String) ID of the resource group to which the namespace is assigned.
- `resource_created_date` - (Timestamp) When the namespace was assigned to a resource group.
- `updated_date` - (Timestamp) The updated time of the namespace.
- `crn` - (String) If the namespace is assigned to a resource group, the IBM Cloud CRN representing the namespace.
- `created_date` - (Timestamp) The creation date of the namespace.
- `name` - (String) The name of the namespace.
- `resource_group_id` - (String) The ID of the resource group to which the namespace is assigned.
- `resource_created_date` - (Timestamp) The date that the namespace was assigned to a resource group.
- `updated_date` - (Timestamp) The date that the namespace was last updated.
38 changes: 21 additions & 17 deletions website/docs/r/cr_namespace.html.markdown
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
---
subcategory: "Container Registry"
layout: "ibm"
page_title: "IBM : ibm_cr_namespace"
description: |-
Manages Container Registry namespace.

Manages IBM Cloud Container Registry namespaces
subcategory: "Container Registry"
---

# ibm_cr_namespace
Create, update, or delete a container registry namespace. For more information, about container registry, see [About IBM Cloud Container Registry](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_overview).

## Example usage
Create or delete a Container Registry namespace. For more information about Container Registry, see [About IBM Cloud Container Registry](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_overview).

## Example Usage

The following example shows how you can configure a `namespace`.

```terraform
Expand All @@ -27,26 +28,29 @@ resource "ibm_cr_namespace" "rg_namespace" {
}
```

## Argument reference
## Argument Reference

The following arguments are supported:

Review the argument references that you can specify for your resource.
- `name` - (Required, Forces new resource, string) The name of the namespace that you want to create.
- Constraints: The maximum length is `30` characters. The minimum length is `4` characters. The value must match regular expression `/^[a-z0-9]+[a-z0-9_-]+[a-z0-9]+$/`
- `resource_group_id` - (Optional, Forces new resource, string) The ID of the resource group to which you want to add the namespace. If you don't set this option, the default resource group for the account is used.
- `tags` - (Optional, array of strings) The tags that are associated with the `ibm_cr_namespace`. **Note*- `Tags` are managed locally and not stored on the IBM Cloud service endpoint.

- `name` - (Required, Forces new resource, String) The name of the namespaces to create.
- `resource_group_id` - (Optional, Forces new resource, String) The ID of the resource group to which the namespace is assigned. If not provided, default resource group ID will be assigned.
- `tags` - (Optional, Array of Strings) Tags associated with the `ibm_cr_namespace`. **Note*- `Tags` are managed locally and not stored on the IBM Cloud service endpoint.
## Attribute Reference

## Attribute reference
In addition to all argument reference list, you can access the following attribute reference after your resource is created.
In addition to the attributes in the argument reference list, you can access the following attribute reference after your resource is created.

- `id` - (String) The unique identifier of the `ibm_cr_namespace`.
- `id` - (String) The unique identifier of the namespace. This identifier is the same as the name of namespace.
- `account` - (String) The IBM Cloud account that owns the namespace.
- `created_date` - (Timestamp) The creation date of the namespace.
- `crn` - (String) If the namespace has been assigned to a resource group, the IBM Cloud CRN represent the namespace.
- `resource_created_date` - (Timestamp) The namespace assigned date to a resource group.
- `updated_date` - (Timestamp) The last updated of the namespace.
- `crn` - (String) If the namespace is assigned to a resource group, the IBM Cloud CRN representing the namespace.
- `resource_created_date` - (Timestamp) The date that the namespace was assigned to a resource group.
- `updated_date` - (Timestamp) The date that the namespace was last updated.

## Import
The `ibm_cr_namespace` resource can be imported by using the `name` of the namespace.

You can import the `ibm_cr_namespace` resource by using the `name` of the namespace.

**Syntax**

Expand Down
18 changes: 9 additions & 9 deletions website/docs/r/cr_retention_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
layout: "ibm"
page_title: "IBM : ibm_cr_retention_policy"
description: |-
Manages ibm_cr_retention_policy.
Manages retention policies in IBM Cloud Container Registry.
subcategory: "Container Registry"
---

# ibm\_cr_retention_policy
# ibm_cr_retention_policy

Provides a resource for ibm_cr_retention_policy. This allows retention policy to be created, updated and deleted.
Provides a resource for ibm_cr_retention_policy. You can use this resource to create, update, and delete a retention policy.

## Example Usage

Expand All @@ -24,19 +24,19 @@ resource "ibm_cr_retention_policy" "cr_retention_policy" {

The following arguments are supported:

* `namespace` - (Required, string) The namespace to which the retention policy is attached.
* `images_per_repo` - (Required, int) Determines how many images will be retained for each repository when the retention policy is executed. The value -1 denotes 'Unlimited' (all images are retained).
* `retain_untagged` - (Optional, bool) Determines if untagged images are retained when executing the retention policy. This is false by default meaning untagged images will be deleted when the policy is executed.
- `namespace` - (Required, string) The namespace to which the retention policy is attached.
- `images_per_repo` - (Required, int) Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained).
- `retain_untagged` - (Optional, bool) Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that untagged images can be deleted when the policy runs.

## Attribute Reference

In addition to all arguments above, the following attributes are exported:
In addition to the arguments in the Argument Reference section, the following attributes are exported:

* `id` - The unique identifier of the ibm_cr_retention_policy.
- `id` - The unique identifier of the cr_retention_policy. This identifier is the same as the name of namespace to which the retention policy is attached.

## Import

You can import the `ibm_cr_retention_policy` resource by using `namespace`. The namespace to which the retention policy is attached.
You can import the `ibm_cr_retention_policy` resource by adding the `namespace` option, where `namespace` is the namespace to which the retention policy is attached.

```
$ terraform import ibm_cr_retention_policy.cr_retention_policy <namespace>
Expand Down