Skip to content

Commit

Permalink
Added file widget
Browse files Browse the repository at this point in the history
  • Loading branch information
goruha committed Jun 3, 2024
1 parent ebf0872 commit 8ca4ae5
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 20 deletions.
6 changes: 4 additions & 2 deletions website/docs/integrations/github-actions/affected-stacks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 30
sidebar_label: Affected Stacks
---

import Terminal from '@site/src/components/Terminal'
import File from '@site/src/components/File'

**Streamline Your Change Management Process**

Expand All @@ -25,7 +25,8 @@ Atmos checks component folders for changes first, marking all related components

## Usage Example

```yaml title=".github/workflows/atmos-terraform-plan.yaml"
<File title=".github/workflows/atmos-terraform-plan.yaml">
```yaml
name: Pull Request
on:
pull_request:
Expand Down Expand Up @@ -70,6 +71,7 @@ jobs:
atmos-config-path: ./rootfs/usr/local/etc/atmos/
atmos-version: 1.63.0
```
</File>
## Requirements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 50
sidebar_label: Terraform Apply
---

import Terminal from '@site/src/components/Terminal'
import File from '@site/src/components/File'

The Cloud Posse GitHub Action for "Atmos Terraform Apply" simplifies provisioning Terraform entirely within GitHub Action workflows. It makes it very easy to understand exactly what happened directly within the GitHub UI.

Expand Down Expand Up @@ -39,7 +39,8 @@ We recommend combining this action with the [`affected-stacks`](/integrations/gi

:::

```yaml title=".github/workflows/atmos-terraform-apply.yaml"
<File title=".github/workflows/atmos-terraform-apply.yaml">
```yaml
name: "atmos-terraform-apply"

on:
Expand Down Expand Up @@ -68,6 +69,7 @@ jobs:
atmos-config-path: ./rootfs/usr/local/etc/atmos/
atmos-version: 1.63.0
```
</File>
## Requirements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 60
sidebar_label: Terraform Drift Detection
---

import Terminal from '@site/src/components/Terminal'
import File from '@site/src/components/File'

The Cloud Posse GitHub Action for "Atmos Terraform Drift Detection" and "Atmos Terraform Drift Remediation" define a scalable pattern for detecting and remediating Terraform drift from within GitHub using workflows and Issues. "Atmos Terraform Drift Detection" will determine drifted Terraform state by running [Atmos Terraform Plan](/integrations/github-actions/atmos-terraform-plan) and creating GitHub Issues for any drifted component and stack. Furthermore, "Atmos Terraform Drift Remediation" will run [Atmos Terraform Apply](/integrations/github-actions/atmos-terraform-apply) for any open Issue if called and close the given Issue. With these two actions, we can fully support drift detection for Terraform directly within the GitHub UI.

Expand Down Expand Up @@ -86,7 +86,8 @@ We can quickly see a complete list of all drift components in the "Issues" tab i

#### Usage Example

```yaml title=".github/workflows/atmos-terraform-drfit-detection.yaml"
<File title=".github/workflows/atmos-terraform-drfit-detection.yaml">
```yaml
name: 👽 Atmos Terraform Drift Detection

on:
Expand Down Expand Up @@ -145,6 +146,7 @@ jobs:
max-opened-issues: '4'
process-all: 'true'
```
</File>
#### 256 Matrix Limitation
Expand Down Expand Up @@ -201,7 +203,8 @@ Once we have an open Issue for a drifted component, we can trigger another workf
#### Usage Example


```yaml title=".github/workflows/atmos-terraform-drfit-remediation.yaml"
<File title=".github/workflows/atmos-terraform-drfit-remediation.yaml">
```yaml
name: 👽 Atmos Terraform Drift Remediation
run-name: 👽 Atmos Terraform Drift Remediation

Expand Down Expand Up @@ -246,6 +249,7 @@ jobs:
atmos-config-path: ./rootfs/usr/local/etc/atmos/
atmos-version: 1.63.0
```
</File>
## Requirements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 40
sidebar_label: Terraform Plan
---

import Terminal from '@site/src/components/Terminal'
import File from '@site/src/components/File'

The Cloud Posse GitHub Action for "Atmos Terraform Plan" simplifies provisioning Terraform from within GitHub using workflows. Understand precisely what to expect from running a `terraform plan` from directly within the GitHub UI for any Pull Request.

Expand Down Expand Up @@ -47,7 +47,8 @@ We recommend combining this action with the [`affected-stacks`](/integrations/gi

:::

```yaml title=".github/workflows/atmos-terraform-plan.yaml"
<File title=".github/workflows/atmos-terraform-plan.yaml">
```yaml
name: "atmos-terraform-plan"
on:
pull_request:
Expand All @@ -74,6 +75,7 @@ jobs:
atmos-config-path: ./rootfs/usr/local/etc/atmos/
atmos-version: 1.63.0
```
</File>
## Requirements
Expand Down
14 changes: 10 additions & 4 deletions website/docs/integrations/github-actions/component-updater.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 20
sidebar_label: Component Updater
---

import Terminal from '@site/src/components/Terminal'
import File from '@site/src/components/File'

**Efficient Automation for Component Updates**

Expand All @@ -28,7 +28,8 @@ Discover more details and a comprehensive list of `inputs` and `outputs` in the

### Workflow example

```yaml title=".github/workflows/atmos-component-updater.yaml"
<File title=".github/workflows/atmos-component-updater.yaml">
```yaml
name: "Atmos Component Updater"

on:
Expand Down Expand Up @@ -74,6 +75,7 @@ jobs:
allowed_prefixes: "component-update/"
dry_run: no
```
</File>
### Requirements
Expand Down Expand Up @@ -173,7 +175,8 @@ Now the Atmos Component Updater workflow will create a new Deployment in the `at

If your [`atmos.yaml` file](https://atmos.tools/cli/configuration) is not located in the root of the infrastructure repository, you can specify the path to it using [`ATMOS_CLI_CONFIG_PATH` env variable](https://atmos.tools/cli/configuration/#environment-variables).

```yaml title=".github/workflows/atmos-component-updater.yaml"
<File title=".github/workflows/atmos-component-updater.yaml">
```yaml
# ...
- name: Update Atmos Components
uses: cloudposse/github-action-atmos-component-updater@v1
Expand All @@ -184,10 +187,12 @@ If your [`atmos.yaml` file](https://atmos.tools/cli/configuration) is not locate
github-access-token: ${{ secrets.GITHUB_TOKEN }}
max-number-of-prs: 5
```
</File>
### Customize Pull Request labels, title and body
```yaml title=".github/workflows/atmos-component-updater.yaml"
<File title=".github/workflows/atmos-component-updater.yaml">
```yaml
# ...
- name: Update Atmos Components
uses: cloudposse/github-action-atmos-component-updater@v1
Expand All @@ -206,6 +211,7 @@ If your [`atmos.yaml` file](https://atmos.tools/cli/configuration) is not locate
automated
atmos
```
</File>
**IMPORTANT:** The backtick symbols must be escaped in the GitHub Action parameters. This is because GitHub evaluates whatever is in the backticks and it will render as an empty string.
Expand Down
14 changes: 10 additions & 4 deletions website/docs/integrations/github-actions/github-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: GitHub Actions.
id: gitHub-actions
---

import Terminal from '@site/src/components/Terminal';
import File from '@site/src/components/File';
import DocCardList from "@theme/DocCardList";

# GitHub Actions
Expand Down Expand Up @@ -41,7 +41,8 @@ This action can use any S3 Bucket to keep track of your planfiles. Just ensure t

For example, [vendor in](/core-concepts/components/vendoring) the [`s3-component`](https://docs.cloudposse.com/components/library/aws/s3-bucket/), then using an [Atmos stack configuration](/core-concepts/stacks/), define a bucket using the [`s3-bucket` component](https://github.com/cloudposse/terraform-aws-components/tree/main/modules/s3-bucket) with this catalog configuration:

```yaml title="stacks/catalog/s3-bucket/gitops.yaml"
<File title="stacks/catalog/s3-bucket/gitops.yaml">
```yaml
import:
- catalog/s3-bucket/defaults

Expand All @@ -57,14 +58,16 @@ components:
name: gitops-plan-storage
allow_encrypted_uploads_only: false
```
</File>
Assign this S3 Bucket ARN to the `terraform-plan-bucket` input.

### DynamoDB Table

Similarly, a simple DynamoDB table can be provisioned using our [`dynamodb` component](https://docs.cloudposse.com/components/library/aws/dynamodb/). Set the **Hash Key** and create a **Global Secondary Index** as follows:

```yaml title="stacks/catalog/dynamodb/gitops.yaml"
<File title="stacks/catalog/dynamodb/gitops.yaml">
```yaml
import:
- catalog/dynamodb/defaults
Expand Down Expand Up @@ -101,6 +104,7 @@ components:
ttl_enabled: true
ttl_attribute: ttl
```
</File>

Pass the ARN of this table as the input to the `terraform-plan-table` of the [`cloudposse/github-action-atmos-terraform-plan`](https://github.com/cloudposse/github-action-atmos-terraform-plan) GitHub Action.

Expand All @@ -115,7 +119,8 @@ Next, create a role for GitHub workflows to use to plan and apply Terraform. We
The actions that works with atmos `>= 1.63.0` expects the Atmos configuration file `atmos.yaml` to be present in the repository.
The config should have the following structure:

```yaml title="rootfs/usr/local/etc/atmos/atmos.yaml"
<File title="rootfs/usr/local/etc/atmos/atmos.yaml">
```yaml
integrations:
github:
gitops:
Expand All @@ -133,6 +138,7 @@ integrations:
sort-by: .stack_slug
group-by: .stack_slug | split("-") | [.[0], .[2]] | join("-")
```
</File>

For actions that use atmos `< 1.63.0` the settings passed as github action inputs.
Please follow documentation for each action to see the required inputs.
Expand Down
8 changes: 5 additions & 3 deletions website/docs/integrations/github-actions/setup-atmos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 10
sidebar_label: Setup Atmos
---

import Terminal from '@site/src/components/Terminal'
import File from '@site/src/components/File'

The Cloud Posse GitHub Action to "Setup Atmos" simplifies your GitHub Action Workflows.

Expand All @@ -14,7 +14,8 @@ We provide a [GitHub Action](https://github.com/cloudposse/github-action-setup-a

## Usage Example

```yaml title=".github/workflows/example.yaml"
<File title=".github/workflows/example.yaml">
```yaml
on:
workflow_dispatch:
pull_request:
Expand All @@ -30,4 +31,5 @@ jobs:
with:
# Make sure to pin to the latest version of atmos
atmos_version: 1.77.0
```
```
</File>

0 comments on commit 8ca4ae5

Please sign in to comment.