Skip to content

Conversation

@goruha
Copy link
Member

@goruha goruha commented Jan 26, 2026

what

  • Document the new ECS Strategy

why

  • Allow developers to follow the best practices

…o ecs-atmos-deployment

* 'ecs-atmos-deployment' of github.com:cloudposse/docs:
  Fix release versioning by storing library docs in draft releases (#854)
  docs: Add RunsOn regional availability guidance to primary region decision (#851)
  Add redirects for all Spacelift tutorials (#853)
  Add redirect for Spacelift tutorial (#850)
Copy link
Member

@milldr milldr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix build (broken links)

…o ecs-atmos-deployment

* 'ecs-atmos-deployment' of github.com:cloudposse/docs:
  docs: Add setup guidance for SuperAdmin auth, account IDs, and placeholders (#852)
  Add RunsOn license acquisition step to setup guide (#855)
Comment on lines 207 to 212
### <StepNumber/> PATs for ECS with `ecspresso` (Deprecated)

:::note
This step can likely be skipped. The ecspresso-based ECS deployment approach is deprecated in favor of [ECS with Atmos](/layers/software-delivery/ecs-atmos/), which does not require these PATs.
:::

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just remove this whole section from this page and move all requirements for ecspresso to that ecspresso page, docs/layers/software-delivery/ecs-ecspresso/ecs-ecspresso.mdx

Comment on lines 39 to 60
### <StepNumber/> Deploy Platform Infrastructure

Deploy the foundational infrastructure components in your `infra` repository.

Ensure the following components are deployed in your target AWS accounts:

```bash
# Deploy VPC
atmos terraform deploy vpc -s plat-use1-dev
atmos terraform deploy vpc -s plat-use1-staging
atmos terraform deploy vpc -s plat-use1-prod

# Deploy ECS Cluster
atmos terraform deploy ecs/cluster -s plat-use1-dev
atmos terraform deploy ecs/cluster -s plat-use1-staging
atmos terraform deploy ecs/cluster -s plat-use1-prod

# Deploy Github OIDC Provider
atmos terraform deploy github-oidc-provider -s plat-gbl-dev
atmos terraform deploy github-oidc-provider -s plat-gbl-staging
atmos terraform deploy github-oidc-provider -s plat-gbl-prod
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of asking the user to redeploy these specific three components, we should have a task list that lists what is required for the ECS app. (see the "TaskList" component).

Phrasing like we have in now implies that the user has to redeploy a VPC, EKS cluster, and GitHub OIDC, but in reality, those are already all deployed by this point.

Comment on lines 108 to 112
The template includes:
- Sample Go application with Dockerfile
- GitHub Actions workflows for CI/CD
- Terraform/OpenTofu components for ECS task definitions
- Atmos stack configurations for each environment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix formatting. Use one of the existing components. For example, TaskList, or Steps.

CleanShot 2026-01-26 at 16 20 57@2x

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for other lists:
CleanShot 2026-01-26 at 16 26 25@2x

tfstate-backend-apps:
vars:
privileged_principal_arns:
- !terraform.state example-app/iam-role .role.arn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the valid format

Copy link
Member

@milldr milldr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comments.

Copy link
Member

@milldr milldr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comments.

Comment on lines +74 to +118
### ECS with Atmos (Recommended)

The [app-on-ecs-v2](https://github.com/cloudposse-examples/app-on-ecs-v2) example demonstrates a self-contained approach where workflows are defined directly in the application repository. This approach uses Atmos for configuration orchestration and OpenTofu for infrastructure management.

With this approach, you need only a few workflows in your application repository:

1. `feature-branch.yml` - Build and deploy to preview environments
2. `preview-cleanup.yml` - Clean up preview environments when PRs close
3. `main-branch.yaml` - Build, deploy to dev, and create draft release
4. `release.yaml` - Promote and deploy to staging/production
5. (optional) `validate.yml` - Run validation checks
6. (optional) `labeler.yaml` - Auto-label PRs

```console
app-on-ecs-v2/
├── .github/
│ └── workflows/
│ ├── feature-branch.yml
│ ├── preview-cleanup.yml
│ ├── main-branch.yaml
│ ├── release.yaml
│ ├── validate.yml
│ └── labeler.yaml
├── app/
│ ├── main.go
│ └── Dockerfile
├── terraform/
│ ├── components/
│ │ └── ecs-task/
│ └── stacks/
│ ├── dev.yaml
│ ├── staging.yaml
│ ├── prod.yaml
│ └── preview.yaml
└── .opentofu-version
```

### ECS with Ecspresso (Deprecated)

:::warning
The ecspresso-based approach is deprecated. For new projects, use [ECS with Atmos](/layers/software-delivery/ecs-atmos/) instead.
:::

<details>
<summary>View deprecated ecspresso workflow structure</summary>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these should be on the given page for the implementation. For instance move ECS with Atmos (Recommended) to the ecs-atmos.mdx and ECS with Ecspresso to ecs-ecspresso.mdx

Or if it's a high-level description, it should be included in the tab content.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indentation

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you add this to refarch-scaffold?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no

Comment on lines +228 to +261
```yaml title="terraform/stacks/deps/vpc.yaml"
components:
terraform:
vpc:
metadata:
component: vpc
type: abstract
terraform_workspace: "{{ .vars.tenant }}-{{ .vars.environment }}-{{ .vars.deps_stage }}"
backend_type: s3
backend:
s3:
bucket: "acme-core-gbl-root-tfstate"
region: "us-east-1"
encrypt: true
key: terraform.tfstate
acl: bucket-owner-full-control
assume_role:
role_arn: "arn:aws:iam::111111111111:role/acme-core-gbl-root-tfstate-ro"
```

```yaml title="terraform/stacks/deps/ecs-cluster.yaml"
components:
terraform:
vpc:
metadata:
component: vpc
type: abstract
terraform_workspace: "{{ .vars.tenant }}-{{ .vars.environment }}-{{ .vars.deps_stage }}"
backend_type: s3
backend:
s3:
bucket: "acme-core-gbl-root-tfstate"
region: "us-east-1"
encrypt: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second YAML example appears to have a copy-paste error—it defines vpc: instead of ecs-cluster::

components:
terraform:
ecs-cluster: # <-- Should be ecs-cluster, not vpc
metadata:
component: ecs-cluster # <-- And here
...

- [ ] Container definitions configured in `terraform/stacks/default/app.yaml`
- [ ] `atmos terraform plan app -s preview` runs successfully
</TaskList>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add call to action for trigger workflows. See the CTA component

Comment on lines +18 to +29
### <StepNumber/> Create a Pull Request

Create a PR and add the `deploy` label to deploy a preview environment:

```bash
git checkout -b feature/test-preview
# Make changes
git push origin feature/test-preview
```

Then add the `deploy` label to the PR in GitHub.
</Step>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Where can the user see this preview environment? (github ui has deployment link)
  2. What are the different CI or CD steps that are being run for a preview environment? (add simple explanation)
  3. What cluster is this deployed to by default? (dev)


Then add the `deploy` label to the PR in GitHub.
</Step>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR clean up steps?

Comment on lines +32 to +45
### <StepNumber/> Merge PR into Main Branch

Push any change to the `main` branch to trigger the main branch workflow:

```bash
git add .
git commit -m "Initial setup"
git push origin main
```

This will:
- Build and push a Docker image to ECR
- Deploy to the `dev` environment
- Create a draft release
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. What CI or CD steps are being run now?
  2. Where can the engineer see the deployment?
  3. What ECS cluster is this deployed to? How is that determined?

Comment on lines +49 to +58
<Step>
### <StepNumber/> Publish a Release

Edit the draft release created by the main branch workflow and click "Publish release". This will:
- Promote the Docker image tag
- Deploy to `staging`
- Wait for approval (if configured)
- Deploy to `prod`
</Step>
</Steps>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Again, now what CI / CD steps are being run?
  2. Where can the engineer see the deployment?
  3. How do we configure approval?

Co-authored-by: Dan Miller <miller0daniel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants