Skip to content

Commit 5980754

Browse files
adityatapsclaude
andcommitted
refactor: consolidate backend config into versions.tf across all modules
Merges the separate backend.tf terraform{} block into versions.tf so each module has a single terraform{} block. Prevents Terraform from writing auto-detected required_providers into backend.tf (alphabetically first), which caused duplicate provider errors on subsequent applies. Also skips apply prompt for modules with no planned changes, and updates create-aws-account.sh to scaffold new accounts with the consolidated layout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 517fbcc commit 5980754

25 files changed

Lines changed: 73 additions & 81 deletions

File tree

providers/aws/accounts/certs/tapshalkar-com-certs/backend.tf

Lines changed: 0 additions & 6 deletions
This file was deleted.

providers/aws/accounts/certs/tapshalkar-com-certs/versions.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ terraform {
66
version = "~> 5.0"
77
}
88
}
9+
10+
backend "gcs" {
11+
# bucket is set via -backend-config or backend.hcl (gitignored)
12+
prefix = "aws/accounts/certs/tapshalkar-com-certs"
13+
}
914
}
1015

1116
provider "aws" {

providers/aws/accounts/management/tapshalkar-com/backend.tf

Lines changed: 0 additions & 6 deletions
This file was deleted.

providers/aws/accounts/management/tapshalkar-com/versions.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ terraform {
66
version = "~> 5.0"
77
}
88
}
9+
10+
backend "gcs" {
11+
# bucket is set via -backend-config or backend.hcl (gitignored)
12+
prefix = "aws/accounts/management"
13+
}
914
}
1015

1116
provider "aws" {

providers/aws/accounts/personal/tapshalkar-com-personal/backend.tf

Lines changed: 0 additions & 6 deletions
This file was deleted.

providers/aws/accounts/personal/tapshalkar-com-personal/versions.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ terraform {
66
version = "~> 5.0"
77
}
88
}
9+
10+
backend "gcs" {
11+
# bucket is set via -backend-config or backend.hcl (gitignored)
12+
prefix = "aws/accounts/personal/tapshalkar-com-personal"
13+
}
914
}
1015

1116
provider "aws" {

providers/aws/accounts/personal/tapshalkar-com-sandbox/backend.tf

Lines changed: 0 additions & 6 deletions
This file was deleted.

providers/aws/accounts/personal/tapshalkar-com-sandbox/versions.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ terraform {
66
version = "~> 5.0"
77
}
88
}
9+
10+
backend "gcs" {
11+
# bucket is set via -backend-config or backend.hcl (gitignored)
12+
prefix = "aws/accounts/personal/tapshalkar-com-sandbox"
13+
}
914
}
1015

1116
provider "aws" {

providers/aws/org/backend.tf

Lines changed: 0 additions & 6 deletions
This file was deleted.

providers/aws/org/versions.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ terraform {
66
version = "~> 5.0"
77
}
88
}
9+
10+
backend "gcs" {
11+
# bucket is set via -backend-config or backend.hcl (gitignored)
12+
prefix = "aws/org"
13+
}
914
}
1015

1116
provider "aws" {

0 commit comments

Comments
 (0)