oracle / terraform-provider-oci

Terraform Oracle Cloud Infrastructure provider
https://www.terraform.io/docs/providers/oci/
Mozilla Public License 2.0
758 stars 676 forks source link

Version 4.76.0 can't be Initialized from Registry #1592

Open JanisOrlovs opened 2 years ago

JanisOrlovs commented 2 years ago

Version 4.76.0 can't be initialized when doing Terraform init `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

Warning: Additional provider information from registry

The remote registry returned warnings for registry.terraform.io/hashicorp/oci:

Error: Failed to install provider

Error while installing hashicorp/oci v4.76.0: could not query provider registry for registry.terraform.io/hashicorp/oci: registry response includes invalid SHA256 hash "": %!s() `

JanisOrlovs commented 2 years ago

Replicated in our CI environment: same issue

`Warning: Additional provider information from registry The remote registry returned warnings for registry.terraform.io/hashicorp/oci:

pavanm-huma commented 2 years ago

I too have the issue.

mperica commented 2 years ago

Exactly the same issue, after updating all occurrences of hashicorp/oci to oracle/oci the terraform init is trying to pull the hashicorp one from https://registry.terraform.io/hashicorp/oci which is not available anymore.

bsc8180 commented 2 years ago

I also get the same issue when I am wanting 4.75 (was downgrading from the failing 4.76). Strange its still looking for hashicorp/oci.

version.tf

terraform {
  required_providers {
    azuredevops = {
      source  = "microsoft/azuredevops"
      version = ">= 0.0.1"
    }
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "= 2.75.0"
    }
    oci = {
      source  = "oracle/oci"
      version = "4.75.0"
    }
  }
}

log output

- Finding latest version of hashicorp/vault...
- Finding microsoft/azuredevops versions matching ">= 0.0.1"...
- Finding hashicorp/azurerm versions matching "2.75.0"...
- Finding latest version of hashicorp/oci...
- Installing oracle/oci v4.75.0...
- Installed oracle/oci v4.75.0 (signed by a HashiCorp partner, key ID 1533A49284137CEB)
- Installing hashicorp/vault v3.6.0...
- Installed hashicorp/vault v3.6.0 (signed by HashiCorp)
- Installing microsoft/azuredevops v0.2.1...
- Installed microsoft/azuredevops v0.2.1 (signed by a HashiCorp partner, key ID 6F0B91BDE98478CF)
- Installing hashicorp/azurerm v2.75.0...
- Installed hashicorp/azurerm v2.75.0 (signed by HashiCorp)

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
╷
│ Warning: Additional provider information from registry
│ 
│ The remote registry returned warnings for
│ registry.terraform.io/hashicorp/oci:
│ - For users on Terraform 0.13 or greater, this provider has moved to
│ oracle/oci. Please update your source in required_providers.
╵

╷
│ Error: Failed to install provider
│ 
│ Error while installing hashicorp/oci v4.76.0: could not query provider
│ registry for registry.terraform.io/hashicorp/oci: registry response
│ includes invalid SHA256 hash "": %!s(<nil>)
MeharwadeDivya commented 2 years ago

@bsc8180 Can you try

oci = {
      source  = "oracle/oci"
      version = "4.76.0"
    }
bsc8180 commented 2 years ago

@MeharwadeDivya, Same issue (i was wanting to downgrade back to 4.75.0 after discovering this issue this morning). It looks like its always wanting to search the registry for oci, regardless of there being a more specific location it should look at.

Finding latest version of hashicorp/oci <--- this shouldnt happen.

I think there may be some issue with how hashicorp/oci has been decomissisoned and that this will affect all provider versions.

Switching to hashicorp/oci produces the same failure for me. Terraform 1.1.6.

version.tf

terraform {
  required_providers {
    azuredevops = {
      source  = "microsoft/azuredevops"
      version = ">= 0.0.1"
    }
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "= 2.75.0"
    }
    oci = {
      source  = "oracle/oci"
      version = "4.76.0"
    }
  }
}

output

Initializing provider plugins...
- Finding oracle/oci versions matching "4.76.0"...
- Finding microsoft/azuredevops versions matching ">= 0.0.1"...
- Finding hashicorp/azurerm versions matching "2.75.0"...
- Finding latest version of hashicorp/vault...
- Finding latest version of hashicorp/oci...
- Installing hashicorp/azurerm v2.75.0...
- Installed hashicorp/azurerm v2.75.0 (signed by HashiCorp)
- Installing hashicorp/vault v3.6.0...
- Installed hashicorp/vault v3.6.0 (signed by HashiCorp)
- Installing oracle/oci v4.76.0...
- Installed oracle/oci v4.76.0 (signed by a HashiCorp partner, key ID 1533A49284137CEB)
- Installing microsoft/azuredevops v0.2.1...
- Installed microsoft/azuredevops v0.2.1 (signed by a HashiCorp partner, key ID 6F0B91BDE98478CF)

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
╷
│ Warning: Additional provider information from registry
│ 
│ The remote registry returned warnings for
│ registry.terraform.io/hashicorp/oci:
│ - For users on Terraform 0.13 or greater, this provider has moved to
│ oracle/oci. Please update your source in required_providers.
╵

╷
│ Error: Failed to install provider
│ 
│ Error while installing hashicorp/oci v4.76.0: could not query provider
│ registry for registry.terraform.io/hashicorp/oci: registry response
│ includes invalid SHA256 hash "": %!s(<nil>)
pavanm-huma commented 2 years ago

@MeharwadeDivya specifying 4.76.0 also doesn't work.

Initializing provider plugins...
- Finding latest version of hashicorp/oci...
- Finding oracle/oci versions matching "4.76.0"...
- Installing oracle/oci v4.76.0...
- Installed oracle/oci v4.76.0 (signed by a HashiCorp partner, key ID 1533A49284137CEB)

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
╷
│ Warning: Additional provider information from registry
│ 
│ The remote registry returned warnings for registry.terraform.io/hashicorp/oci:
│ - For users on Terraform 0.13 or greater, this provider has moved to oracle/oci. Please update your source in
│ required_providers.
╵

╷
│ Error: Failed to install provider
│ 
│ Error while installing hashicorp/oci v4.76.0: could not query provider registry for registry.terraform.io/hashicorp/oci:
│ registry response includes invalid SHA256 hash "": %!s(<nil>)
╵
mperica commented 2 years ago

This is working for me

terraform {
  required_providers {
    oci = {
      source = "hashicorp/oci"
      version = "4.75.0"
    }
  }
}
auriben commented 2 years ago

I'm having same issue, as workaround needed to explicitly use version = "4.75.0" Looks like hashicorp/oci v4.76.0 is broken?

MeharwadeDivya commented 2 years ago

The issue has been fixed from hashicorp's end. The latest version is downloadable now.

bsc8180 commented 2 years ago

Can confirm, now working for me.

fmsilva commented 1 year ago

Error while installing oracle/oci v4.80.0: github.com: Get "https://github.com/oracle/terraform-provider-oci/releases/download/v4.80.0/terraform-provider-oci_4.80.0_linux_arm64.zip": dial tcp: lookup github.com on │ 192.168.1.254:53: no such host ╵

fail again, please fix it

ravinitp commented 1 year ago

Thank you for reporting the issue. We observed the affected resources are not provided in the description or it's incorrect. We request you to add it in issue description as mentioned in below format. Example: affected_resources = oci_core_instance , oci_core_instances

If it's not related to any particular resource then mention affected resource as terraform. Example: affected_resources = terraform

As this works through automation, request you to follow exact syntax.