Created
June 12, 2023 15:57
-
-
Save anna-geller/f4642f4e85ee3cc9f344011ee4e6633b to your computer and use it in GitHub Desktop.
Deploy all flows that exist in the flows directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
kestra = { | |
source = "kestra-io/kestra" | |
version = "~> 0.7.0" | |
} | |
} | |
} | |
provider "kestra" { | |
url = "http://localhost:8080" | |
} | |
resource "kestra_flow" "flows" { | |
keep_original_source = true | |
for_each = fileset(path.module, "flows/*.yml") | |
flow_id = yamldecode(templatefile(each.value, {}))["id"] | |
namespace = yamldecode(templatefile(each.value, {}))["namespace"] | |
content = templatefile(each.value, {}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment