-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- chore: update and use terramate 0.8.0 - feat: Allow manual drift runs - fix: Terramate cloud preview link - chore: mark stack as terraform
- Loading branch information
Showing
38 changed files
with
199 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
terraform 1.7.5 | ||
terramate 0.8.0 | ||
pre-commit 3.6.2 | ||
opentofu 1.6.2 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
script "tofu" "deploy" { | ||
name = "OpenTofu Deployment" | ||
description = "Run a full OpenTofu deployment cycle and synchronize the result to Terramate Cloud." | ||
|
||
job { | ||
name = "OpenTofu Apply" | ||
description = "Initialize, validate, plan, and apply OpenTofu changes." | ||
commands = [ | ||
["tofu", "init", "-lock-timeout=5m"], | ||
["tofu", "validate"], | ||
["tofu", "plan", "-out", "plan.tfplan", "-lock=false"], | ||
["tofu", "apply", "-input=false", "-auto-approve", "-lock-timeout=5m", "plan.tfplan", { | ||
sync_deployment = true | ||
tofu_plan_file = "plan.tfplan" | ||
}], | ||
] | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
script "tofu" "detect-drift" { | ||
name = "OpenTofu Drift Check" | ||
description = "Detect drifts in OpenTofu configuration and synchronize it to Terramate Cloud." | ||
|
||
job { | ||
name = "OpenTofu Plan" | ||
description = "Initialize, validate, and plan OpenTofu changes." | ||
commands = [ | ||
["tofu", "init", "-lock-timeout=5m"], | ||
["tofu", "plan", "-out", "drift.tfplan", "-detailed-exitcode", "-lock=false", { | ||
sync_drift_status = true | ||
tofu_plan_file = "drift.tfplan" | ||
}], | ||
] | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
script "tofu" "preview" { | ||
name = "OpenTofu Deployment Preview" | ||
description = "Create a preview of OpenTofu Changes and synchronize it to Terramate Cloud." | ||
|
||
job { | ||
name = "OpenTofu Plan" | ||
description = "Initialize, validate, and plan OpenTofu changes." | ||
commands = [ | ||
["tofu", "init", "-lock-timeout=5m"], | ||
["tofu", "validate"], | ||
["tofu", "plan", "-out", "preview.tfplan", "-detailed-exitcode", "-lock=false", { | ||
sync_preview = true | ||
tofu_plan_file = "preview.tfplan" | ||
}], | ||
] | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
globals "terraform" "backend" { | ||
key = "opentofu/stacks/by-id/${terramate.stack.id}/opentofu.tfstate" | ||
} | ||
|
||
globals "terraform" { | ||
version = "1.6.2" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT | ||
|
||
terraform { | ||
backend "s3" { | ||
bucket = "terramate-example-terraform-state-backend" | ||
dynamodb_table = "terraform-lock" | ||
encrypt = true | ||
key = "opentofu/stacks/by-id/f50a9ef3-c5de-48ab-8acf-a60d91bfef7b/opentofu.tfstate" | ||
region = "us-east-1" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
stack { | ||
name = "Empty Stack" | ||
description = "An empty OpenTofu Stack" | ||
id = "f50a9ef3-c5de-48ab-8acf-a60d91bfef7b" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT | ||
|
||
terraform { | ||
required_version = "1.6.2" | ||
} | ||
terraform { | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = "~> 5.31" | ||
} | ||
} | ||
} | ||
provider "aws" { | ||
region = "us-east-1" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
script "init" { | ||
name = "OpenTofu Init" | ||
description = "Downloads the required provider plugins and modules and setting up the backend" | ||
|
||
job { | ||
commands = [ | ||
["tofu", "init", "-lock-timeout=5m"], | ||
] | ||
} | ||
} | ||
|
||
script "preview" { | ||
name = "OpenTofu Deployment Preview" | ||
description = "Create a preview of OpenTofu Changes and synchronize it to Terramate Cloud." | ||
|
||
job { | ||
commands = [ | ||
["tofu", "validate"], | ||
["tofu", "plan", "-out", "out.tfplan", "-detailed-exitcode", "-lock=false", { | ||
sync_preview = true | ||
tofu_plan_file = "out.tfplan" | ||
}], | ||
] | ||
} | ||
} | ||
|
||
script "deploy" { | ||
name = "OpenTofu Deployment" | ||
description = "Run a full OpenTofu deployment cycle and synchronize the result to Terramate Cloud." | ||
|
||
job { | ||
commands = [ | ||
["tofu", "validate"], | ||
["tofu", "plan", "-out", "out.tfplan", "-lock=false"], | ||
["tofu", "apply", "-input=false", "-auto-approve", "-lock-timeout=5m", "out.tfplan", { | ||
sync_deployment = true | ||
tofu_plan_file = "out.tfplan" | ||
}], | ||
] | ||
} | ||
} | ||
|
||
script "drift" "detect" { | ||
name = "OpenTofu Drift Check" | ||
description = "Detect drifts in OpenTofu configuration and synchronize it to Terramate Cloud." | ||
|
||
job { | ||
commands = [ | ||
["tofu", "plan", "-out", "out.tfplan", "-detailed-exitcode", "-lock=false", { | ||
sync_drift_status = true | ||
tofu_plan_file = "out.tfplan" | ||
}], | ||
] | ||
} | ||
} | ||
|
||
script "drift" "reconcile" { | ||
name = "OpenTofu Drift Reconciliation" | ||
description = "Reconciles drifts in all changed stacks." | ||
|
||
job { | ||
commands = [ | ||
["tofu", "plan", "-out", "drift.tfplan", "-detailed-exitcode", "-lock=false", { | ||
sync_drift_status = true | ||
tofu_plan_file = "drift.tfplan" | ||
}], | ||
] | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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