Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
573 B
Terraform
Raw Permalink Normal View History

2026-04-23 09:24:13 -04:00
# Copyright IBM Corp. 2020, 2026
# SPDX-License-Identifier: BUSL-1.1
terraform {
required_providers {
external = {
source = "hashicorp/external"
}
}
}
data "external" "repo_root" {
program = ["bash", "-c", "printf '{\"path\":\"%s\"}' \"$(git rev-parse --show-toplevel)\""]
}
data "external" "make_edition" {
program = ["bash", "-c", "edition=$(make -s -C '${data.external.repo_root.result.path}' edition | tr -d '\\r\\n') && printf '{\"edition\":\"%s\"}' \"$edition\""]
}
output "edition" {
value = data.external.make_edition.result.edition
}