Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
terraform 1.14.1
terramate 0.17.0-rc2
terramate 0.17.0-rc4
2 changes: 1 addition & 1 deletion bundles/example.com/account/v1/bundle.tm.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ define bundle {
}

scaffolding {
path = "/configs/accounts/${bundle.environment.id}/${tm_slug(bundle.input.account_alias.value)}.tm.yml"
path = "/configs/accounts/${tm_slug(bundle.input.account_alias.value)}.tm.yml"
name = tm_slug(bundle.input.account_alias.value)
}
}
1 change: 1 addition & 0 deletions bundles/example.com/account/v1/inputs.tm.hcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
define bundle {
input "account_alias" {
type = string
immutable = true
description = "A human-friendly alias for the account (e.g., 'my-prod-account')"

prompt {
Expand Down
2 changes: 1 addition & 1 deletion bundles/example.com/region/v1/bundle.tm.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ define bundle {
}

scaffolding {
path = "/configs/accounts/${bundle.environment.id}/${tm_slug(bundle.input.account.value)}/region_${tm_slug(bundle.input.region.value)}.tm.yml"
path = "/configs/accounts/${tm_slug(bundle.input.account.value)}/region_${tm_slug(bundle.input.region.value)}.tm.yml"
name = tm_slug(tm_join("-", [bundle.input.account.value, bundle.input.region.value]))

enabled {
Expand Down
2 changes: 2 additions & 0 deletions bundles/example.com/region/v1/inputs.tm.hcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
define bundle {
input "account" {
type = string
immutable = true
description = "The account alias to associate this region with"

prompt {
Expand All @@ -14,6 +15,7 @@ define bundle {

input "region" {
type = string
immutable = true
description = "The region identifier (e.g., us-east-1, eu-west-1)"

prompt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ spec:
# tmdoc: A human-friendly alias for the account
account_alias: demo-account

# tmdoc: The account identifier (e.g., AWS 12-digit account ID or GCP project ID)
account_id: "123456789012"
environments:
dev: {}
dev:
inputs:
account_id: "111111111111"
stg:
inputs:
account_id: "222222222222"
prd:
inputs:
account_id: "333333333333"
15 changes: 15 additions & 0 deletions configs/accounts/demo-account/region_eu-west-1.tm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: terramate.io/cli/v1
kind: BundleInstance
metadata:
name: demo-account-eu-west-1
uuid: 1deeb739-30f5-4897-9b94-9a1f7315823f
spec:
source: /bundles/example.com/region/v1
inputs:
# tmdoc: The account alias to associate this region with
account: demo-account
# tmdoc: The region identifier (e.g., us-east-1, eu-west-1)
region: eu-west-1

environments:
dev:
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ spec:
region: us-east-1
environments:
dev: {}
stg: {}
prd: {}
12 changes: 0 additions & 12 deletions configs/accounts/prd/demo-account.tm.yml

This file was deleted.

12 changes: 0 additions & 12 deletions configs/accounts/prd/demo-account/region_us-east-1.tm.yml

This file was deleted.

12 changes: 0 additions & 12 deletions configs/accounts/stg/demo-account.tm.yml

This file was deleted.

12 changes: 0 additions & 12 deletions configs/accounts/stg/demo-account/region_us-east-1.tm.yml

This file was deleted.

2 changes: 1 addition & 1 deletion terramate.tm.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terramate {
required_version = "0.17.0-rc2"
required_version = "0.17.0-rc4"
required_version_allow_prereleases = true

config {
Expand Down
Loading