Skip to content

Commit

Permalink
Merge pull request #48 from SadriG91/master
Browse files Browse the repository at this point in the history
upgraded to TF 0.14 and updated dependencies
added default packer_ami to variables
  • Loading branch information
SadriG91 authored May 6, 2021
2 parents 5e67c52 + 14d0a34 commit 0993d0b
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.* text eol=lf
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ jobs:
with: { go-version: 1.14 }

- name: Install Terraform
run: |
curl -sL https://releases.hashicorp.com/terraform/0.12.21/terraform_0.12.21_linux_amd64.zip -o terraform.zip
sudo unzip terraform.zip -d /usr/bin && rm -f terraform.zip
uses: hashicorp/setup-terraform@v1
with: { terraform_version: 0.14.9 }

- name: Install Taskfile
run: curl -sL https://taskfile.dev/install.sh | sh
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ tasks:
cd $d
echo "${BOLD}$PWD:${NORM}"
if ! terraform fmt -check=true -list=false -recursive=false; then
if ! terraform fmt -check=true -list=false -recursive=true; then
echo " ✗ terraform fmt" && exit 1
else
echo " √ terraform fmt"
Expand Down
56 changes: 56 additions & 0 deletions examples/basic/.terraform.lock.hcl

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

7 changes: 3 additions & 4 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
terraform {
required_version = ">= 0.12"
required_version = ">= 0.14"
}

provider "aws" {
version = ">= 2.17"
region = "${var.region}"
region = var.region
}

data "aws_vpc" "main" {
Expand All @@ -17,7 +16,7 @@ data "aws_subnet_ids" "main" {

module "postgres" {
source = "telia-oss/rds-cluster/aws"
version = "3.0.0"
version = "4.0.0"

name_prefix = var.name_prefix
username = "superuser"
Expand Down
3 changes: 2 additions & 1 deletion examples/basic/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ variable "name_prefix" {
}

variable "packer_ami" {
type = string
type = string
default = "ami-063d4ab14480ac177"
}

variable "concourse_admin_password" {
Expand Down
9 changes: 9 additions & 0 deletions examples/basic/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
}
}
required_version = ">= 0.14"
}
10 changes: 5 additions & 5 deletions modules/atc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ resource "aws_autoscaling_attachment" "internal_lb" {

module "atc" {
source = "telia-oss/asg/aws"
version = "3.2.0"
version = "4.0.0"

name_prefix = "${var.name_prefix}-atc"
user_data_base64 = data.template_cloudinit_config.atc.rendered
Expand Down Expand Up @@ -225,9 +225,9 @@ resource "aws_route53_record" "main" {

module "external_lb" {
source = "telia-oss/loadbalancer/aws"
version = "3.0.0"
version = "4.0.0"

name_prefix = "${var.name_prefix}"
name_prefix = var.name_prefix
vpc_id = var.vpc_id
subnet_ids = var.public_subnet_ids
type = "application"
Expand Down Expand Up @@ -281,9 +281,9 @@ resource "aws_lb_target_group" "external" {

module "internal_lb" {
source = "telia-oss/loadbalancer/aws"
version = "3.0.0"
version = "4.0.0"

name_prefix = "${var.name_prefix}"
name_prefix = var.name_prefix
vpc_id = var.vpc_id
subnet_ids = var.private_subnet_ids
type = "network"
Expand Down
2 changes: 1 addition & 1 deletion modules/atc/versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

terraform {
required_version = ">= 0.12"
required_version = ">= 0.14"
}
4 changes: 2 additions & 2 deletions modules/dashboard/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ locals {
"AWS/NATGateway",
"BytesInFromDestination",
"NatGatewayId",
"${id}",
id,
{
stat = "Average"
id = "nat-${i + 1}-inbound"
Expand All @@ -23,7 +23,7 @@ locals {
"AWS/NATGateway",
"BytesInFromSource",
"NatGatewayId",
"${id}",
id,
{
stat = "Average"
id = "nat-${i + 1}-outbound"
Expand Down
2 changes: 1 addition & 1 deletion modules/dashboard/versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

terraform {
required_version = ">= 0.12"
required_version = ">= 0.14"
}
2 changes: 1 addition & 1 deletion modules/worker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resource "aws_security_group_rule" "atc_ingress_garden" {

module "worker" {
source = "telia-oss/asg/aws"
version = "3.2.0"
version = "4.0.0"

name_prefix = "${var.name_prefix}-worker"
user_data_base64 = data.template_cloudinit_config.worker.rendered
Expand Down

0 comments on commit 0993d0b

Please sign in to comment.