Skip to content

Commit d1f685b

Browse files
committed
Fixed compatibility issues
1 parent 8471887 commit d1f685b

File tree

7 files changed

+59
-39
lines changed

7 files changed

+59
-39
lines changed

.github/workflows/pr-deploy-to-int.yml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ on:
1010
required: false
1111
default: ''
1212

13-
env:
14-
TF_CLI_ARGS_apply: --auto-approve
15-
1613
jobs:
1714
test-oidc:
1815
runs-on: ubuntu-latest
@@ -29,3 +26,41 @@ jobs:
2926

3027
- name: Whoami
3128
run: aws sts get-caller-identity
29+
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 1
34+
35+
- uses: hashicorp/setup-terraform@v3
36+
with:
37+
terraform_version: "1.12.2"
38+
39+
- name: Terraform Init
40+
working-directory: ./terraform_old
41+
run: |
42+
make init
43+
44+
45+
- name: Terraform Plan
46+
working-directory: ./terraform_old
47+
run: |
48+
make plan environment=green aws_account_no=int
49+
50+
# - name: Set up Python
51+
# id: setup_python
52+
# uses: actions/setup-python@v5
53+
# with:
54+
# python-version: "3.10.16" # this is for e2e tests
55+
56+
# - name: cache virtualenv
57+
# uses: actions/cache@v4
58+
# id: cache-venv
59+
# with:
60+
# path: ./.venv/
61+
# key: ${{ hashFiles('**/*requirements.txt') }}
62+
# restore-keys: ${{ hashFiles('**/*requirements.txt') }}
63+
64+
# - name: Install dependencies
65+
# if: steps.cache-venv.outputs.cache-hit != 'true'
66+
# run: make install-dev-requirements

terraform_old/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ tf_cmd = AWS_PROFILE=$(aws_profile) terraform
66

77
project_name = immunisation
88
project_short_name = imms
9-
state_bucket = $(BUCKET_NAME) #$(project_name)-$(APIGEE_ENVIRONMENT)-terraform-state-files
9+
state_bucket = immunisation-preprod-terraform-state-files
1010
tf_state= -backend-config="bucket=$(state_bucket)"
1111

12-
tf_vars= -var="project_name=$(project_name)" -var="project_short_name=$(project_short_name)" -var="profile=$(aws_profile)" -var="aws_account_name=$(AWS_ACCOUNT)"
12+
tf_vars= -var="project_name=$(project_name)" -var="project_short_name=$(project_short_name)" -var="profile=$(aws_profile)" -var="aws_account_name=$(ENVIRONMENT)"
1313

1414
.PHONY : lock-provider workspace init plan apply clean destroy output state-list lambda-zip catch-all-zip
1515

terraform_old/api_gateway/mtls_cert.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ locals {
44
}
55

66
data "aws_s3_bucket" "cert_storage" {
7-
bucket = "imms-fhir-${var.config_env}-cert-storage"
7+
bucket = "imms-fhir-int-cert-storage"
88
}
99

1010
data "aws_s3_object" "cert" {

terraform_old/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ terraform {
1717
}
1818

1919
provider "aws" {
20-
region = var.region
21-
profile = var.profile
20+
region = var.region
2221
default_tags {
2322
tags = {
2423
Project = var.project_name
25-
Environment = local.environment
24+
Environment = "int"
2625
Service = var.service
2726
}
2827
}

terraform_old/route53.tf

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@ locals {
22
zone_subdomain = var.project_short_name
33
}
44

5-
data "aws_route53_zone" "root_zone" {
6-
name = local.root_domain
7-
}
8-
9-
locals {
10-
project_zone_name = "${local.zone_subdomain}.${data.aws_route53_zone.root_zone.name}"
11-
}
12-
135
data "aws_route53_zone" "project_zone" {
14-
name = local.project_zone_name
15-
}
6+
name = "imms.int.vds.platform.nhs.uk"
7+
}

terraform_old/splunk.tf

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
locals {
2-
splunk_env = local.environment == "prod" ? "prod" : local.environment == "int" ? "int" : "dev"
3-
}
41
data "aws_secretsmanager_secret" "splunk_token" {
5-
name = "imms/splunk/${local.splunk_env}/hec"
2+
name = "imms/splunk/int/hec"
63
}
74
data "aws_secretsmanager_secret_version" "splunk_token_id" {
8-
secret_id = data.aws_secretsmanager_secret.splunk_token.id
5+
secret_id = data.aws_secretsmanager_secret.splunk_token.id
96
}
107

118
module "splunk" {
12-
source = "./splunk"
13-
prefix = local.prefix
14-
splunk_endpoint = "https://firehose.inputs.splunk.aws.digital.nhs.uk/services/collector/event"
15-
hec_token = data.aws_secretsmanager_secret_version.splunk_token_id.secret_string
16-
}
9+
source = "./splunk"
10+
prefix = local.prefix
11+
splunk_endpoint = "https://firehose.inputs.splunk.aws.digital.nhs.uk/services/collector/event"
12+
hec_token = data.aws_secretsmanager_secret_version.splunk_token_id.secret_string
13+
}

terraform_old/variables.tf

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ variable "service" {
1919
data "aws_vpc" "default" {
2020
filter {
2121
name = "tag:Name"
22-
values = ["imms-${var.aws_account_name}-fhir-api-vpc"]
22+
values = ["imms-int-fhir-api-vpc"]
2323
}
2424
}
2525

@@ -30,10 +30,6 @@ data "aws_subnets" "default" {
3030
}
3131
}
3232

33-
locals {
34-
root_domain = "${local.config_env}.vds.platform.nhs.uk"
35-
}
36-
3733
locals {
3834
project_domain_name = data.aws_route53_zone.project_zone.name
3935
}
@@ -50,6 +46,7 @@ locals {
5046
service_domain_name = "${local.env}.${local.project_domain_name}"
5147
immunisation_account_id = "084828561157"
5248
dspp_core_account_id = "603871901111"
49+
root_domain = "${local.config_env}.vds.platform.nhs.uk"
5350

5451
tags = {
5552
Project = var.project_name
@@ -90,11 +87,11 @@ data "aws_s3_bucket" "existing_config_bucket" {
9087
}
9188

9289
data "aws_s3_bucket" "existing_destination_bucket" {
93-
bucket = "immunisation-batch-${var.aws_account_name}-preprod-data-destinations"
90+
bucket = "immunisation-batch-int-preprod-data-destinations"
9491
}
9592

9693
data "aws_s3_bucket" "existing_source_bucket" {
97-
bucket = "immunisation-batch-${var.aws_account_name}-preprod-data-sources"
94+
bucket = "immunisation-batch-int-preprod-data-sources"
9895
}
9996

10097
data "aws_kms_key" "existing_lambda_encryption_key" {
@@ -106,15 +103,15 @@ data "aws_kms_key" "existing_kinesis_encryption_key" {
106103
}
107104

108105
data "aws_dynamodb_table" "events-dynamodb-table" {
109-
name = "imms-${var.aws_account_name}-imms-events"
106+
name = "imms-int-imms-events"
110107
}
111108

112109
data "aws_dynamodb_table" "audit-table" {
113-
name = "immunisation-batch-${var.aws_account_name}-audit-table"
110+
name = "immunisation-batch-int-audit-table"
114111
}
115112

116113
data "aws_dynamodb_table" "delta-dynamodb-table" {
117-
name = "imms-${var.aws_account_name}-delta"
114+
name = "imms-int-delta"
118115
}
119116

120117
data "aws_lambda_function" "existing_file_name_proc_lambda" {

0 commit comments

Comments
 (0)