You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# List any related terraform modules that this module may be used with or that this module depends on.
27
30
related: []
28
31
29
32
description: This Github Action is used to run Terraform apply for a single, Atmos-supported component with a saved planfile in S3 and DynamoDB.
@@ -68,15 +71,15 @@ usage: |-
68
71
> If you are using `atmos < 1.63.0` please use `v1` version of this action.
69
72
70
73
The action expects the atmos configuration file `atmos.yaml` to be present in the repository.
71
-
74
+
72
75
The action supports AWS and Azure to store Terraform plan files.
73
76
You can read more about plan storage in the [cloudposse/github-action-terraform-plan-storage](https://github.com/cloudposse/github-action-terraform-plan-storage?tab=readme-ov-file#aws-default) documentation.
74
77
Depends of cloud provider the following fields should be set in the `atmos.yaml`:
75
-
78
+
76
79
#### AWS
77
-
80
+
78
81
The config should have the following structure:
79
-
82
+
80
83
```yaml
81
84
integrations:
82
85
github:
@@ -99,9 +102,9 @@ usage: |-
99
102
```
100
103
101
104
#### Azure
102
-
105
+
103
106
The config should have the following structure:
104
-
107
+
105
108
```yaml
106
109
integrations:
107
110
github:
@@ -150,27 +153,27 @@ usage: |-
150
153
```
151
154
152
155
### Support OpenTofu
153
-
156
+
154
157
This action supports [OpenTofu](https://opentofu.org/).
155
-
158
+
156
159
> [!IMPORTANT]
157
160
> **Please note!** OpenTofu supported by Atmos `>= 1.73.0`.
158
161
> For details [read](https://atmos.tools/core-concepts/projects/configuration/opentofu/)
159
-
162
+
160
163
To enable OpenTofu add the following settings to `atmos.yaml`
161
164
* Set the `opentofu-version` in the `atmos.yaml` to the desired version
162
165
* Set `components.terraform.command` to `tofu`
163
-
166
+
164
167
#### Example
165
-
168
+
166
169
```yaml
167
-
170
+
168
171
components:
169
172
terraform:
170
173
command: tofu
171
-
174
+
172
175
...
173
-
176
+
174
177
integrations:
175
178
github:
176
179
gitops:
@@ -181,7 +184,7 @@ usage: |-
181
184
### Workflow example
182
185
183
186
In this example, the action is triggered when certain events occur, such as a manual workflow dispatch or the opening, synchronization, or reopening of a pull request, specifically on the main branch. It specifies specific permissions related to assuming roles in AWS. Within the "apply" job, the "component" and "stack" are hardcoded (`foobar` and `plat-ue2-sandbox`). In practice, these are usually derived from another action.
184
-
187
+
185
188
> [!TIP]
186
189
We recommend combining this action with the [`affected-stacks`](https://atmos.tools/integrations/github-actions/affected-stacks) GitHub Action inside a matrix to plan all affected stacks in parallel.
187
190
@@ -213,14 +216,14 @@ usage: |-
213
216
atmos-config-path: ./rootfs/usr/local/etc/atmos/
214
217
```
215
218
### Migrating from `v3` to `v4`
216
-
219
+
217
220
The notable changes in `v4` are:
218
221
219
222
- `v4` works only with `atmos >= 1.158.0`
220
223
- `v4` supports atnos `templates` and `functions`
221
224
222
225
### Migrating from `v2` to `v3`
223
-
226
+
224
227
The notable changes in `v3` are:
225
228
226
229
- `v3` works only with `atmos >= 1.99.0`
@@ -231,23 +234,23 @@ usage: |-
231
234
The only required migration step is updating atmos version to `>= 1.99.0`
232
235
233
236
### Migrating from `v1` to `v2`
234
-
237
+
235
238
The notable changes in `v2` are:
236
-
239
+
237
240
- `v2` works only with `atmos >= 1.63.0`
238
241
- `v2` drops `install-terraform` input because terraform is not required for affected stacks call
239
242
- `v2` drops `atmos-gitops-config-path` input and the `./.github/config/atmos-gitops.yaml` config file. Now you have to use GitHub Actions environment variables to specify the location of the `atmos.yaml`.
240
-
243
+
241
244
The following configuration fields now moved to GitHub action inputs with the same names
242
-
245
+
243
246
| name |
244
247
|-------------------------|
245
248
| `atmos-version` |
246
249
| `atmos-config-path` |
247
-
248
-
250
+
251
+
249
252
The following configuration fields moved to the `atmos.yaml` configuration file.
1. `v1` drops the `component-path` variable and instead fetches if directly from the [`atmos.yaml` file](https://atmos.tools/cli/configuration/) automatically. Simply remove the `component-path` argument from your invocations of the `cloudposse/github-action-atmos-terraform-apply` action.
334
337
2. `v1` moves most of the `inputs` to the Atmos GitOps config path `./.github/config/atmos-gitops.yaml`. Simply create this file, transfer your settings to it, then remove the corresponding arguments from your invocations of the `cloudposse/github-action-atmos-terraform-apply` action.
335
338
@@ -345,10 +348,10 @@ usage: |-
345
348
| `terraform-version` |
346
349
| `aws-region` |
347
350
| `enable-infracost` |
348
-
349
-
351
+
352
+
350
353
If you want the same behavior in `v1` as in `v0` you should create config `./.github/config/atmos-gitops.yaml` with the same variables as in `v0` inputs.
0 commit comments