diff --git a/fast/assets/templates/workflow-github.yaml b/fast/assets/templates/workflow-github.yaml index d8185e2c7..ead263d0a 100644 --- a/fast/assets/templates/workflow-github.yaml +++ b/fast/assets/templates/workflow-github.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock TF_PROVIDERS_FILE: ${tf_providers_files.apply} TF_PROVIDERS_FILE_PLAN: ${tf_providers_files.plan} - TF_VERSION: 1.7.4 + TF_VERSION: 1.10.2 jobs: fast-pr: diff --git a/fast/stages/0-bootstrap/templates/workflow-github.yaml b/fast/stages/0-bootstrap/templates/workflow-github.yaml index 5c3c51156..8c3e9b19d 100644 --- a/fast/stages/0-bootstrap/templates/workflow-github.yaml +++ b/fast/stages/0-bootstrap/templates/workflow-github.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock TF_PROVIDERS_FILE: ${tf_providers_files.apply} TF_PROVIDERS_FILE_PLAN: ${tf_providers_files.plan} - TF_VERSION: 1.7.4 + TF_VERSION: 1.10.2 jobs: fast-pr: diff --git a/fast/stages/1-resman/templates/workflow-github.yaml b/fast/stages/1-resman/templates/workflow-github.yaml index d8185e2c7..ead263d0a 100644 --- a/fast/stages/1-resman/templates/workflow-github.yaml +++ b/fast/stages/1-resman/templates/workflow-github.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock TF_PROVIDERS_FILE: ${tf_providers_files.apply} TF_PROVIDERS_FILE_PLAN: ${tf_providers_files.plan} - TF_VERSION: 1.7.4 + TF_VERSION: 1.10.2 jobs: fast-pr: diff --git a/fast/stages/1-tenant-factory/templates/workflow-github.yaml b/fast/stages/1-tenant-factory/templates/workflow-github.yaml index d8185e2c7..ead263d0a 100644 --- a/fast/stages/1-tenant-factory/templates/workflow-github.yaml +++ b/fast/stages/1-tenant-factory/templates/workflow-github.yaml @@ -1,4 +1,4 @@ -# Copyright 2024 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock TF_PROVIDERS_FILE: ${tf_providers_files.apply} TF_PROVIDERS_FILE_PLAN: ${tf_providers_files.plan} - TF_VERSION: 1.7.4 + TF_VERSION: 1.10.2 jobs: fast-pr: diff --git a/tools/versions.py b/tools/versions.py index 6582fff32..0f5ec14ea 100755 --- a/tools/versions.py +++ b/tools/versions.py @@ -46,15 +46,12 @@ terraform {{ def extract_variables(template, interpolated_string): - # Escape doubled curly brackets in the template - escaped_template = template.replace("{{", "{{{{").replace("}}", "}}}}") - # Find all variable names in the escaped template - variable_names = re.findall(r'\{(.*?)\}', escaped_template) + variable_names = re.findall(r'\{(.*?)\}', template) # Create a regular expression pattern to match the interpolated string within the template - pattern = re.sub(r'\{(.*?)\}', r'(.*?)', escaped_template) - pattern = pattern.replace("{{{{", "{").replace("}}}}", "}") + pattern = re.sub(r'\{(.*?)\}', r'(.*?)', template) + pattern = pattern.replace("{{", "{").replace("}}", "}") pattern = r'.*?' + pattern + r'.*?' # Extract the values using the pattern @@ -70,11 +67,13 @@ def process_file(file_path, context): @click.command() -@click.option("--fabric-release", help="Override provider max version") -@click.option("--provider-min-version", help="Override provider min version") -@click.option("--provider-max-version", help="Override provider max version") -@click.option("--tf-version", help="Override terraform version") -@click.option("--tofu-version", help="Override opentofu version") +@click.option("--fabric-release", help="Override Fabric release version") +@click.option("--provider-min-version", + help="Override GCP provider min version") +@click.option("--provider-max-version", + help="Override GCP provider max version") +@click.option("--tf-version", help="Override Terraform version") +@click.option("--tofu-version", help="Override OpenTofu version") @click.option("--write-defaults/--no-write-defaults", default=False, help="Also rewrite default-versions.t*f*") def main(write_defaults, **kwargs):