Skip to content

Commit

Permalink
Add remote reusable deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
micbegin committed Mar 26, 2024
1 parent 3c532e0 commit d07e378
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
pull-requests: write # This is required to add comments to Pull Requests
deployments: write # This is required to deactivate deployments

on:
workflow_dispatch:
pull_request:
paths:
- "**.tf*"
- ".github/workflows/deploy.yml"
push:
branches:
- "main"
paths:
- "**.tf*"
- ".github/workflows/deploy.yml"

concurrency:
group: ${{ github.ref }}
cancel-in-progress: false

jobs:
deploy-dev:
name: Dev Deployment
uses: aws-samples/aws-terraform-reusable-workflow/.github/workflows/[email protected]
with:
deploy: true
tf-version: ${{ vars.TF_VERSION }}
tf-organization: ${{ vars.TF_ORGANIZATION }}
tf-hostname: ${{ vars.TF_HOSTNAME }}
tf-workspace: ${{ vars.APP_NAME }}-dev
aws-region: "us-west-2"
environment: "dev"
ref: v1.2.0
local-execution-mode: true
secrets:
tf-token: ${{ secrets.TF_TOKEN }}
terraform-execution-iam-plan-role-arn: ${{ secrets.DEV_AWS_PLAN_ROLE_ARN }}
terraform-execution-iam-apply-role-arn: ${{ secrets.DEV_AWS_APPLY_ROLE_ARN }}
extra-args: ${{ secrets.DEV_EXTRA_ARGS }}
deploy-test:
needs: deploy-dev
name: Test Deployment
uses: aws-samples/aws-terraform-reusable-workflow/.github/workflows/[email protected]
with:
deploy: true
tf-version: ${{ vars.TF_VERSION }}
tf-organization: ${{ vars.TF_ORGANIZATION }}
tf-hostname: ${{ vars.TF_HOSTNAME }}
tf-workspace: ${{ vars.APP_NAME }}-test
aws-region: "us-west-2"
environment: "test"
ref: v1.2.0
local-execution-mode: true
secrets:
tf-token: ${{ secrets.TF_TOKEN }}
terraform-execution-iam-plan-role-arn: ${{ secrets.TEST_AWS_PLAN_ROLE_ARN }}
terraform-execution-iam-apply-role-arn: ${{ secrets.TEST_AWS_APPLY_ROLE_ARN }}
extra-args: ${{ secrets.TEST_EXTRA_ARGS }}
28 changes: 28 additions & 0 deletions envs/dev/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
environment = "dev"
cluster_suffix = "01"
vpc_name = "eks-vpc"
region = "us-west-2"
tenant_name = "demo"
enable_endpoint_public_access = true

route53_hosted_zone_id = "Z0053446TEDTI1D9V3U9"
route53_hosted_zone_name = "micbegin.people.aws.dev"

access_entries = {
admins = {
role_name = "eks-admins"
policy_associations = {
cluster_admin = {
policy_arn = "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy"
access_scope = {
namespaces = []
type = "cluster"
}
}
}
}
}

workloads_org = "aws-samples"
workloads_path = "argocd"
workloads_repo_url = "https://github.com/aws-samples/eks-blueprints-actions-workflow.git"

0 comments on commit d07e378

Please sign in to comment.