Skip to content

Commit f50ec76

Browse files
Merge pull request #139 from cloudsmith-io/chore-fix-typo-entitlement_control
chore(Update entitlement_control.md)
2 parents 562b47f + fcfba06 commit f50ec76

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

docs/resources/entitlement_control.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ See [help.cloudsmith.io](https://help.cloudsmith.io/docs/entitlements) for full
99

1010
## Example Usage
1111

12+
> **Note:** Ensure `entitlement_tokens` array is returning entitlement tokens (and not an empty array) before using the control resource. By default the example should work, but if there were any changes made to repo settings, the expected behaviour might be different.
1213
1314
Disable repository "Default" entitlement token:
1415

@@ -38,7 +39,7 @@ data "cloudsmith_entitlement_list" "my_tokens" {
3839
resource "cloudsmith_entitlement_control" "my_entitlement_control" {
3940
namespace = resource.cloudsmith_repository.my_repository.namespace
4041
repository = resource.cloudsmith_repository.my_repository.slug_perm
41-
identifier = data.cloudsmith_entitlement_list.my_tokens.tokens[0].slug_perm
42+
identifier = data.cloudsmith_entitlement_list.my_tokens.entitlement_tokens[0].slug_perm
4243
enabled = false
4344
}
4445
```

docs/resources/repository_upstream.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,36 @@ resource "cloudsmith_repository_upstream" "enpass" {
8181

8282
### Docker
8383

84+
> **Note:** Dockerhub requires username and password authentication or the creation of resource will fail.
85+
8486
```hcl
8587
resource "cloudsmith_repository_upstream" "docker_hub" {
8688
name = "Docker Hub"
89+
auth_mode = "Username and Password"
90+
auth_username = "my-username"
91+
auth_password = "my-password"
8792
namespace = "${data.cloudsmith_organization.my_organization.slug_perm}"
8893
repository = "${resource.cloudsmith_repository.my_repository.slug_perm}"
8994
upstream_type = "docker"
9095
upstream_url = "https://index.docker.io"
9196
}
9297
```
9398

99+
> **Note:** Certificate and Key authentication is only supported for Docker, we recommend using a unique filename for the certificate and key files to avoid conflicts.
100+
101+
```hcl
102+
resource "cloudsmith_repository_upstream" "other_docker_upstream" {
103+
name = "Other Docker Upstream"
104+
namespace = "${data.cloudsmith_organization.my_organization.slug_perm}"
105+
repository = "${resource.cloudsmith_repository.my_repository.slug_perm}"
106+
upstream_type = "docker"
107+
upstream_url = "https://other.docker.io"
108+
auth_mode = "Certificate and Key"
109+
auth_certificate = "/path/to/certificate_date.crt"
110+
auth_certificate_key = "/path/to/certificate_date.key"
111+
}
112+
```
113+
94114
### Helm
95115

96116
```hcl

0 commit comments

Comments
 (0)