Skip to content

Commit 39b2c45

Browse files
VIA-102 AJ/AS Deploys successfully
1 parent 6a7d1ef commit 39b2c45

File tree

7 files changed

+155
-0
lines changed

7 files changed

+155
-0
lines changed

infrastructure/environments/dev/.terraform.lock.hcl

Lines changed: 65 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
locals {
2+
region = "eu-west-2"
3+
project_identifier = "vaccinations-app"
4+
project_identifier_shortcode = "vita"
5+
environment = "dev"
6+
default_tags = {
7+
ManagedBy = "Terraform"
8+
Project = local.project_identifier
9+
Environment = local.environment
10+
}
11+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module "deploy" {
2+
source = "../../modules/deploy_app"
3+
4+
open-next-path = "../../../.open-next"
5+
prefix = local.project_identifier_shortcode
6+
default_tags = local.default_tags
7+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
terraform {
2+
required_providers {
3+
aws = {
4+
source = "hashicorp/aws"
5+
version = ">= 5.92.0"
6+
}
7+
}
8+
9+
backend "s3" {
10+
bucket = "vaccinations-app-tfstate"
11+
key = "terraform.tfstate"
12+
region = "eu-west-2"
13+
14+
use_lockfile = true
15+
encrypt = true
16+
}
17+
}
18+
19+
provider "aws" {
20+
region = local.region
21+
default_tags {
22+
tags = local.default_tags
23+
}
24+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
data "aws_caller_identity" "current" {}
2+
3+
module "deploy_app" {
4+
source = "RJPearson94/open-next/aws//modules/tf-aws-open-next-zone"
5+
version = ">= 3.4.0,< 3.5.0"
6+
open_next_version = "v3.5.3"
7+
8+
providers = {
9+
aws.server_function = aws.server_function
10+
aws.iam = aws.iam
11+
aws.dns = aws.dns
12+
aws.global = aws.global
13+
}
14+
15+
prefix = "${var.prefix}-${data.aws_caller_identity.current.account_id}"
16+
folder_path = var.open-next-path
17+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
provider "aws" {
2+
alias = "server_function"
3+
default_tags {
4+
tags = var.default_tags
5+
}
6+
}
7+
8+
provider "aws" {
9+
alias = "iam"
10+
default_tags {
11+
tags = var.default_tags
12+
}
13+
}
14+
15+
provider "aws" {
16+
alias = "dns"
17+
default_tags {
18+
tags = var.default_tags
19+
}
20+
}
21+
22+
provider "aws" {
23+
alias = "global"
24+
region = "us-east-1"
25+
default_tags {
26+
tags = var.default_tags
27+
}
28+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
variable "prefix" {}
2+
variable "open-next-path" {}
3+
variable "default_tags" {}

0 commit comments

Comments
 (0)