tfskel demo: Multi-Customer Deployment Using Dedicated Root Modules#2
Open
tfskel demo: Multi-Customer Deployment Using Dedicated Root Modules#2
Conversation
ran: `tfskel init` Signed-off-by: ishuar <ishansharma887@gmail.com>
|
Terraform plan for envs/dev/eu-central-1/customer-1 Plan: 1 to add, 0 to change, 0 to destroy.Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# aws_s3_bucket.tfskel_demo will be created
+ resource "aws_s3_bucket" "tfskel_demo" {
+ acceleration_status = (known after apply)
+ acl = (known after apply)
+ arn = (known after apply)
+ bucket = "my-customer-1-dev-euc1-bucket"
+ bucket_domain_name = (known after apply)
+ bucket_namespace = (known after apply)
+ bucket_prefix = (known after apply)
+ bucket_region = (known after apply)
+ bucket_regional_domain_name = (known after apply)
+ force_destroy = false
+ hosted_zone_id = (known after apply)
+ id = (known after apply)
+ object_lock_enabled = (known after apply)
+ policy = (known after apply)
+ region = "eu-central-1"
+ request_payer = (known after apply)
+ tags = {
+ "Name" = "my-customer-1-dev-euc1-bucket"
}
+ tags_all = {
+ "Name" = "my-customer-1-dev-euc1-bucket"
+ "app" = "customer-1"
+ "env" = "dev"
+ "github_repo" = "tfskel-demo"
+ "managed_by" = "terraform"
}
+ website_domain = (known after apply)
+ website_endpoint = (known after apply)
+ cors_rule (known after apply)
+ grant (known after apply)
+ lifecycle_rule (known after apply)
+ logging (known after apply)
+ object_lock_configuration (known after apply)
+ replication_configuration (known after apply)
+ server_side_encryption_configuration (known after apply)
+ versioning (known after apply)
+ website (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.📝 Plan generated in TF plan & apply envs/dev/eu-central-1/customer-1 terraform files #4 |
c614b52 to
f859e15
Compare
Signed-off-by: ishuar <ishansharma887@gmail.com>
f859e15 to
6dd6e5a
Compare
ran: `tfskel scaffold customer-1 --env dev --region eu-central-1` Signed-off-by: ishuar <ishansharma887@gmail.com>
ran: `tfskel scaffold customer-2 --env dev --region eu-central-1` Signed-off-by: ishuar <ishansharma887@gmail.com>
|
Terraform plan for envs/dev/eu-central-1/customer-2 Plan: 1 to add, 0 to change, 0 to destroy.Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# aws_s3_bucket.tfskel_demo will be created
+ resource "aws_s3_bucket" "tfskel_demo" {
+ acceleration_status = (known after apply)
+ acl = (known after apply)
+ arn = (known after apply)
+ bucket = "my-customer-2-dev-euc1-bucket"
+ bucket_domain_name = (known after apply)
+ bucket_namespace = (known after apply)
+ bucket_prefix = (known after apply)
+ bucket_region = (known after apply)
+ bucket_regional_domain_name = (known after apply)
+ force_destroy = false
+ hosted_zone_id = (known after apply)
+ id = (known after apply)
+ object_lock_enabled = (known after apply)
+ policy = (known after apply)
+ region = "eu-central-1"
+ request_payer = (known after apply)
+ tags = {
+ "Name" = "my-customer-2-dev-euc1-bucket"
}
+ tags_all = {
+ "Name" = "my-customer-2-dev-euc1-bucket"
+ "app" = "customer-2"
+ "env" = "dev"
+ "github_repo" = "tfskel-demo"
+ "managed_by" = "terraform"
}
+ website_domain = (known after apply)
+ website_endpoint = (known after apply)
+ cors_rule (known after apply)
+ grant (known after apply)
+ lifecycle_rule (known after apply)
+ logging (known after apply)
+ object_lock_configuration (known after apply)
+ replication_configuration (known after apply)
+ server_side_encryption_configuration (known after apply)
+ versioning (known after apply)
+ website (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.📝 Plan generated in TF plan & apply envs/dev/eu-central-1/customer-2 terraform files #1 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR demonstrates the approach for deploying the same Terraform root module configuration across multiple customers while maintaining strict isolation of configuration, Separate github workflows and state per customer.
v0.5.2Expand to view tfskel plan analysis in CI for easier reviews
go: downloading github.com/ishuar/tfskel v0.5.2 tfskel version 0.5.2 [INFO ] Reviewing terraform plan... [INFO ] JSON plan file: .dflook-terraform-github-actions/mentijdf/plan.json [INFO ] Found 1 resource changes ━━━ Terraform Plan Analysis ━━━ Terraform Version: 1.13.5 Summary ╭────────────────────────────────────────────────────────┬───────────────────────────────────────────────────────╮ │ Total Changes│ 1 │ │ Additions│ 1 │ │ Modifications│ 0 │ │ Deletions│ 0 │ │ Replacements│ 0 │ ╰────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────╯ Changes by Resource Type ╭────────────────────────────────────────────────────────┬───────────────────────────────────────────────────────╮ │ Name │ Count │ ├────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────┤ │aws_s3_bucket │ 1 │ ╰────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────╯ Changes by Severity ╭────────────────────────────────────────────────────────┬───────────────────────────────────────────────────────╮ │ Name │ Count │ ├────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────┤ │low │ 1 │ ╰────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────╯ Resource Changes (detailed) Showing 1 resources Error: exit code 1 ╭────────────────────────────┬───────────────────────────┬───────────────────────────┬───────────────────────────╮ │ Resource │ Type │ Action │ Severity │ ├────────────────────────────┼───────────────────────────┼───────────────────────────┼───────────────────────────┤ │tfskel_demo │aws_s3_bucket │ create │ low │ ╰────────────────────────────┴───────────────────────────┴───────────────────────────┴───────────────────────────╯ [WARN ] Changes detected - exiting with code 1 Error: Process completed with exit code 1.