Skip to content

Commit

Permalink
Merge pull request #141 from lmilbaum/tf
Browse files Browse the repository at this point in the history
Spin Test environment with Terraform
  • Loading branch information
sallyom authored Apr 2, 2024
2 parents 5820454 + f6a01f2 commit d7791d8
Showing 1 changed file with 44 additions and 5 deletions.
49 changes: 44 additions & 5 deletions .github/workflows/testing-framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,55 @@ on:

workflow_dispatch:


env:
REGISTRY: ghcr.io
# pull_request: ## temporary for debugging development purposes
# branches:
# - main

jobs:
build-and-push-image:
spin-test-environment:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
path: main

- name: Checkout terraform module
id: checkout-module
uses: actions/[email protected]
with:
repository: containers/terraform-test-environment-module
path: terraform-test-environment-module
ref: 'main'

- uses: hashicorp/[email protected]
- name: Setup Terraform
uses: hashicorp/[email protected]
with:
terraform_version: "1.7.5"
terraform_wrapper: false

- run: terraform init
id: init
working-directory: terraform-test-environment-module

- name: Plan
run: terraform plan
working-directory: terraform-test-environment-module
env:
TF_VAR_aws_region: "eu-west-2"
TF_VAR_aws_instance_type: "t3.large"
TF_VAR_aws_ami_owners: '["125523088429"]'
TF_VAR_aws_ami_name: '["Fedora-Cloud-Base-*"]'
TF_VAR_aws_volume_size: 100
TF_VAR_aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
TF_VAR_aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

# - name: Spin Test Environment
# id: apply
# run: TF_LOG=DEBUG terraform apply -auto-approve -lock=false
# working-directory: terraform-test-environment-module

# - name: Destroy Test Environment
# id: destroy
# if: always()
# run: TF_LOG=DEBUG terraform destroy -auto-approve -lock=false
# working-directory: terraform-test-environment-module

0 comments on commit d7791d8

Please sign in to comment.