Skip to content

Commit 3540bee

Browse files
authored
Merge pull request #134 from mindrunner/main
feat: add missing GCP variables
2 parents 46d1365 + 4926a9a commit 3540bee

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

templates/restic_access_Linux.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

66
export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }}
77
export RESTIC_PASSWORD='{{ restic_repos[item.repo].password | regex_replace('\'', '\'\\\'\'') }}'
8+
{% if restic_repos[item.repo].google_project_id is defined %}
9+
export GOOGLE_PROJECT_ID={{ restic_repos[item.repo].google_project_id }}
10+
{% endif %}
11+
{% if restic_repos[item.repo].google_application_credentials is defined %}
12+
export GOOGLE_APPLICATION_CREDENTIALS={{ restic_repos[item.repo].google_application_credentials }}
13+
{% endif %}
814
{% if restic_repos[item.repo].aws_access_key is defined %}
915
export AWS_ACCESS_KEY_ID={{ restic_repos[item.repo].aws_access_key }}
1016
{% endif %}

templates/restic_script_Linux.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ export GOMAXPROCS={{ restic__max_cpus }}
5454
export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }}
5555
export RESTIC_PASSWORD='{{ restic_repos[item.repo].password | regex_replace('\'', '\'\\\'\'') }}'
5656
BACKUP_NAME={{ item.name }}
57+
{% if restic_repos[item.repo].google_project_id is defined %}
58+
export GOOGLE_PROJECT_ID={{ restic_repos[item.repo].google_project_id }}
59+
{% endif %}
60+
{% if restic_repos[item.repo].google_application_credentials is defined %}
61+
export GOOGLE_APPLICATION_CREDENTIALS={{ restic_repos[item.repo].google_application_credentials }}
62+
{% endif %}
5763
{% if restic_repos[item.repo].aws_access_key is defined %}
5864
export AWS_ACCESS_KEY_ID={{ restic_repos[item.repo].aws_access_key }}
5965
{% endif %}

0 commit comments

Comments
 (0)