Merge branch '21379-user-activity-remote-collection'
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / states / aws_credentials.sls
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 {%- set aws_credentials = pillar.get('aws_credentials', {}) %}
6
7 {%- if aws_credentials %}
8 extra_extra_aws_credentials_root_aws_config_file_managed:
9   file.managed:
10     - name: /root/.aws/config
11     - makedirs: true
12     - user: root
13     - group: root
14     - mode: '0600'
15     - replace: false
16     - contents: |
17         [default]
18         region= {{ aws_credentials.region }}
19
20 extra_extra_aws_credentials_root_aws_credentials_file_managed:
21   file.managed:
22     - name: /root/.aws/credentials
23     - makedirs: true
24     - user: root
25     - group: root
26     - mode: '0600'
27     - replace: false
28     - contents: |
29         [default]
30         aws_access_key_id = {{ aws_credentials.access_key_id }}
31         aws_secret_access_key = {{ aws_credentials.secret_access_key }}
32 {%- endif %}