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

aiva2/CCM-5680 IAM Webauth infra #13

Merged
merged 23 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5ad5b06
CCM-5680 setup terraform components
aidenvaines-bjss Jul 16, 2024
85ee255
CCM-5680 use tool-versions
aidenvaines-bjss Jul 17, 2024
07ff509
Adding CW dns query logs
aidenvaines-bjss Jul 17, 2024
fd9b83d
bumping tf versions
aidenvaines-bjss Jul 17, 2024
b40c7db
Missing variable
aidenvaines-bjss Jul 17, 2024
25f15cc
CCM-5680 adding base amplify terraform
aidenvaines-bjss Jul 18, 2024
202eed5
CCM-5680 adding tfsec and fixing fmt
aidenvaines-bjss Jul 18, 2024
7337983
Merge pull request #8 from NHSDigital/dependabot/pip/scripts/docker/e…
aidenvaines-bjss Jul 23, 2024
4f04524
CCM-5836 adding Pr workflows
aidenvaines-bjss Jul 22, 2024
aa99b78
fixing a singleton resource to allow for multi deployment
aidenvaines-bjss Jul 22, 2024
3239f22
Bump werkzeug in /scripts/docker/examples/python/assets/hello_world
dependabot[bot] Jul 22, 2024
7f7c1bd
Merge pull request #8 from NHSDigital/dependabot/pip/scripts/docker/e…
aidenvaines-bjss Jul 23, 2024
da5973e
CCM-5836 fix tf fmt
aidenvaines-bjss Jul 23, 2024
29b894d
Bootstrap is in internal repo
aidenvaines-bjss Jul 23, 2024
fcf0a92
CCM-5836 tidy
aidenvaines-bjss Jul 23, 2024
b4684b5
CCM-5836 fix branch-ref
aidenvaines-bjss Jul 23, 2024
f1d09c7
CCM-5836 fix branch-ref
aidenvaines-bjss Jul 23, 2024
23eecae
CCM-5836 tidy
aidenvaines-bjss Jul 23, 2024
70915fc
CCM-5836 Drop the cognito bits that dont work and minor fixes
aidenvaines-bjss Aug 1, 2024
6bdabb6
spelling
aidenvaines-bjss Aug 1, 2024
69eb0f6
spelling
aidenvaines-bjss Aug 1, 2024
5ddc24f
CCM-5836 fix git head refs
aidenvaines-bjss Aug 1, 2024
10d5540
CCM-5836 fix git head refs
aidenvaines-bjss Aug 1, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/pr_create_dynamic_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

DISPATCH_EVENT=$(jq -ncM \
--arg infraRepoName "${this_repo_name}" \
--arg releaseVersion "${{ github.ref_name }}" \
--arg releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
--arg targetEnvironment "pr${{ github.event.number }}" \
--arg targetAccountGroup "nhs-notify-iam-dev" \
--arg targetComponent "branch" \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:

DISPATCH_EVENT=$(jq -ncM \
--arg infraRepoName "${this_repo_name}" \
--arg releaseVersion "${{ github.ref_name }}" \
--arg releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
--arg targetEnvironment "pr${{ github.event.number }}" \
--arg targetAccountGroup "nhs-notify-iam-dev" \
--arg targetComponent "branch" \
--arg terraformAction "destroy" \
--arg overrides "branch_name=${{ github.ref_name }}" \
--arg overrides "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
'{ "ref": "main",
"inputs": {
"infraRepoName": $infraRepoName,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
resource "null_resource" "remove_amplify_branch" {
# Dispite destroying the resouce, apparently Amplify thinks we want to keep the branch resrouce around
triggers = {
csi = local.csi
}

provisioner "local-exec" {
when = destroy
command = "aws amplify delete-branch --app-id ${local.iam.amplify["id"]} --branch-name ${module.amplify_branch.name}"
}
}


5 changes: 5 additions & 0 deletions scripts/terraform/terraform.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
# Custom implementation - implementation of a make target should not exceed 5 lines of effective code.
# In most cases there should be no need to modify the existing make targets.

TF_ENV ?= dev
STACK ?= ${stack}
TERRAFORM_STACK ?= $(or ${STACK}, infrastructure/terraform)
dir ?= ${TERRAFORM_STACK}

terraform-init: # Initialise Terraform - optional: terraform_dir|dir=[path to a directory where the command will be executed, relative to the project's top-level directory, default is one of the module variables or the example directory, if not set], terraform_opts|opts=[options to pass to the Terraform init command, default is none/empty] @Development
make _terraform cmd="init" \
dir=$(or ${terraform_dir}, ${dir}) \
Expand Down
Loading