From 33fe643904da77b022d8580e3ea890b44a7190eb Mon Sep 17 00:00:00 2001 From: sidnhs Date: Fri, 23 Aug 2024 14:15:23 +0100 Subject: [PATCH] CCM-6250: Update modules to point to public github repo --- .tool-versions | 2 +- README.md | 4 ++- .../components/iam/module_amplify_branch.tf | 30 +++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.tool-versions b/.tool-versions index 739c42d..b5dd39d 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,6 +1,6 @@ # This file is for you! Please, updated to the versions agreed by your team. -terraform 1.7.0 +terraform 1.9.2 pre-commit 3.6.0 nodejs 20.13.1 direnv 2.32.1 diff --git a/README.md b/README.md index bc8372a..1549d5d 100644 --- a/README.md +++ b/README.md @@ -118,13 +118,15 @@ Unless stated otherwise, the codebase is released under the MIT License. This co Any HTML or Markdown documentation is [© Crown Copyright](https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/) and available under the terms of the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). ### Shared Terraform Modules -Before you setup modules for this repo and find that there might be modules that can be reused elsewhere, please do check out `https://github.com/NHSDigital/nhs-notify-shared-modules/` +Before you setup modules for this repository and find that there might be modules that can be reused elsewhere, please do check out `https://github.com/NHSDigital/nhs-notify-shared-modules/` If you find that the modules are share-able, you should set them up there as a separate PR and get that merged in and potentially tag the commit after testing it, so that it can be a stable release that can be used across all repos on Notify should others find the need to re-use that new module. You can simply point to the reference in your module call as below: ``` + module "amp_branch" { source = "git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/amp_branch?ref=feature/CCM-6250_shared_modules" ..... } + ``` diff --git a/infrastructure/terraform/components/iam/module_amplify_branch.tf b/infrastructure/terraform/components/iam/module_amplify_branch.tf index f4ad566..14ab91b 100644 --- a/infrastructure/terraform/components/iam/module_amplify_branch.tf +++ b/infrastructure/terraform/components/iam/module_amplify_branch.tf @@ -1,20 +1,18 @@ module "amplify_branch" { - source = "git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/amp_branch?ref=v1.0.0" - - name = "main" - aws_account_id = var.aws_account_id - component = var.component - environment = var.environment - project = var.project - region = var.region - group = var.group - - description = "Amplify branch for main" - amplify_app_id = aws_amplify_app.main.id - branch = "main" - stage = "PRODUCTION" - enable_auto_build = true - environment_variables= { + source = "git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/amp_branch?ref=v1.0.0" + name = "main" + aws_account_id = var.aws_account_id + component = var.component + environment = var.environment + project = var.project + region = var.region + group = var.group + description = "Amplify branch for main" + amplify_app_id = aws_amplify_app.main.id + branch = "main" + stage = "PRODUCTION" + enable_auto_build = true + environment_variables = { USER_POOL_CLIENT_ID = aws_cognito_user_pool_client.main.id NOTIFY_SUBDOMAIN = var.environment NEXT_PUBLIC_BASE_PATH = "/auth"