'How to verify Terraform provider h1 locally
I've patched and released an internal fork of F5 Bigip based on BigIP one, which is released on internal network mirror. Important note: I build the provider on Windows, I have no choice to build this on a Linux platform. I build provider for both Windows and Linux on this machine
I face two issues:
Linux Provider binary is not executable
Description
Linux provider zip package contains provider file which is not executable
Bypass
- Run
chmox +x .terraform/providers/f5networks/bigip/terraform-provider-XXXXXin project root - Run
terraform init -upgrade - Run
terraform plan - Works
Question
How to make this provider executable after build time ?
Compute h1 checksum
Description
To deploy this on our static mirror, we need to compute a h1 of the provider. Terraform uses this lib to compute h1: https://pkg.go.dev/golang.org/x/mod/sumdb/dirhash
But, when I run the suggestion command: find . -type f | sort | sha256sum | base64 and then run terraform init -upgrade, Terraform says checkum do not match
Bypass
- Generate
zhchecksum (sha256sum over .zip), put id in1.2.3.json - Run
terraform init -upgrade - Grab h1 from
.terraform.lock.hcland copy it to1.2.3.jsonand remove zh - Run
terraform init -upgrade - Run
terraform plan - Works
Question
Which command should I run to get h1 from the command line to directly copy into json file ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
