Skip to content

Commit 80692d2

Browse files
authored
Merge pull request #181 from dflook/diff
Clarify diff when aborting apply because of changed plan
2 parents e07e62f + 81c1dce commit 80692d2

File tree

8 files changed

+14
-3
lines changed

8 files changed

+14
-3
lines changed

image/entrypoints/apply.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ else
126126
echo "The plan on the PR must be up to date. Alternatively, set the auto_approve input to 'true' to apply outdated plans"
127127
update_status ":x: Plan not applied in $(job_markdown_ref) (Plan has changed)"
128128

129+
echo "Performing diff between the pull request plan and the plan generated at execution time ..."
130+
echo "> are lines from the plan in the pull request"
131+
echo "< are lines from the plan generated at execution"
129132
echo "Plan changes:"
130133
debug_log diff "$STEP_TMP_DIR/plan.txt" "$STEP_TMP_DIR/approved-plan.txt"
131134
diff "$STEP_TMP_DIR/plan.txt" "$STEP_TMP_DIR/approved-plan.txt" || true

tests/infra/http-auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def lambda_handler(event, context):
2727

2828
return {
2929
'statusCode': 200,
30-
'body': '<html><head><meta name="terraform-get" content="git::https://github.com/dflook/terraform-github-actions.git//tests/registry/test-module" />',
30+
'body': '<html><head><meta name="terraform-get" content="git::https://github.com/dflook/terraform-github-actions.git//tests/workflows/test-http/test-module" />',
3131
'headers': {
3232
'content-type': 'text/html'
3333
}

tests/workflows/test-http/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "git_https_source" {
2-
source = "git::https://github.com/dflook/terraform-github-actions-dev.git//tests/registry/test-module"
2+
source = "git::https://github.com/dflook/terraform-github-actions-dev.git//tests/workflows/test-http/test-module"
33
}
44

55
output "git_https" {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This module is hosted in a git repo
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
output "my-output" {
2+
value = "hello"
3+
}

tests/workflows/test-ssh/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "hello" {
2-
source = "git::ssh://git@github.com/dflook/terraform-github-actions//tests/registry/test-module"
2+
source = "git::ssh://git@github.com/dflook/terraform-github-actions//tests/workflows/test-ssh/test-module"
33
}
44

55
output "word" {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This module is a module stored in a git repo
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
output "my-output" {
2+
value = "hello"
3+
}

0 commit comments

Comments
 (0)