Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update readme #115

Merged
merged 3 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/aurora-manage-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This action is a `composite` action.
## Usage

```yaml
- uses: camunda/camunda-tf-eks-module/aurora-manage-cluster@main
- uses: camunda/camunda-tf-eks-module/.github/actions/aurora-manage-cluster@main
with:
cluster-name:
# Name of the RDS Aurora cluster to deploy
Expand Down
13 changes: 5 additions & 8 deletions .github/actions/aurora-manage-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ inputs:
description: Path where the tf Aurora modules will be cloned
default: ./.action-tf-modules/aurora/

# inherited from https://github.com/hashicorp/setup-terraform/blob/main/action.yml
# inherited from https://github.com/hashicorp/setup-terraform/blob/main/action.yml
tf-cli-config-credentials-hostname:
description: The hostname of a HCP Terraform/Terraform Enterprise instance to place within the credentials block of the Terraform CLI configuration
file. Defaults to `app.terraform.io`.
Expand Down Expand Up @@ -89,7 +89,7 @@ outputs:
description: URL of the Terraform state file in the S3 bucket
value: ${{ steps.utility.outputs.terraform-state-url }}

# Add all terraform outputs dynamically
# Add all terraform outputs dynamically
all-terraform-outputs:
description: All outputs from Terraform
value: ${{ steps.fetch_outputs.outputs.all_terraform_outputs }}
Expand All @@ -99,12 +99,9 @@ runs:
steps:
- name: Use Utility Actions
id: utility
# see https://github.com/orgs/community/discussions/41927 it's not possible to optimize this yet
# steps.uses cannot access the github context.
# uses: ${{ github.action_repository }}/utility-action@${{ github.action_ref }}
# TODO: hard pin this one once it's merged
#uses: "camunda/camunda-tf-eks-module/utility-action@main"
uses: ./.github/actions/utility-action
# see https://github.com/orgs/community/discussions/41927 it's not possible to optimize this yet
# steps.uses cannot access the github context.
uses: camunda/camunda-tf-eks-module/.github/actions/utility-action@0471f79273b42e0056f780ac854292e763604443 # main
with:
awscli-version: ${{ inputs.awscli-version }}
terraform-version: ${{ inputs.terraform-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/eks-cleanup-resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This action is a `composite` action.
## Usage

```yaml
- uses: camunda/camunda-tf-eks-module/eks-cleanup-resources@main
- uses: camunda/camunda-tf-eks-module/.github/actions/eks-cleanup-resources@main
with:
tf-bucket:
# Bucket containing the resources states
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/eks-manage-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ This action is a `composite` action.
## Usage

```yaml
- uses: camunda/camunda-tf-eks-module/eks-manage-cluster@main
- uses: camunda/camunda-tf-eks-module/.github/actions/eks-manage-cluster@main
with:
aws-region:
# AWS region where the EKS cluster will be deployed
Expand Down
15 changes: 6 additions & 9 deletions .github/actions/eks-manage-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ description: |
This GitHub Action automates the deployment of an EKS (Amazon Elastic Kubernetes Service) cluster using Terraform.
This action will also install Terraform, awscli, and kubectl. The kube context will be set on the created cluster.


inputs:
aws-region:
description: AWS region where the EKS cluster will be deployed
Expand Down Expand Up @@ -40,7 +39,7 @@ inputs:
description: Authenticate the current kube context on the created cluster
default: 'true'

# inherited from https://github.com/hashicorp/setup-terraform/blob/main/action.yml
# inherited from https://github.com/hashicorp/setup-terraform/blob/main/action.yml
tf-cli-config-credentials-hostname:
description: The hostname of a HCP Terraform/Terraform Enterprise instance to place within the credentials block of the Terraform CLI configuration
file. Defaults to `app.terraform.io`.
Expand Down Expand Up @@ -76,7 +75,7 @@ outputs:
description: URL of the Terraform state file in the S3 bucket
value: ${{ steps.utility.outputs.terraform-state-url }}

# Add all terraform outputs dynamically
# Add all terraform outputs dynamically
all-terraform-outputs:
description: All outputs from Terraform
value: ${{ steps.fetch_outputs.outputs.all_terraform_outputs }}
Expand All @@ -86,12 +85,10 @@ runs:
steps:
- name: Use Utility Actions
id: utility
# seehttps://github.com/orgs/community/discussions/41927 it's not possible to optimize this yet
# steps.uses cannot access the github context.
# uses: ${{ github.action_repository }}/utility-action@${{ github.action_ref }}
# TODO: hard pin this one once it's merged
#uses: "camunda/camunda-tf-eks-module/utility-action@main"
uses: ./.github/actions/utility-action
# see https://github.com/orgs/community/discussions/41927 it's not possible to optimize this yet
# steps.uses cannot access the github context.
# uses: ${{ github.action_repository }}/utility-action@${{ github.action_ref }}
uses: camunda/camunda-tf-eks-module/.github/actions/utility-action@0471f79273b42e0056f780ac854292e763604443 # main
with:
awscli-version: ${{ inputs.awscli-version }}
terraform-version: ${{ inputs.terraform-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/utility-action/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ This action is a `composite` action.
## Usage

```yaml
- uses: camunda/camunda-tf-eks-module/utility-action@main
- uses: camunda/camunda-tf-eks-module/.github/actions/utility-action@main
with:
awscli-version:
# Version of the AWS CLI to install
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/camunda/infraex-common-config
rev: 5a264b0 # TODO: replace with main onced it's merged
rev: 1b6f4d4738e54475692969d0e9b844674973e185 # use tags until renovate supports sha: https://github.com/renovatebot/renovate/issues/22567
hooks:
- id: update-action-readmes-docker

Expand Down
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
[![tests](https://github.com/camunda/camunda-tf-eks-module/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/camunda/camunda-tf-eks-module/actions/workflows/tests.yml)
[![License](https://img.shields.io/github/license/camunda/camunda-tf-eks-module)](LICENSE)

Terraform module which creates AWS EKS (Kubernetes) resources with an opinionated configuration targeting Camunda 8.
Terraform module which creates AWS EKS (Kubernetes) resources with an opinionated configuration targeting Camunda 8 and an AWS Aurora RDS cluster.

**⚠️ Warning:** This project is not intended for production use but rather for demonstration purposes only. There are no guarantees or warranties provided.

## Documentation

The related [guide](https://docs.camunda.io/docs/next/self-managed/setup/deploy/amazon/amazon-eks/eks-terraform/) describing a more detailed usage.
Consider installing Camunda 8 via [following guide](https://docs.camunda.io/docs/next/self-managed/setup/deploy/amazon/amazon-eks/eks-helm/) after having deployed the AWS EKS cluster.
The related [guide](https://docs.camunda.io/docs/next/self-managed/setup/deploy/amazon/amazon-eks/eks-terraform/) describes more detailed usage.
Consider installing Camunda 8 via [this guide](https://docs.camunda.io/docs/next/self-managed/setup/deploy/amazon/amazon-eks/eks-helm/) after deploying the AWS EKS cluster.

## Usage

Following is a simple example configuration and should be adjusted as required.
Below is a simple example configuration for deploying both an EKS cluster and an Aurora PostgreSQL database.

See [AWS EKS Cluster inputs](./modules/eks-cluster/README.md#inputs) and [AWS Aurora RDS inputs](./modules/aurora/README.md#inputs) for further configuration options and how they affect the cluster creation.
See [AWS EKS Cluster inputs](./modules/eks-cluster/README.md#inputs) and [AWS Aurora RDS inputs](./modules/aurora/README.md#inputs) for further configuration options and how they affect the cluster and database creation.

```hcl
module "eks_cluster" {
Expand Down Expand Up @@ -50,6 +50,14 @@ module "postgresql" {
}
```

#### GitHub Actions

You can automate the deployment and deletion of the EKS cluster and Aurora database using GitHub Actions. Below are examples of GitHub Actions workflows for deploying and deleting these resources.

For more details, refer to the corresponding [EKS Actions README](https://github.com/camunda/camunda-tf-eks-module/blob/main/.github/actions/eks-manage-cluster/README.md) and [Aurora Actions README](https://github.com/camunda/camunda-tf-eks-module/blob/main/.github/actions/aurora-manage-cluster/README.md), [Cleanup Actions README](https://github.com/camunda/camunda-tf-eks-module/blob/main/.github/actions/eks-cleanup-resources/README.md).

An example workflow can be found in https://github.com/camunda/camunda-tf-eks-module/blob/main/.github/workflows/test-gha-eks.yml.

## Support

Please note that the modules have been tested with **[Terraform](https://github.com/hashicorp/terraform)** in the version described in the [.tool-versions](./.tool-versions) of this project.