Skip to content

Commit

Permalink
[PRMP-639] - separate prod into prod and prod-plan
Browse files Browse the repository at this point in the history
  • Loading branch information
NogaNHS committed Aug 13, 2024
1 parent 67deb96 commit b2fdef7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/base-gp-registrations-mi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: ${{inputs.is_deployment && secrets.AWS_ASSUME_ROLE || secrets.AWS_ASSUME_ROLE_READ_ONLY}}
role-to-assume: ${{(inputs.is_deployment && secrets.AWS_ASSUME_ROLE) || secrets.AWS_ASSUME_ROLE_READ_ONLY}}
role-skip-session-tagging: true

- name: Publish Docker Image to Prod
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:

- name: Setup Terraform variables
id: vars-dev
if: inputs.environment != 'prod' || !inputs.is_deployment
if: inputs.environment != 'prod'
run: |-
IMAGE_TAG=$(aws ecr describe-images --repository-name ${{ secrets.ECR_REPOSITORY_NAME }} --query 'sort_by(imageDetails,& imagePushedAt)[-1].imageTags[0]')
cat > pipeline.auto.tfvars <<EOF
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-gp-registrations-mi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
environment: [ dev, prod ]
environment: [ dev, prod-plan ]
uses: ./.github/workflows/base-gp-registrations-mi.yml
with:
environment: ${{ matrix.environment }}
Expand Down
6 changes: 3 additions & 3 deletions stacks/container-repositories/terraform/ecr.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resource "aws_ecr_repository" "gp_registrations_mi" {
}

data "aws_iam_policy_document" "ecr_gp_registrations_mi" {
count = var.environment == "dev" ? 1 : 0
count = var.environment == "dev" ? 1 : 0
statement {
effect = "Allow"

Expand All @@ -36,6 +36,6 @@ resource "aws_ecr_repository_policy" "ecr_gp_registrations_mi" {
}

data "aws_ssm_parameter" "prod-aws-account-id" {
count = var.environment == "dev" ? 1 : 0
name = "/registrations/dev/user-input/prod-aws-account-id"
count = var.environment == "dev" ? 1 : 0
name = "/registrations/dev/user-input/prod-aws-account-id"
}

0 comments on commit b2fdef7

Please sign in to comment.