-
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.
jordi.bru
committed
May 20, 2024
1 parent
da6dc6c
commit 42f969b
Showing
6 changed files
with
101 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
**/terragrunt_variables.tf | ||
**/.terraform.lock.hcl | ||
**/*.zip | ||
**/backend.tf | ||
|
||
# Created by https://www.toptal.com/developers/gitignore/api/terraform,terragrunt | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=terraform,terragrunt | ||
|
||
### Terraform ### | ||
# Local .terraform directories | ||
**/.terraform/* | ||
|
||
# .tfstate files | ||
*.tfstate | ||
*.tfstate.* | ||
|
||
# Crash log files | ||
crash.log | ||
|
||
# Ignore any .tfvars files that are generated automatically for each Terraform run. Most | ||
# .tfvars files are managed as part of configuration and so should be included in | ||
# version control. | ||
# | ||
# example.tfvars | ||
|
||
# Ignore override files as they are usually used to override resources locally and so | ||
# are not checked in | ||
override.tf | ||
override.tf.json | ||
*_override.tf | ||
*_override.tf.json | ||
|
||
# Include override files you do wish to add to version control using negated pattern | ||
# !example_override.tf | ||
|
||
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan | ||
# example: *tfplan* | ||
|
||
### Terragrunt ### | ||
# terragrunt cache directories | ||
**/.terragrunt-cache/* | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/terraform,terragrunt | ||
|
||
### VSCode ### | ||
.vscode/ |
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 @@ | ||
# More on CODEOWNERS files: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners | ||
|
||
# Path # Maintainer | ||
* @JordiiBru |
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 @@ | ||
# More on: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#attribute-reference |
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 @@ | ||
terraform { | ||
required_version = ">= 1.5.0" | ||
|
||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 5.0" | ||
} | ||
} | ||
} | ||
|
||
provider "aws" { | ||
region = "eu-west-1" | ||
profile = "aws-jordi-account" | ||
} |
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,35 @@ | ||
# REQUIRED VARIABLES | ||
|
||
variable "stage" { | ||
description = "Stage of development" | ||
type = string | ||
|
||
validation { | ||
condition = can(regex("^(test|dev|stagin|prod)$", var.stage)) | ||
error_message = "Stage must be dev, staging or prod." | ||
} | ||
} | ||
|
||
variable "purpose" { | ||
description = "Short description about the created resource" | ||
type = string | ||
default = null | ||
|
||
validation { | ||
condition = can(regex("^([a-zA-Z0-9-_]*)$", var.purpose)) | ||
error_message = "Only the expression [a-zA-Z0-9-_]* is allowed." | ||
} | ||
} | ||
|
||
variable "owner" { | ||
description = "Owner of the deployed infrastructure" | ||
type = string | ||
default = null | ||
|
||
validation { | ||
condition = length(var.owner) >= 3 | ||
error_message = "You must define an owner with more than three letters." | ||
} | ||
} | ||
|
||
# OPTIONAL VARIABLES |