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

feat: Add terraform-deploy reusable workflow #59

Merged
merged 6 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update
  • Loading branch information
orfeas-k committed Sep 11, 2024
commit 6ad7d30d32d235df911f53d2ff45bb0b95f91cbf
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# Based on https://github.com/canonical/sunbeam-terraform/blob/9973905d24892903fab19ce691bbc5c28c53df0a/.github/workflows/deploy.yml
# For usage, refer to templates/terraform-deploy-usage-template.yaml
name: Deploy Terraform module
# Applies terraform module and wait for the application to go active or blocked.
name: Apply Terraform module

on:
workflow_call:
inputs:
module-directory:
description: The directory that stores the Terraform module. Defaults to `./terraform`.
required: false
type: string
default: ./terraform
model:
description: The model that the charm is deployed on. Defaults to `testing`.
required: false
Expand All @@ -20,10 +16,15 @@ on:
required: false
type: string
default: latest/stable
module-directory:
description: The directory that stores the Terraform module. Defaults to `./terraform`.
required: false
type: string
default: ./terraform
DnPlas marked this conversation as resolved.
Show resolved Hide resolved

jobs:
deploy:
name: Deploy Terraform
apply:
name: Apply Terraform
runs-on: ubuntu-20.04
steps:
- name: Checkout
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# trigger workflow
jobs:
terraform-deploy:
name: Deploy Terraform
terraform-apply:
name: Apply
uses: canonical/charmed-kubeflow-workflows/.github/workflows/terraform-deploy.yaml@main
with:
# Defaults to "testing"
Expand All @@ -9,8 +10,4 @@ jobs:
channel: latest/edge
# Add the line below for multi-charm repos. For single-repo repositories, it can be
# omitted since the workflow was designed according to CC006 spec file structure conventions.
working-directory: charms/<charm-name>/terraform
# The following line is useful when there are no dependencies for a charm to go `active`. Otherwise,
# setting it to true will cause the workflow to timeout if the unit never goes to `active`.
workload-check: true

module-directory: charms/<charm-name>/terraform