Skip to content

Latest commit

 

History

History

import-yaml

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Terraform with imported YAML

This sample shows how to use Terraform's google_workflows_workflow resource to deploy a Workflow from a main workflow YAML file.

Terraform

You can see main.tf for Terraform and workflows.yaml for Workflows definitions.

  1. Initialize terraform:

    terraform init
  2. See the planned changes:

    terraform plan -var="project_id=YOUR-PROJECT-ID" -var="region=YOUR-GCP-REGION"
  3. Create workflow:

    terraform apply -var="project_id=YOUR-PROJECT-ID" -var="region=YOUR-GCP-REGION"
  4. Once workflow is created, you can see it in the list:

    gcloud workflows list --location YOUR-GCP-REGION
  5. Cleanup:

    terraform destroy -var="project_id=YOUR-PROJECT-ID" -var="region=YOUR-GCP-REGION"

Execute

You can optionally execute the workflow using gcloud:

gcloud workflows execute sample-workflow