cf-terraforming
cf-terraforming copied to clipboard
add support for cloudflare_web_analytics_site
I kept getting time="2023-11-06T23:38:49-06:00" level=fatal msg="failed to detect provider installation" even after initializing the provider so I couldn't test locally.
⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.
Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.
🔎 Detected hardcoded secrets in your pull request
| GitGuardian id | Secret | Commit | Filename | |
|---|---|---|---|---|
| - | Generic High Entropy Secret | 8f31489cd9a380d7200b7bd812c44e052e6db387 | testdata/cloudflare/cloudflare_web_analytics_site.yaml | View secret |
| - | Generic High Entropy Secret | 8f31489cd9a380d7200b7bd812c44e052e6db387 | testdata/cloudflare/cloudflare_web_analytics_site.yaml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
I kept getting
time="2023-11-06T23:38:49-06:00" level=fatal msg="failed to detect provider installation"even after initializing the provider so I couldn't test locally.
this trips a few people up. the tool requires an initiliased terraform installation to read the schema from so if you're not running it in the same directory, you need to provide that location.
for local testing, i have a ~/src/scratch directory which holds the following terraform.tf
terraform {
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
}
}
}
provider "cloudflare" {}
i run terraform init in ~/src/scratch and then in my tests, set CLOUDFLARE_TERRAFORM_INSTALL_PATH=/Users/jacob/src/scratch make test ...