Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .terraform.lock.hcl

This file was deleted.

26 changes: 13 additions & 13 deletions examples/complete/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.84.0"
}
}
}

provider "aws" {
region = "ap-southeast-2"
}

# Fetch AWS Account ID dynamically
data "aws_caller_identity" "current" {}

Expand All @@ -10,8 +23,6 @@ resource "random_string" "suffix" {
module "s3_bucket" {
source = "../.."

region = "ap-southeast-2"

# General Configuration
bucket_name = "test-bucket"
bucket_suffix = random_string.suffix.result
Expand Down
26 changes: 13 additions & 13 deletions examples/minimal/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions examples/minimal/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.84.0"
}
}
}

provider "aws" {
region = "ap-southeast-2"
}

# Fetch AWS Account ID dynamically
data "aws_caller_identity" "current" {}

Expand All @@ -11,8 +24,6 @@ resource "random_string" "suffix" {
module "s3_bucket" {
source = "../.."

region = "ap-southeast-2"

# General Configuration
bucket_name = "test-bucket"
bucket_suffix = random_string.suffix.result
Expand Down
26 changes: 13 additions & 13 deletions examples/standard/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions examples/standard/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.84.0"
}
}
}

provider "aws" {
region = "ap-southeast-2"
}

# Fetch AWS Account ID dynamically
data "aws_caller_identity" "current" {}

Expand All @@ -11,8 +24,6 @@ resource "random_string" "suffix" {
module "s3_bucket" {
source = "../.."

region = "ap-southeast-2"

# General Configuration
bucket_name = "test-bucket"
bucket_suffix = random_string.suffix.result
Expand Down
15 changes: 0 additions & 15 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
############################################
# GENERAL CONFIGURATION
############################################

variable "region" {
description = "AWS region for the provider. Defaults to ap-southeast-2 if not specified."
type = string
default = "ap-southeast-2"

validation {
condition = can(regex("^([a-z]{2}-[a-z]+-\\d{1})$", var.region))
error_message = "Invalid AWS region format. Example: 'us-east-1', 'ap-southeast-2'."
}
}

############################################
# GENERAL BUCKET CONFIGURATION VARIABLES
############################################
Expand Down
4 changes: 0 additions & 4 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,3 @@ terraform {
}
}
}

provider "aws" {
region = var.region
}