Skip to content

Commit

Permalink
Remove .tf files from config, add automatic detection of .tf files in…
Browse files Browse the repository at this point in the history
…stead (#12559)

* Remove TF files from config, Add automatic detection of TF files instead

* Update cmd/image-autobumper/main.go

Co-authored-by: Przemek Pokrywka <12400578+dekiel@users.noreply.github.com>

* Update cmd/image-autobumper/main.go

Co-authored-by: Przemek Pokrywka <12400578+dekiel@users.noreply.github.com>

---------

Co-authored-by: Przemek Pokrywka <12400578+dekiel@users.noreply.github.com>
Co-authored-by: Wojciech Sołtys <74361703+Sawthis@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 16, 2025
1 parent 06189ec commit 9dd19c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 85 deletions.
2 changes: 1 addition & 1 deletion cmd/image-autobumper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func updateReferences(imageBumperCli imageBumper, filterRegexp *regexp.Regexp, o
return nil
}
updateYAMLFile := func(name string) error {
if (strings.HasSuffix(name, ".yaml") || strings.HasSuffix(name, ".yml")) && !isUnderPath(name, o.ExcludedConfigPaths) {
if (strings.HasSuffix(name, ".yaml") || strings.HasSuffix(name, ".yml") || strings.HasSuffix(name, ".tf") || strings.HasSuffix(name, ".tfvars")) && !isUnderPath(name, o.ExcludedConfigPaths) {
return updateFile(name)
}
return nil
Expand Down
84 changes: 0 additions & 84 deletions configs/autobump-config/test-infra-autobump-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,90 +13,6 @@ includedConfigPaths:
excludedConfigPaths:
- "prow/staging"
- "sec-scanners-config.yaml"
extraFiles:
- "configs/terraform/core/apis.tf"
- "configs/terraform/environments/dev/artifact-registry/main.tf"
- "configs/terraform/environments/dev/artifact-registry/output.tf"
- "configs/terraform/environments/dev/artifact-registry/provider.tf"
- "configs/terraform/environments/dev/artifact-registry/terraform.tfvars"
- "configs/terraform/environments/dev/artifact-registry/variables.tf"
- "configs/terraform/environments/dev/opa-gatekeeper/backend.tf"
- "configs/terraform/environments/dev/opa-gatekeeper/main.tf"
- "configs/terraform/environments/dev/opa-gatekeeper/output.tf"
- "configs/terraform/environments/dev/opa-gatekeeper/provider.tf"
- "configs/terraform/environments/dev/opa-gatekeeper/terraform.tfvars"
- "configs/terraform/environments/dev/opa-gatekeeper/variables.tf"
- "configs/terraform/environments/dev/secrets-rotator/backend.tf"
- "configs/terraform/environments/dev/secrets-rotator/main.tf"
- "configs/terraform/environments/dev/secrets-rotator/provider.tf"
- "configs/terraform/environments/dev/secrets-rotator/terraform.tfvars"
- "configs/terraform/environments/dev/secrets-rotator/variables.tf"
- "configs/terraform/environments/prod/artifact-registry-variables.tf"
- "configs/terraform/environments/prod/artifact-registry.tf"
- "configs/terraform/environments/prod/backend.tf"
- "configs/terraform/environments/prod/cors-proxy.tf"
- "configs/terraform/environments/prod/dns.tf"
- "configs/terraform/environments/prod/gcp-workfload-identity-federation-variables.tf"
- "configs/terraform/environments/prod/gcp-workfload-identity-federation.tf"
- "configs/terraform/environments/prod/github-com.tf"
- "configs/terraform/environments/prod/github-webhook-gateway.tf"
- "configs/terraform/environments/prod/image-builder-variables.tf"
- "configs/terraform/environments/prod/image-builder.tf"
- "configs/terraform/environments/prod/kyma-bots-secrets-variables.tf"
- "configs/terraform/environments/prod/kyma-bots-secrets.tf"
- "configs/terraform/environments/prod/network-policy.tf"
- "configs/terraform/environments/prod/opa-gatekeeper-variables.tf"
- "configs/terraform/environments/prod/opa-gatekeeper.tf"
- "configs/terraform/environments/prod/output.tf"
- "configs/terraform/environments/prod/pjtester-variables.tf"
- "configs/terraform/environments/prod/pjtester.tf"
- "configs/terraform/environments/prod/provider.tf"
- "configs/terraform/environments/prod/prow-external-plugins.tf"
- "configs/terraform/environments/prod/prow.tf"
- "configs/terraform/environments/prod/secrets-leaks-log-scanner.tf"
- "configs/terraform/environments/prod/secrets-rotator.tf"
- "configs/terraform/environments/prod/security-dashboard-token.tf"
- "configs/terraform/environments/prod/slack-message-sender.tf"
- "configs/terraform/environments/prod/terraform-executor-variables.tf"
- "configs/terraform/environments/prod/terraform-executor.tf"
- "configs/terraform/environments/prod/terraform.tfvars"
- "configs/terraform/environments/prod/variables.tf"
- "configs/terraform/modules/artifact-registry/main.tf"
- "configs/terraform/modules/artifact-registry/output.tf"
- "configs/terraform/modules/artifact-registry/provider.tf"
- "configs/terraform/modules/artifact-registry/variables.tf"
- "configs/terraform/modules/cors-proxy/cors-proxy.tf"
- "configs/terraform/modules/cors-proxy/main.tf"
- "configs/terraform/modules/gcp-workload-identity-federation/main.tf"
- "configs/terraform/modules/gcp-workload-identity-federation/outputs.tf"
- "configs/terraform/modules/gcp-workload-identity-federation/provider.tf"
- "configs/terraform/modules/gcp-workload-identity-federation/variables.tf"
- "configs/terraform/modules/github-webhook-gateway/github-webhook-gateway.tf"
- "configs/terraform/modules/github-webhook-gateway/main.tf"
- "configs/terraform/modules/opa-gatekeeper/main.tf"
- "configs/terraform/modules/opa-gatekeeper/output.tf"
- "configs/terraform/modules/opa-gatekeeper/provider.tf"
- "configs/terraform/modules/opa-gatekeeper/variables.tf"
- "configs/terraform/modules/rotate-service-account/main.tf"
- "configs/terraform/modules/rotate-service-account/output.tf"
- "configs/terraform/modules/rotate-service-account/provider.tf"
- "configs/terraform/modules/rotate-service-account/variables.tf"
- "configs/terraform/modules/secrets-leaks-log-scanner/gcs-bucket-mover.tf"
- "configs/terraform/modules/secrets-leaks-log-scanner/github-issue-creator.tf"
- "configs/terraform/modules/secrets-leaks-log-scanner/github-issue-finder.tf"
- "configs/terraform/modules/secrets-leaks-log-scanner/main.tf"
- "configs/terraform/modules/secrets-leaks-log-scanner/secrets-leak-detector.tf"
- "configs/terraform/modules/secrets-leaks-log-scanner/secrets-leak-log-scanner.tf"
- "configs/terraform/modules/security-dashboard-token/main.tf"
- "configs/terraform/modules/security-dashboard-token/security-dashboard-token.tf"
- "configs/terraform/modules/service-account-keys-cleaner/main.tf"
- "configs/terraform/modules/service-account-keys-cleaner/output.tf"
- "configs/terraform/modules/service-account-keys-cleaner/provider.tf"
- "configs/terraform/modules/service-account-keys-cleaner/variables.tf"
- "configs/terraform/modules/slack-message-sender/issue-labeled.tf"
- "configs/terraform/modules/slack-message-sender/main.tf"
- "configs/terraform/modules/slack-message-sender/release-cluster-created.tf"
- "configs/terraform/modules/slack-message-sender/slack-message-sender.tf"
targetVersion: "latest"
prefixes:
- name: "test-infra"
Expand Down

0 comments on commit 9dd19c2

Please sign in to comment.