-
-
Notifications
You must be signed in to change notification settings - Fork 86
/
_defaults.yaml
108 lines (99 loc) 路 3.28 KB
/
_defaults.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
vars:
namespace: cp
terraform:
vars:
tags:
atmos_component: "{{ .atmos_component }}"
atmos_stack: "{{ .atmos_stack }}"
atmos_manifest: "{{ .atmos_stack_file }}"
spacelift_stack: "{{ .spacelift_stack }}"
atlantis_project: "{{ .atlantis_project }}"
region: "{{ .vars.region }}"
terraform_workspace: "{{ .workspace }}"
backend_type: s3 # s3, remote, vault, static, azurerm, etc.
backend:
s3:
encrypt: true
bucket: "cp-ue2-root-tfstate"
key: "terraform.tfstate"
dynamodb_table: "cp-ue2-root-tfstate-lock"
acl: "bucket-owner-full-control"
region: "us-east-2"
role_arn: null
azurerm:
subscription_id: 88888-8888-8888-8888-8888888888
resource_group_name: rg-terraform-state
storage_account_name: staterraformstate
container_name: dev-tfstate
key: dev.atmos
remote: {}
vault: {}
remote_state_backend:
s3:
role_arn: "arn:aws:iam::123456789012:role/cp-gbl-root-terraform"
providers:
context:
enabled: true
delimiter: "-"
properties:
namespace:
required: true
min_length: 2
max_length: 4
tenant:
required: true
min_length: 2
max_length: 10
environment:
required: true
min_length: 2
max_length: 6
stage:
required: true
min_length: 2
max_length: 20
values:
namespace: "{{ .vars.namespace }}"
tenant: "{{ .vars.tenant }}"
environment: "{{ .vars.environment }}"
stage: "{{ .vars.stage }}"
atmos_component: "{{ .atmos_component }}"
atmos_stack: "{{ .atmos_stack }}"
helmfile:
vars: { }
components:
terraform: { }
helmfile: { }
settings:
spacelift:
workspace_enabled: false
autodeploy: false
atlantis:
# Select a config template defined in `atmos.yaml` in the `integrations.atlantis.config_templates` section
config_template_name: "config-1"
# Select a project template defined in `atmos.yaml` in the `integrations.atlantis.project_templates` section
project_template_name: "project-1"
# Workflow templates
# https://www.runatlantis.io/docs/custom-workflows.html#custom-init-plan-apply-commands
# https://www.runatlantis.io/docs/custom-workflows.html#custom-run-command
workflow_templates:
workflow-1:
plan:
steps:
- run: terraform init
# When using workspaces, you need to select the workspace using the $WORKSPACE environment variable
- run: terraform workspace select $WORKSPACE || terraform workspace new $WORKSPACE
# You must output the plan using '-out $PLANFILE' because Atlantis expects plans to be in a specific location
- run: terraform plan -out $PLANFILE -var-file varfiles/$PROJECT_NAME.tfvars.json
apply:
steps:
- run: terraform apply $PLANFILE
workflow-2:
plan:
steps:
- run: terraform init -reconfigure
- run: terraform workspace select $WORKSPACE || terraform workspace new $WORKSPACE
- run: terraform plan -out $PLANFILE -var-file varfiles/$PROJECT_NAME.tfvars.json
apply:
steps:
- run: terraform apply $PLANFILE