Skip to content

Commit 2783442

Browse files
Targeting was preveing output updates (#3368)
- Validation script should in any case catch any invalid resource modifications - With this change we lose the ability to only deploy application via github workflow in the case of infrastructure changes. This is considered an unlikely edge case and therefore worth the risk.
2 parents 3b9ae2f + ec86327 commit 2783442

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

.github/workflows/deploy-application.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ env:
4949
&& 'arn:aws:iam::820242920762:role/GithubDeployMavisAndInfrastructure'
5050
|| 'arn:aws:iam::393416225559:role/GithubDeployMavisAndInfrastructure' }}
5151
terraform-working-directory: terraform/app
52-
terraform-target-options: ${{ inputs.server_types == 'web'
53-
&& '-target=aws_ecs_task_definition.task_definition -target=aws_s3_object.appspec_object'
54-
|| inputs.server_types == 'good-job'
55-
&& '-target=module.good_job_service.aws_ecs_task_definition.this'
56-
|| '-target=aws_ecs_task_definition.task_definition -target=aws_s3_object.appspec_object -target=module.good_job_service.aws_ecs_task_definition.this' }}
5752

5853
jobs:
5954
plan-changes:
@@ -91,7 +86,7 @@ jobs:
9186
working-directory: ${{ env.terraform-working-directory }}
9287
run: |
9388
terraform init -backend-config="env/${{ inputs.environment }}-backend.hcl" -upgrade
94-
terraform plan ${{ env.terraform-target-options }} -var-file="env/${{ inputs.environment }}.tfvars" \
89+
terraform plan -var-file="env/${{ inputs.environment }}.tfvars" \
9590
-var="image_digest=$DIGEST" -out=${{ runner.temp }}/tfplan | tee ${{ runner.temp }}/tf_stdout
9691
- name: Validate the changes
9792
run: |
@@ -197,7 +192,7 @@ jobs:
197192
aws-region: eu-west-2
198193
- name: Install AWS CLI
199194
run: sudo snap install --classic aws-cli
200-
- name: Trigger ECR Deployment
195+
- name: Trigger ECS Deployment
201196
run: |
202197
source ${{ runner.temp }}/artifact/DEPLOYMENT_ENVS
203198
echo "$ecs_variables"

0 commit comments

Comments
 (0)