File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ terraform {
2+ required_version = " >= 1.3.0"
3+
4+ required_providers {
5+ aws = {
6+ source = " hashicorp/aws"
7+ version = " >= 4.50"
8+ }
9+ random = {
10+ source = " hashicorp/random"
11+ version = " >= 3.0"
12+ }
13+ }
14+ }
15+
16+ provider "aws" {
17+ region = var. aws_region
18+ }
Original file line number Diff line number Diff line change 1+ variable "aws_region" {
2+ type = string
3+ default = " ap-south-1"
4+ }
5+
6+ variable "account_id" {
7+ description = " AWS account id where the role and state artifacts will be created"
8+ type = string
9+ default = " "
10+ }
11+
12+ variable "github_org" {
13+ description = " GitHub organization owning the repos (used in OIDC trust). Example: thedevopstooling"
14+ type = string
15+ default = " thedevopstooling"
16+ }
17+
18+ variable "github_repo" {
19+ description = " Optional: restrict trust to a single repo. If empty, allows the whole org (repo:*)."
20+ type = string
21+ default = " "
22+ }
23+
24+ variable "role_name" {
25+ description = " IAM Role name to create"
26+ type = string
27+ default = " thedevopstooling-GitHubActions-Terraform-Role"
28+ }
29+
30+ variable "allowed_ref" {
31+ description = " Allowed Git ref pattern for assumption. Example: 'refs/heads/main' or 'refs/tags/*'."
32+ type = string
33+ default = " refs/heads/main"
34+ }
35+
36+ variable "state_bucket_prefix" {
37+ description = " Prefix for the S3 state bucket name (a random suffix will be added for uniqueness)"
38+ type = string
39+ default = " thedevopstooling-terraform-state"
40+ }
41+
42+ variable "dynamodb_table_name" {
43+ description = " DynamoDB table name for Terraform state locking"
44+ type = string
45+ default = " thedevopstooling-terraform-lock"
46+ }
You can’t perform that action at this time.
0 commit comments