Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
burib authored Nov 13, 2024
0 parents commit b72fb2c
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Terraform Module Release"

permissions:
id-token: write
issues: write
contents: write
pull-requests: write

on:
workflow_dispatch:
push:
branches:
- main
- master
jobs:
terraform_module_release:
if: github.repository != 'burib/terraform-aws-module-template'
uses: BuriCloud/github-workflows/.github/workflows/release.yml@main
with:
release-type: "terraform-module"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.idea
.vscode
.terraform
.terraform.lock.hcl
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# terraform-aws-module-template

## github template to start writing versioned terraform module
2 changes: 2 additions & 0 deletions data.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
data "aws_caller_identity" "current" {}
data "aws_region" "current" {}
4 changes: 4 additions & 0 deletions locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
locals {
region = data.aws_region.current.name
account_id = data.aws_caller_identity.current.account_id
}
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

14 changes: 14 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
output "environment" {
value = var.environment
description = "Environment where this stack has been deployed to."
}

output "region" {
value = local.region
description = "AWS Region code where this stack has been deployed to."
}

output "account_id" {
value = local.account_id
description = "AWS Account ID where this stack has been deployed to."
}
10 changes: 10 additions & 0 deletions providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
terraform {
required_version = "~> 1.0" # allow only 1.x versions.

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0" # minimum 5.x is required to be able to use this module
}
}
}
15 changes: 15 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
variable "environment" {
description = <<EOF
Environment variable used to tag resources created by this module.
**Example values are:**
- temp
- dev
- staging
- prod
**Notes:**
Put here your notes if there is any.
EOF
type = string
}

0 comments on commit b72fb2c

Please sign in to comment.