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

Add tfe_registry_provider resource and data source #1185

Merged
merged 5 commits into from
Jan 2, 2024

Conversation

tmatilai
Copy link
Contributor

@tmatilai tmatilai commented Dec 19, 2023

Description

Add tfe_registry_provider resource, and tfe_registry_provider and tfe_registry_providers data sources for managing and listing public and private providers in the private registry.

Related to #584.

Testing plan

Create providers with the new resource.

Example configuration
resource "tfe_organization" "foobar" {
  name  = "foobar"
  email = "admin@tfe.local"
}

resource "tfe_registry_provider" "private" {
  organization = tfe_organization.foobar.name

  name = "my-provider"
}

resource "tfe_registry_provider" "public" {
  organization = tfe_organization.foobar.name

  registry_name = "public"
  namespace     = "hashicorp"
  name          = "tfe"
}

External links

Output from acceptance tests

$ make testacc TESTARGS='-run=TestAccTFERegistryProvider'
TF_ACC=1 TF_LOG_SDK_PROTO=OFF go test $(go list ./... |grep -v 'vendor') -v -run=TestAccTFERegistryProvider -timeout 15m
?       github.com/hashicorp/terraform-provider-tfe     [no test files]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-tfe/internal/client     (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-tfe/internal/logging    (cached) [no tests to run]
?       github.com/hashicorp/terraform-provider-tfe/version     [no test files]
=== RUN   TestAccTFERegistryProviderDataSource_public
--- PASS: TestAccTFERegistryProviderDataSource_public (6.55s)
=== RUN   TestAccTFERegistryProviderDataSource_private
--- PASS: TestAccTFERegistryProviderDataSource_private (5.64s)
=== RUN   TestAccTFERegistryProvidersDataSource_all
--- PASS: TestAccTFERegistryProvidersDataSource_all (6.13s)
=== RUN   TestAccTFERegistryProvidersDataSource_public
--- PASS: TestAccTFERegistryProvidersDataSource_public (7.38s)
=== RUN   TestAccTFERegistryProvidersDataSource_private
--- PASS: TestAccTFERegistryProvidersDataSource_private (6.17s)
=== RUN   TestAccTFERegistryProvidersDataSource_filtered
--- PASS: TestAccTFERegistryProvidersDataSource_filtered (7.37s)
=== RUN   TestAccTFERegistryProviderResource_public
--- PASS: TestAccTFERegistryProviderResource_public (4.72s)
=== RUN   TestAccTFERegistryProviderResource_private
--- PASS: TestAccTFERegistryProviderResource_private (4.40s)
PASS
ok      github.com/hashicorp/terraform-provider-tfe/internal/provider   50.437s

Add `tfe_registry_provider` resource for managing public and private
providers in the private registry.
@tmatilai tmatilai requested a review from a team as a code owner December 19, 2023 11:23
@tmatilai
Copy link
Contributor Author

tmatilai commented Dec 19, 2023

Data sources will follow later when I find the next free time slot 🙂

EDIT: added to this same PR

@brandonc
Copy link
Collaborator

Amazing! 🎁 🎄

@tmatilai tmatilai changed the title Add tfe_registry_provider resource Add tfe_registry_provider resource and data source Dec 28, 2023
Copy link
Collaborator

@brandonc brandonc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!!

@brandonc brandonc merged commit e8838d2 into hashicorp:main Jan 2, 2024
12 of 18 checks passed
@tmatilai tmatilai deleted the r-registry-provider branch February 2, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants