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

Error while installing cloudflare/cloudflare v4.49.0: checksum list has unexpected SHA-256 hash #4818

Closed
3 tasks done
cheelim1 opened this issue Dec 26, 2024 · 18 comments
Closed
3 tasks done
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@cheelim1
Copy link

cheelim1 commented Dec 26, 2024

Confirmation

  • This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
  • I have searched the issue tracker and my issue isn't already found.
  • I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version

terraform1.5.7

Affected resource(s)

All resources.

Terraform configuration files

terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "~> 4.0"
    }
  }
}

resource "cloudflare_dns_record" "example" {
  zone_id = var.cloudflare_zone_id
  name    = "terraform"
  value   = "192.0.2.1"
  type    = "A"
  ttl     = 3600
}

Link to debug output

N/A

Panic output

No response

Expected output

No errors and for it to work.

Actual output

│ Error: Failed to install provider

│ Error while installing cloudflare/cloudflare v4.49.0: checksum list has
│ unexpected SHA-256 hash
│ 17e4acfc06f3f70a8d242a27441aab160db87295cf952733c741133ce4feae0f (expected
│ 69930ebc8c13c231a02c9a3bb608d45acd75f524413a9ffc72c17a78474dacb1)

Steps to reproduce

  1. Update cloudflare version to 4.49.0
  2. terraform init

Additional factoids

No response

References

I have to pin to the 4.48.0 version to temporary unblock on our end.

terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "4.48.0" #temporary pinning version for a workaround
    }
  }
}
@cheelim1 cheelim1 added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 26, 2024
Copy link
Contributor

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

Copy link
Contributor

Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of TF_LOG=DEBUG output to be provided. The only parts that should be redacted are your user credentials in the X-Auth-Key, X-Auth-Email and Authorization HTTP headers. Details such as zone or account identifiers are not considered sensitive but can be redacted if you are very cautious. This log file provides additional context from Terraform, the provider and the Cloudflare API that helps in debugging issues. Without it, maintainers are very limited in what they can do and may hamper diagnosis efforts.

This issue has been marked with triage/needs-information and is unlikely to receive maintainer attention until the log file is provided making this a complete bug report.

@github-actions github-actions bot added triage/needs-information Indicates an issue needs more information in order to work on it. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 26, 2024
@olegbilovus
Copy link

I have the same issue. It happens with terraform and tofu when trying to install the 4.49.0 cloudflare provider.

I could replicate the issue with this simple main.tf:

terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "4.49.0"
    }
  }
}

Here is the DEBUG output:

terraform init                                             ─╯
2024-12-26T08:49:37.385+0100 [INFO]  Terraform version: 1.10.3
2024-12-26T08:49:37.386+0100 [DEBUG] using github.com/hashicorp/go-tfe v1.70.0
2024-12-26T08:49:37.386+0100 [DEBUG] using github.com/hashicorp/hcl/v2 v2.23.0
2024-12-26T08:49:37.386+0100 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2024-12-26T08:49:37.386+0100 [DEBUG] using github.com/zclconf/go-cty v1.15.1-0.20241111215639-63279be090d7
2024-12-26T08:49:37.386+0100 [INFO]  Go runtime version: go1.23.3
2024-12-26T08:49:37.386+0100 [INFO]  CLI args: []string{"terraform", "init"}
2024-12-26T08:49:37.386+0100 [DEBUG] Attempting to open CLI config file: /root/.terraformrc
2024-12-26T08:49:37.386+0100 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2024-12-26T08:49:37.387+0100 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2024-12-26T08:49:37.387+0100 [DEBUG] ignoring non-existing provider search directory /root/.terraform.d/plugins
2024-12-26T08:49:37.387+0100 [DEBUG] ignoring non-existing provider search directory /root/.local/share/terraform/plugins
2024-12-26T08:49:37.387+0100 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
2024-12-26T08:49:37.387+0100 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins
2024-12-26T08:49:37.390+0100 [INFO]  CLI command args: []string{"init"}
Initializing the backend...
2024-12-26T08:49:37.394+0100 [DEBUG] checking for provisioner in "."
2024-12-26T08:49:37.460+0100 [DEBUG] checking for provisioner in "/usr/bin"
Initializing provider plugins...
- Finding cloudflare/cloudflare versions matching "4.49.0"...
2024-12-26T08:49:37.462+0100 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
2024-12-26T08:49:37.947+0100 [DEBUG] GET https://registry.terraform.io/v1/providers/cloudflare/cloudflare/versions
2024-12-26T08:49:38.193+0100 [DEBUG] GET https://registry.terraform.io/v1/providers/cloudflare/cloudflare/4.49.0/download/linux/arm64
2024-12-26T08:49:38.413+0100 [DEBUG] GET https://github.com/cloudflare/terraform-provider-cloudflare/releases/download/v4.49.0/terraform-provider-cloudflare_4.49.0_SHA256SUMS
2024-12-26T08:49:39.344+0100 [DEBUG] GET https://github.com/cloudflare/terraform-provider-cloudflare/releases/download/v4.49.0/terraform-provider-cloudflare_4.49.0_SHA256SUMS.sig
- Installing cloudflare/cloudflare v4.49.0...
╷
│ Error: Failed to install provider
│
│ Error while installing cloudflare/cloudflare v4.49.0: checksum
│ list has unexpected SHA-256 hash
│ 689dc65b0eaf003eb8d55e7119c81abe466469ee7ad05a18ad4f72a87d81d000
│ (expected
│ 2f08c8243a0447814bda0678937f458c191bb9dad75818bacc485bed2896a1f9)
╵

@arafatkhan-optimizely

This comment has been minimized.

@lduparc

This comment has been minimized.

@VazquezAgustin

This comment has been minimized.

@iamcpdev

This comment has been minimized.

@romankydybets
Copy link

I find you how to by-pass this issue.
you need to find the last applied version to you infra.
In my case error were next

 Error: Failed to install provider
 
 Error while installing cloudflare/cloudflare v4.49.0: checksum list has
 unexpected SHA-256 hash
 17e4acfc06f3f70a8d242a27441aab160db87295cf952733c741133ce4feae0f (expected
 69930ebc8c13c231a02c9a3bb608d45acd75f524413a9ffc72c17a78474dacb1)

Last applied version were 4.48.0

cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "4.48.0"
    }

I set it into versions.tf and it start working for me.

@lduparc

This comment has been minimized.

@DemonICOLI

This comment has been minimized.

@dggmsa

This comment has been minimized.

@mariomartinez81

This comment has been minimized.

@DFanso

This comment has been minimized.

@rkirby1

This comment has been minimized.

@ebachle
Copy link

ebachle commented Dec 26, 2024

Friends... The solution is to pin your dependencies, it's in a comment above. It was a bad release from under a day ago. It'll be rolled back or fixed at some point coming up, but a reasonable solution is accessible and noted above. You can update your required versions and that solves it.

If you commit your lock file as is standard best practice for all terraform this isn't an issue.

Let's be a little kinder to our colleagues at Cloudflare who were still working on shipping improvements on Christmas Day.

@sadminriley

This comment has been minimized.

@ronballesteros

This comment has been minimized.

@cloudflare cloudflare locked and limited conversation to collaborators Dec 26, 2024
@jacobbednarz
Copy link
Member

please don't spam issues with "me too" comments. the issue description describes how to add your vote to the issue if you're impacted or interested in it.

the checksum mismatch is due to the terraform registry receiving and caching an complete and failed build. the v4.49.0 release assets on GitHub are correct. already working with hashicorp to have it re-fetch the assets. failing that, i'll put out a no-op release to trigger the entire workflow again which may be easier given the holidays.

in the meantime, you can pin to a previous version to unblock yourself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests