From dcf79c26523b9ec151c8fbd08ff82f5009ef64e0 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Tue, 18 Jul 2023 09:58:58 -0700 Subject: [PATCH] fix: Update workflow_basic.tf.erb (#8369) --- .../terraform/examples/workflow_basic.tf.erb | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/mmv1/templates/terraform/examples/workflow_basic.tf.erb b/mmv1/templates/terraform/examples/workflow_basic.tf.erb index 45caf517b988..3369b4985048 100644 --- a/mmv1/templates/terraform/examples/workflow_basic.tf.erb +++ b/mmv1/templates/terraform/examples/workflow_basic.tf.erb @@ -9,30 +9,31 @@ resource "google_workflows_workflow" "<%= ctx[:primary_resource_id] %>" { description = "Magic" service_account = google_service_account.test_account.id source_contents = <<-EOF - # This is a sample workflow, feel free to replace it with your source code + # This is a sample workflow. You can replace it with your source code. # # This workflow does the following: # - reads current time and date information from an external API and stores - # the response in CurrentDateTime variable + # the response in currentTime variable # - retrieves a list of Wikipedia articles related to the day of the week - # from CurrentDateTime + # from currentTime # - returns the list of articles as an output of the workflow - # FYI, In terraform you need to escape the $$ or it will cause errors. + # + # Note: In Terraform you need to escape the $$ or it will cause errors. - getCurrentTime: call: http.get args: - url: https://us-central1-workflowsample.cloudfunctions.net/datetime - result: CurrentDateTime + url: https://timeapi.io/api/Time/current/zone?timeZone=Europe/Amsterdam + result: currentTime - readWikipedia: call: http.get args: url: https://en.wikipedia.org/w/api.php query: action: opensearch - search: $${CurrentDateTime.body.dayOfTheWeek} - result: WikiResult + search: $${currentTime.body.dayOfWeek} + result: wikiResult - returnOutput: - return: $${WikiResult.body[1]} + return: $${wikiResult.body[1]} EOF }