Skip to content

Commit dcd2285

Browse files
VIA-102 AJ/AS Deploys successfully
1 parent 9982d85 commit dcd2285

File tree

7 files changed

+106
-9
lines changed

7 files changed

+106
-9
lines changed

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

Lines changed: 41 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
locals {
2-
region = "eu-west-2"
3-
project_identifier = "vaccinations-app"
4-
environment = "dev"
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+
}
511
}
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+
}

infrastructure/environments/dev/provider.tf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ terraform {
1919
provider "aws" {
2020
region = local.region
2121
default_tags {
22-
tags = {
23-
ManagedBy = "Terraform"
24-
Project = local.project_identifier
25-
Environment = local.environment
26-
}
22+
tags = local.default_tags
2723
}
2824
}
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)