Skip to content

Commit

Permalink
CCM-6250: Update modules to point to public github repo
Browse files Browse the repository at this point in the history
  • Loading branch information
sidnhs committed Aug 23, 2024
1 parent a55aa87 commit 33fe643
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
.....
}
```
30 changes: 14 additions & 16 deletions infrastructure/terraform/components/iam/module_amplify_branch.tf
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 33fe643

Please sign in to comment.