cf-terraforming icon indicating copy to clipboard operation
cf-terraforming copied to clipboard

add support for cloudflare_web_analytics_site

Open broswen opened this issue 2 years ago • 2 comments
trafficstars

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.

broswen avatar Nov 07 '23 05:11 broswen

⚠️ 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
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. 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


🦉 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!

gitguardian[bot] avatar Nov 07 '23 05:11 gitguardian[bot]

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 ...

jacobbednarz avatar Nov 08 '23 03:11 jacobbednarz