Skip to content

Commit

Permalink
rename: dockerhub -> docker
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Santos <[email protected]>
  • Loading branch information
nicks committed Aug 21, 2024
1 parent 586b06a commit 87c3519
Show file tree
Hide file tree
Showing 32 changed files with 295 additions and 246 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@ default: testacc
.PHONY: testacc
testacc:
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m

.PHONY: install
install:
go install .

.PHONY: docs
docs:
go generate ./...

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ You will need to create a `.terraformrc` in your `$HOME` directory
provider_installation {
dev_overrides {
# replace this path with your $(go env GOBIN) path
"registry.terraform.io/docker/dockerhub" = "<enter your $(go env GOBIN) path here>"
"registry.terraform.io/docker/docker" = "<enter your $(go env GOBIN) path here>"
}
direct {}
Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/access_token.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dockerhub_access_token Data Source - dockerhub"
page_title: "docker_access_token Data Source - docker"
subcategory: ""
description: |-
Docker Hub Access Token
---

# dockerhub_access_token (Data Source)
# docker_access_token (Data Source)

Docker Hub Access Token

Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/access_tokens.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dockerhub_access_tokens Data Source - dockerhub"
page_title: "docker_access_tokens Data Source - docker"
subcategory: ""
description: |-
Docker Hub Access Token
---

# dockerhub_access_tokens (Data Source)
# docker_access_tokens (Data Source)

Docker Hub Access Token

Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/org.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dockerhub_org Data Source - dockerhub"
page_title: "docker_org Data Source - docker"
subcategory: ""
description: |-
Docker Hub Organization
---

# dockerhub_org (Data Source)
# docker_org (Data Source)

Docker Hub Organization

Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/org_team_member.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dockerhub_org_team_member Data Source - dockerhub"
page_title: "docker_org_team_member Data Source - docker"
subcategory: ""
description: |-
Docker Hub Organization Team Member Data Source
---

# dockerhub_org_team_member (Data Source)
# docker_org_team_member (Data Source)

Docker Hub Organization Team Member Data Source

Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/repositories.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dockerhub_repositories Data Source - dockerhub"
page_title: "docker_repositories Data Source - docker"
subcategory: ""
description: |-
Docker Hub Repositories
---

# dockerhub_repositories (Data Source)
# docker_repositories (Data Source)

Docker Hub Repositories

Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/repository.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dockerhub_repository Data Source - dockerhub"
page_title: "docker_repository Data Source - docker"
subcategory: ""
description: |-
---

# dockerhub_repository (Data Source)
# docker_repository (Data Source)



Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dockerhub Provider"
page_title: "docker Provider"
subcategory: ""
description: |-
---

# dockerhub Provider
# docker Provider



Expand Down
4 changes: 2 additions & 2 deletions docs/resources/access_token.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dockerhub_access_token Resource - dockerhub"
page_title: "docker_access_token Resource - docker"
subcategory: ""
description: |-
Manages access tokens.
---

# dockerhub_access_token (Resource)
# docker_access_token (Resource)

Manages access tokens.

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/org_setting_image_access_management.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dockerhub_org_setting_image_access_management Resource - dockerhub"
page_title: "docker_org_setting_image_access_management Resource - docker"
subcategory: ""
description: |-
Manages the Image Access Management settings for an organization.
---

# dockerhub_org_setting_image_access_management (Resource)
# docker_org_setting_image_access_management (Resource)

Manages the Image Access Management settings for an organization.

Expand Down
40 changes: 40 additions & 0 deletions docs/resources/org_setting_registry_access_management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "docker_org_setting_registry_access_management Resource - docker"
subcategory: ""
description: |-
Manages the Registry Access Management settings for an organization.
---

# docker_org_setting_registry_access_management (Resource)

Manages the Registry Access Management settings for an organization.



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `custom_registries` (Attributes Set) Configuration of custom registries⁠ (see [below for nested schema](#nestedatt--custom_registries))
- `enabled` (Boolean) Whether or not Registry Access Management is enabled. When this feature is enabled, only registrys created by your organization or by Docker Official Registrys and Docker Verified Publishers are allowed. All community registrys are restricted.
- `org_name` (String) Organization name
- `standard_registry_docker_hub` (Attributes) Configuration of Docker hub standard registry.⁠ (see [below for nested schema](#nestedatt--standard_registry_docker_hub))

<a id="nestedatt--custom_registries"></a>
### Nested Schema for `custom_registries`

Required:

- `address` (String) The address of the registry.
- `allowed` (Boolean) Whether or not to allow the registry.
- `friendly_name` (String) The friendly name of the registry.


<a id="nestedatt--standard_registry_docker_hub"></a>
### Nested Schema for `standard_registry_docker_hub`

Required:

- `allowed` (Boolean) Whether or not to allow the standard registry.
4 changes: 2 additions & 2 deletions docs/resources/org_team.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dockerhub_org_team Resource - dockerhub"
page_title: "docker_org_team Resource - docker"
subcategory: ""
description: |-
Manages Docker teams for an organization.
---

# dockerhub_org_team (Resource)
# docker_org_team (Resource)

Manages Docker teams for an organization.

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/org_team_member_association.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dockerhub_org_team_member_association Resource - dockerhub"
page_title: "docker_org_team_member_association Resource - docker"
subcategory: ""
description: |-
Manages Docker team member associations for an organization.
---

# dockerhub_org_team_member_association (Resource)
# docker_org_team_member_association (Resource)

Manages Docker team member associations for an organization.

Expand Down
6 changes: 3 additions & 3 deletions docs/resources/repository.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dockerhub_repository Resource - dockerhub"
page_title: "docker_repository Resource - docker"
subcategory: ""
description: |-
---

# dockerhub_repository (Resource)
# docker_repository (Resource)



Expand All @@ -23,7 +23,7 @@ description: |-
### Optional

- `description` (String) Repository description
- `full_description` (String) Repository name
- `full_description` (String) Repository full description
- `private` (Boolean) Is the repository private

### Read-Only
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/repository_team_permission.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dockerhub_repository_team_permission Resource - dockerhub"
page_title: "docker_repository_team_permission Resource - docker"
subcategory: ""
description: |-
Manages the permissions for a team and repository.
---

# dockerhub_repository_team_permission (Resource)
# docker_repository_team_permission (Resource)

Manages the permissions for a team and repository.

Expand Down
28 changes: 14 additions & 14 deletions examples/load-test/main.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
terraform {
required_providers {
dockerhub = {
source = "docker/dockerhub"
docker = {
source = "docker/docker"
version = "~>1.0"
}
}

required_version = "~>1.9"
}

provider "dockerhub" {
provider "docker" {
host = "https://hub-stage.docker.com/v2"
}

Expand All @@ -35,23 +35,23 @@ variable "token_labels" {
}

# Create 200 teams with variations
resource "dockerhub_org_team" "terraform_team" {
count = 200
org_name = "dockerterraform"
team_name = format("tfteam%03d", count.index + 1) # Ensures the team name is within limits
resource "docker_org_team" "terraform_team" {
count = 200
org_name = "dockerterraform"
team_name = format("tfteam%03d", count.index + 1) # Ensures the team name is within limits
team_description = format("Terraform Hackathon Demo - 2024 - Variation %03d", count.index + 1)
}

# Team associations with variations
resource "dockerhub_org_team_member_association" "example_association" {
resource "docker_org_team_member_association" "example_association" {
count = 200
org_name = "dockerterraform"
team_name = dockerhub_org_team.terraform_team[count.index].team_name
team_name = docker_org_team.terraform_team[count.index].team_name
user_names = var.user_names
}

# Create 200 repositories with variations
resource "dockerhub_repository" "org_repo" {
resource "docker_repository" "org_repo" {
count = 200
namespace = "dockerterraform"
name = format("%s-%03d", element(var.repo_names, 0), count.index + 1)
Expand All @@ -60,15 +60,15 @@ resource "dockerhub_repository" "org_repo" {
}

# Repository team permissions with variations
resource "dockerhub_repository_team_permission" "test" {
resource "docker_repository_team_permission" "test" {
count = 200
repo_id = dockerhub_repository.org_repo[count.index].id
team_id = dockerhub_org_team.terraform_team[count.index].id
repo_id = docker_repository.org_repo[count.index].id
team_id = docker_org_team.terraform_team[count.index].id
permission = "admin"
}

# Create 200 access tokens with variations
resource "dockerhub_access_token" "new_token_v2" {
resource "docker_access_token" "new_token_v2" {
count = 200
token_label = format("%s-%03d", element(var.token_labels, 0), count.index + 1)
scopes = ["repo:read", "repo:write"]
Expand Down
Loading

0 comments on commit 87c3519

Please sign in to comment.