Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSOS-2406: remove unused ssm parameters #4214

Merged
merged 5 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ locals {
}
}

baseline_ssm_parameters = {
"/oracle/database/PPIWFM" = {
parameters = {
passwords = { description = "database passwords" }
}
}
}
baseline_secretsmanager_secrets = {
"/oracle/database/PPIWFM" = {
secrets = {
Expand Down
7 changes: 0 additions & 7 deletions terraform/environments/hmpps-domain-services/locals_test.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ locals {
# baseline config
test_config = {

baseline_ssm_parameters = {
"/join_domain_linux_service_account" = {
parameters = {
passwords = {}
}
}
}
baseline_secretsmanager_secrets = {
"/join_domain_linux_service_account" = {
secrets = {
Expand Down
6 changes: 0 additions & 6 deletions terraform/environments/hmpps-oem/locals_oem.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ locals {
}
}

oem_ssm_parameters_passwords = {
parameters = {
passwords = {}
}
}

oem_ec2_default = {

autoscaling_group = module.baseline_presets.ec2_autoscaling_group.default
Expand Down
6 changes: 0 additions & 6 deletions terraform/environments/hmpps-oem/locals_preproduction.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ locals {
"/oracle/database/PPRCVCAT" = local.oem_secretsmanager_secrets
}

baseline_ssm_parameters = {
"/oracle/oem" = local.oem_ssm_parameters_passwords
"/oracle/database/EMREP" = local.oem_ssm_parameters_passwords
"/oracle/database/PPRCVCAT" = local.oem_ssm_parameters_passwords
}

baseline_ec2_instances = {
preprod-oem-a = merge(local.oem_ec2_default, {
config = merge(local.oem_ec2_default.config, {
Expand Down
6 changes: 0 additions & 6 deletions terraform/environments/hmpps-oem/locals_production.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ locals {
"/oracle/database/PRCVCAT" = local.oem_secretsmanager_secrets
}

baseline_ssm_parameters = {
"/oracle/oem" = local.oem_ssm_parameters_passwords
"/oracle/database/EMREP" = local.oem_ssm_parameters_passwords
"/oracle/database/PRCVCAT" = local.oem_ssm_parameters_passwords
}

baseline_ec2_instances = {
prod-oem-a = merge(local.oem_ec2_default, {
config = merge(local.oem_ec2_default.config, {
Expand Down
6 changes: 0 additions & 6 deletions terraform/environments/hmpps-oem/locals_test.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ locals {
"/oracle/database/TRCVCAT" = local.oem_secretsmanager_secrets
}

baseline_ssm_parameters = {
"/oracle/oem" = local.oem_ssm_parameters_passwords
"/oracle/database/EMREP" = local.oem_ssm_parameters_passwords
"/oracle/database/TRCVCAT" = local.oem_ssm_parameters_passwords
}

baseline_ec2_autoscaling_groups = {
test-oem = merge(local.oem_ec2_default, {
autoscaling_group = merge(local.oem_ec2_default.autoscaling_group, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ locals {
"t1-ncr-tomcat" = local.tomcat_ssm_parameters
"t1-ncr-bip" = local.bip_ssm_parameters
"t1-ncr-bip-cmc" = local.bip_cmc_ssm_parameters

"/oracle/database/T1BIPSYS" = local.database_ssm_parameters
"/oracle/database/T1BIPAUD" = local.database_ssm_parameters
}

baseline_secretsmanager_secrets = {
Expand Down
18 changes: 0 additions & 18 deletions terraform/environments/nomis/locals_database.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,6 @@

locals {

database_nomis_ssm_parameters = {
parameters = {
passwords = { description = "database passwords" }
weblogic-passwords = { description = "passwords available to weblogic servers" }
}
}
database_mis_ssm_parameters = {
parameters = {
passwords = { description = "database passwords" }
misload-config = { description = "misload username, password and hostname" }
}
}
database_ssm_parameters = {
parameters = {
passwords = { description = "database passwords" }
}
}

database_nomis_secretsmanager_secrets = {
secrets = {
passwords = { description = "database passwords" }
Expand Down
9 changes: 0 additions & 9 deletions terraform/environments/nomis/locals_development.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,7 @@ locals {
}
}

baseline_ssm_parameters = {
"/oracle/weblogic/qa11r" = local.weblogic_ssm_parameters
"/oracle/database/qa11r" = local.database_nomis_ssm_parameters
}
baseline_secretsmanager_secrets = {
"/azure" = {
secrets = {
sas_token = {}
}
}
"/oracle/weblogic/qa11r" = local.weblogic_secretsmanager_secrets
"/oracle/database/qa11r" = local.database_nomis_secretsmanager_secrets
}
Expand Down
8 changes: 0 additions & 8 deletions terraform/environments/nomis/locals_preproduction.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,6 @@ locals {
}
}

baseline_ssm_parameters = {
"/oracle/weblogic/preprod" = local.weblogic_ssm_parameters
"/oracle/database/PPCNOM" = local.database_nomis_ssm_parameters
"/oracle/database/PPNDH" = local.database_ssm_parameters
"/oracle/database/PPTRDAT" = local.database_ssm_parameters
"/oracle/database/PPCNMAUD" = local.database_ssm_parameters
"/oracle/database/PPMIS" = local.database_mis_ssm_parameters
}
baseline_secretsmanager_secrets = {
"/oracle/weblogic/preprod" = local.weblogic_secretsmanager_secrets
"/oracle/database/PPCNOM" = local.database_nomis_secretsmanager_secrets
Expand Down
13 changes: 0 additions & 13 deletions terraform/environments/nomis/locals_production.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,6 @@ locals {
}
}

baseline_ssm_parameters = {
"/oracle/weblogic/prod" = local.weblogic_ssm_parameters
"/oracle/database/PCNOM" = local.database_nomis_ssm_parameters
"/oracle/database/PNDH" = local.database_ssm_parameters
"/oracle/database/PTRDAT" = local.database_ssm_parameters
"/oracle/database/PCNMAUD" = local.database_ssm_parameters
"/oracle/database/PMIS" = local.database_mis_ssm_parameters
"/oracle/database/DRCNOM" = local.database_nomis_ssm_parameters
"/oracle/database/DRNDH" = local.database_ssm_parameters
"/oracle/database/DRTRDAT" = local.database_ssm_parameters
"/oracle/database/DRCNMAUD" = local.database_ssm_parameters
"/oracle/database/DRMIS" = local.database_mis_ssm_parameters
}
baseline_secretsmanager_secrets = {
"/oracle/weblogic/prod" = local.weblogic_secretsmanager_secrets
"/oracle/database/PCNOM" = local.database_nomis_secretsmanager_secrets
Expand Down
15 changes: 0 additions & 15 deletions terraform/environments/nomis/locals_test.tf
Original file line number Diff line number Diff line change
Expand Up @@ -180,21 +180,6 @@ locals {
}
}

baseline_ssm_parameters = {
"/oracle/weblogic/t1" = local.weblogic_ssm_parameters
"/oracle/weblogic/t2" = local.weblogic_ssm_parameters
"/oracle/weblogic/t3" = local.weblogic_ssm_parameters
"/oracle/database/T1CNOM" = local.database_nomis_ssm_parameters
"/oracle/database/T1NDH" = local.database_ssm_parameters
"/oracle/database/T1TRDAT" = local.database_ssm_parameters
"/oracle/database/T1CNMAUD" = local.database_ssm_parameters
"/oracle/database/T1MIS" = local.database_mis_ssm_parameters
"/oracle/database/T1ORSYS" = local.database_ssm_parameters
"/oracle/database/T2CNOM" = local.database_nomis_ssm_parameters
"/oracle/database/T2NDH" = local.database_ssm_parameters
"/oracle/database/T2TRDAT" = local.database_ssm_parameters
"/oracle/database/T3CNOM" = local.database_nomis_ssm_parameters
}
baseline_secretsmanager_secrets = {
"/oracle/weblogic/t1" = local.weblogic_secretsmanager_secrets
"/oracle/weblogic/t2" = local.weblogic_secretsmanager_secrets
Expand Down
8 changes: 0 additions & 8 deletions terraform/environments/nomis/locals_weblogic.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
locals {

weblogic_ssm_parameters = {
parameters = {
passwords = { description = "weblogic passwords" }
rms = { description = "combined reporting secrets" }
}
}

weblogic_secretsmanager_secrets = {
secrets = {
passwords = { description = "weblogic passwords" }
Expand Down Expand Up @@ -126,7 +119,6 @@ locals {
config = merge(module.baseline_presets.ec2_instance.config.default, {
ami_name = "nomis_rhel_6_10_weblogic_appserver_10_3_release_2023-03-15T17-18-22.178Z"
availability_zone = null
ssm_parameters_prefix = "weblogic/"
iam_resource_names_prefix = "ec2-weblogic"
})

Expand Down
10 changes: 0 additions & 10 deletions terraform/environments/nomis/locals_xtag.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
locals {

xtag_weblogic_ssm_parameters = {
prefix = "/weblogic/"
parameters = {
admin_username = { description = "weblogic admin username" }
admin_password = { description = "weblogic admin password" }
db_username = { description = "nomis database xtag username" }
db_password = { description = "nomis database xtag password" }
}
}

# TODO - change alarm actions to dba_pagerduty once alarms proven out
xtag_cloudwatch_metric_alarms = merge(
module.baseline_presets.cloudwatch_metric_alarms.ec2,
Expand Down
Loading