You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-1Lines changed: 43 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This project is used to manage Docker resources (such as repositories, teams, or
12
12
13
13
## Usage
14
14
15
-
Below is a basic example of how to use the Docker services Terraform provider to create a Docker repository. Using `DOCKER_USERNAME` and `DOCKER_PASSWORD` as an environment variable, you can use the following code:
15
+
Below is a basic example of how to use the Docker services Terraform provider to create a Docker repository.
If you'd like to use a different account for running the provider,
53
+
you can set credentials in the environment:
54
+
55
+
```
56
+
export DOCKER_USERNAME=my-username
57
+
export DOCKER_PASSWORD=my-secret-token
58
+
terraform plan ...
59
+
```
60
+
61
+
### Credential types
62
+
63
+
You can create a personal access token (PAT) to use as an alternative to your
64
+
password for Docker CLI authentication.
65
+
66
+
A "Read, Write, & Delete" PAT can be used to create, edit, and
67
+
manage permissions for Docker Hub repositories.
68
+
69
+
The advantage of PATs is that they have [many security
70
+
benefits](https://docs.docker.com/security/for-developers/access-tokens/) over
71
+
passwords.
72
+
73
+
Unfortunately, PATs are limited to managing repositories. If you'd like to use
74
+
this provider to manage organizations and teams, you will need to authenticate
75
+
with a password.
76
+
77
+
36
78
## Contributing
37
79
38
80
We welcome contributions to the Docker services Terraform provider, detailed documentation for contributing & building the provider can be found [here](https://github.com/docker/terraform-provider-docker/blob/main/CONTRIBUTING.md)
0 commit comments