generated from masterpointio/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: begins the work to support single vs multi root_module_structure (
#17) ## what - This is a first cut at supporting `MultiInstance` vs `SingleInstance` root module structures. - Adds an additional example for the single-instance work. - Both examples are now applied to our masterpoint Spacelift tenant. - Work on the README to explain Multi vs Single. Please read and provide critical feedback. - Includes an update to renovate to automerge PRs for non major revs. ## why - People structure their terraform and root modules in different ways. We need to support both. ## references - Some discussion in Slack: https://masterpoint.slack.com/archives/C04MUCKUDKK/p1734543200130119 - Original design session with @gberenice + @oycyc on this topic: https://app.fireflies.ai/view/Spacelift-Automation-Airtable-Design::cNXp0mkZEAUuzhLm <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced automated merging of specific dependency updates in configuration. - Added support for AWS integration with new settings. - New variable for configuring the length of generated names. - New module for automation with AWS integration settings. - Enhanced stack settings for better management and description. - **Bug Fixes** - Updated variable names for clarity and consistency. - **Documentation** - Improved README documentation for better clarity on module usage and structure. - Added examples and distinctions between MultiInstance and SingleInstance structures. - **Chores** - Updated GitHub Actions workflow with a new environment variable for API key endpoint. - Removed outdated backend configuration file. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Veronika Gnilitska <30597968+gberenice@users.noreply.github.com>
- Loading branch information
Showing
33 changed files
with
423 additions
and
101 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
File renamed without changes.
File renamed without changes.
18 changes: 0 additions & 18 deletions
18
examples/complete/components/spacelift-automation/backend.tf.json
This file was deleted.
Oops, something went wrong.
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
1 change: 0 additions & 1 deletion
1
examples/complete/components/spacelift-automation/stacks/common.yaml
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,5 +1,4 @@ | ||
stack_settings: | ||
administrative: true | ||
aws_integration_enabled: true | ||
labels: | ||
- common_label |
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
1 change: 1 addition & 0 deletions
1
examples/single-instance/root-modules/random-pet/default.auto.tfvars
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 @@ | ||
length = 10 |
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,3 @@ | ||
resource "random_pet" "template" { | ||
length = var.length | ||
} |
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 @@ | ||
stack_settings: | ||
manage_state: true | ||
description: This stack generates random pet names | ||
labels: | ||
- common_label | ||
- stack_specific_label | ||
default_tf_workspace_enabled: true |
4 changes: 4 additions & 0 deletions
4
examples/single-instance/root-modules/random-pet/variables.tf
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,4 @@ | ||
variable "length" { | ||
description = "The length of the random name" | ||
type = number | ||
} |
10 changes: 10 additions & 0 deletions
10
examples/single-instance/root-modules/random-pet/versions.tf
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,10 @@ | ||
terraform { | ||
required_version = "~> 1.0" | ||
|
||
required_providers { | ||
random = { | ||
source = "hashicorp/random" | ||
version = "~> 3.0" | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
examples/single-instance/root-modules/rds-cluster-dev/main.tf
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 @@ | ||
resource "null_resource" "example" { | ||
triggers = { | ||
timestamp = timestamp() | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
examples/single-instance/root-modules/rds-cluster-dev/stack.yaml
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,2 @@ | ||
stack_settings: | ||
description: This is a mock root module for Dev |
10 changes: 10 additions & 0 deletions
10
examples/single-instance/root-modules/rds-cluster-dev/versions.tf
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,10 @@ | ||
terraform { | ||
required_version = "~> 1.0.0" | ||
|
||
required_providers { | ||
null = { | ||
source = "hashicorp/null" | ||
version = "~> 3.0" | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
examples/single-instance/root-modules/rds-cluster-prod/main.tf
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 @@ | ||
resource "null_resource" "example" { | ||
triggers = { | ||
timestamp = timestamp() | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
examples/single-instance/root-modules/rds-cluster-prod/stack.yaml
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,2 @@ | ||
stack_settings: | ||
description: This is a mock root module for Prod |
10 changes: 10 additions & 0 deletions
10
examples/single-instance/root-modules/rds-cluster-prod/versions.tf
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,10 @@ | ||
terraform { | ||
required_version = "~> 1.0.0" | ||
|
||
required_providers { | ||
null = { | ||
source = "hashicorp/null" | ||
version = "~> 3.0" | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
examples/single-instance/root-modules/spacelift-automation-example2/main.tf
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,15 @@ | ||
module "automation" { | ||
source = "../../../../" | ||
|
||
github_enterprise = { | ||
namespace = "masterpointio" | ||
} | ||
repository = "terraform-spacelift-automation" | ||
root_modules_path = "../../../../examples/single-instance/root-modules" | ||
all_root_modules_enabled = true | ||
|
||
aws_integration_id = "01JEC7ZACVKHTSVY4NF8QNZVVB" | ||
aws_integration_enabled = true | ||
|
||
root_module_structure = "SingleInstance" | ||
} |
8 changes: 8 additions & 0 deletions
8
examples/single-instance/root-modules/spacelift-automation-example2/stack.yaml
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,8 @@ | ||
stack_settings: | ||
description: This Automation stack is used for Masterpoint's testing purposes | ||
administrative: true | ||
aws_integration_enabled: false | ||
labels: | ||
- common_label | ||
- stack_specific_label | ||
default_tf_workspace_enabled: true |
10 changes: 10 additions & 0 deletions
10
examples/single-instance/root-modules/spacelift-automation-example2/versions.tf
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,10 @@ | ||
terraform { | ||
required_version = "~> 1.0" | ||
|
||
required_providers { | ||
spacelift = { | ||
source = "spacelift-io/spacelift" | ||
version = "~> 1.14" | ||
} | ||
} | ||
} |
Oops, something went wrong.