Venafi / terraform-provider-venafi

HashiCorp Terraform provider that uses Venafi to streamline machine identity (certificate and key) acquisition.
https://www.terraform.io/docs/providers/venafi/
Mozilla Public License 2.0
16 stars 20 forks source link

0.12.0 Provider unavailable via Terraform Registry #57

Closed ToniCipriani closed 3 years ago

ToniCipriani commented 3 years ago

PROBLEM SUMMARY 0.12.0 Provider unavailable via Terraform Registry

STEPS TO REPRODUCE Use example code from Hashicorp document to pin version to 0.12.0

terraform {
  required_providers {
    venafi = {
      source = "Venafi/venafi"
      version = "0.12.0"
    }
  }
}

EXPECTED RESULTS Terraform init should download the provider

ACTUAL RESULTS Provider Not Found

ENVIRONMENT DETAILS Venafi Provider 0.12.0

COMMENTS/WORKAROUNDS Downgrade to provider 0.11.2

tr1ck3r commented 3 years ago

@ToniCipriani what version of Terraform are you using? Does the system you're running on have access to https://registry.terraform.io? I just did a quick test from one of my Linux systems and this was the result:

# ./terraform version
Terraform v1.0.3
on linux_amd64
#
# curl -I https://registry.terraform.io
HTTP/2 200
server: Cowboy
accept-ranges: bytes
cache-control: public, stale-if-error=31536000
content-security-policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://www.google-analytics.com https://cdn.segment.com https://www.googletagmanager.com https://a.optnmstr.com; style-src 'self' 'unsafe-inline' https://maxcdn.bootstrapcdn.com https://fonts.googleapis.com https://p.typekit.net https://use.typekit.net; img-src 'self' data: https: https://www.google-analytics.com; font-src 'self' https://maxcdn.bootstrapcdn.com https://fonts.googleapis.com https://fonts.gstatic.com https://use.typekit.net; connect-src 'self' https://www.google-analytics.com https://api.segment.io https://sentry.io https://api.omappapi.com https://api.opmnstr.com https://api.optmnstr.com https://*.algolia.net https://*.algolianet.com
content-type: text/html; charset=utf-8
feature-policy:
last-modified: Fri, 23 Jul 2021 19:46:24 GMT
referrer-policy: no-referrer-when-downgrade
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
x-frame-options: DENY
x-registry-fastboot: false
x-xss-protection: 1; mode=block
via: 1.1 vegur, 1.1 varnish, 1.1 varnish
date: Thu, 29 Jul 2021 20:11:56 GMT
x-served-by: cache-dca17782-DCA, cache-sea4457-SEA
x-cache: MISS, MISS
x-cache-hits: 0, 0
vary: Accept-Encoding
content-length: 9425

#
# cat main.tf
terraform {
  required_providers {
    venafi = {
      source = "venafi/venafi"
      version = "0.12.0"
    }
  }
}
#
# ./terraform init

Initializing the backend...

Initializing provider plugins...
- Finding venafi/venafi versions matching "0.12.0"...
- Installing venafi/venafi v0.12.0...
- Installed venafi/venafi v0.12.0 (signed by a HashiCorp partner, key ID C8B638EE2128A237)

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.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
#
# tree .terraform
.terraform
└── providers
    └── registry.terraform.io
        └── venafi
            └── venafi
                └── 0.12.0
                    └── linux_amd64
                        ├── LICENSE
                        ├── README.md
                        └── terraform-provider-venafi_v0.12.0

6 directories, 3 files
ToniCipriani commented 3 years ago

Seems like it works now if the provider is also pinned (without the version) in the module.

terragrunt providers

Providers required by configuration:
.
├── provider[registry.terraform.io/venafi/venafi] 0.12.0
├── provider[registry.terraform.io/hashicorp/azurerm] 2.46.0
└── module.venafi_certs
    ├── provider[registry.terraform.io/hashicorp/venafi]
    └── provider[registry.terraform.io/hashicorp/azurerm]

Providers required by state:

    provider[registry.terraform.io/hashicorp/azurerm]

    provider[registry.terraform.io/venafi/venafi]