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

Explicitly Reference Newer integrations/github Provider #26

Closed
TheYorkshireDev opened this issue Dec 27, 2021 · 0 comments · Fixed by #29
Closed

Explicitly Reference Newer integrations/github Provider #26

TheYorkshireDev opened this issue Dec 27, 2021 · 0 comments · Fixed by #29
Labels

Comments

@TheYorkshireDev
Copy link
Contributor

integrations/github provider supersedes hashicorp/github however there is an outstanding bug (integrations/terraform-provider-github#652 (comment) & integrations/terraform-provider-github#652 (comment)) on the newer provider which causes modules that interact with GitHub to use the older hashicorp/github unless explicitly referenced within the module.

Examples in this repository reference the newer provider (https://github.com/operatehappy/terraform-github-repository/blob/master/examples/simple/main.tf) so we should encourage usage.

Expected Behavior

When using the module after declaring integrations/github upon initialization only that provider is downloaded.

Current Behavior

When using the module after declaring integrations/github upon initialization both providers (integrations/github and hashicorp/github) are downloaded.

Terraform Init

> terraform init

Initializing modules...
- test_github_repo_defaults in modules/project
Downloading git::https://github.com/TheYorkshireDev/terraform-github-repository.git?ref=tgr-22 for test_github_repo_defaults.software_repository...
- test_github_repo_defaults.software_repository in .terraform/modules/test_github_repo_defaults.software_repository

Initializing the backend...

Successfully configured the backend "remote"! Terraform will automatically
use this backend unless the backend configuration changes.

Initializing provider plugins...
- Finding integrations/github versions matching "4.19.0"...
- Finding latest version of hashicorp/github...
- Installing hashicorp/github v4.19.0...
- Installed hashicorp/github v4.19.0 (signed by HashiCorp)
- Installing integrations/github v4.19.0...
- Installed integrations/github v4.19.0 (signed by a HashiCorp partner, key ID 38027F80D7FD5FB2)

Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

╷
│ Warning: Additional provider information from registry
│ 
│ The remote registry returned warnings for
│ registry.terraform.io/hashicorp/github:
│ - For users on Terraform 0.13 or greater, this provider has moved to
│ integrations/github. Please update your source in required_providers.
╵

Terraform has been successfully initialized!

Terraform Providers

> terraform providers

Providers required by configuration:
.
├── provider[registry.terraform.io/integrations/github] 4.19.0
└── module.test_github_repo_defaults
    └── module.software_repository
        └── provider[registry.terraform.io/hashicorp/github]

Steps to Reproduce

Use the simple example from the documentation: https://github.com/operatehappy/terraform-github-repository/blob/master/examples/simple/main.tf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant