Draft
Conversation
d3fc8a1 to
7b79283
Compare
robg-test
reviewed
Sep 18, 2025
Comment on lines
1
to
34
| #!/bin/bash | ||
| set -euo pipefail | ||
|
|
||
| branch="${WORKSPACE:-$(git rev-parse --abbrev-ref HEAD)}" | ||
| branch=$(echo "$branch" | sed 's/[^a-zA-Z0-9]//g') | ||
| branch="${branch,,}" | ||
| apply="${APPLY:-false}" | ||
|
|
||
| # Forbidden branches | ||
| forbidden_branches=("main" "prod" "pre-prod" "ndr-test" "ndr-dev") | ||
|
|
||
| for fb in "${forbidden_branches[@]}"; do | ||
| if [[ "$branch" == "$fb" ]]; then | ||
| echo "❌ Error: Deployment from branch '$branch' is not allowed." | ||
| exit 1 | ||
| fi | ||
| done | ||
|
|
||
| cd infrastructure/ | ||
| terraform init -backend-config=backend.conf | ||
| terraform workspace select -or-create "$branch" | ||
| terraform plan -input=false -var-file=dev.tfvars -out tf.plan | ||
|
|
||
| if [[ "$apply" == "true" ]]; then | ||
| terraform apply -auto-approve -input=false tf.plan | ||
| fi |
Contributor
There was a problem hiding this comment.
Is there any way to quickly check that your currently using the dev (or test) AWS environment?
Contributor
Author
There was a problem hiding this comment.
I think that should do it.
065a35e to
fb7abd8
Compare
fb7abd8 to
d6cd1cb
Compare
NogaNHS
reviewed
Sep 23, 2025
NogaNHS
reviewed
Sep 23, 2025
NogaNHS
reviewed
Sep 24, 2025
|
|
||
| } | ||
|
|
||
| resource "aws_lambda_permission" "lambda_permission_get_mtls_api" { |
Contributor
Author
There was a problem hiding this comment.
no, it was only needed when the mtls-api was "extra" to the api. Now the lambda only exists in the mtls-api it doesn't need to have this extra permission.
d94270b to
eb4c636
Compare
|
Report for environment: ndr-devTerraform Initialization ⚙️
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Also a new make command to build a workspace on dev.