File tree Expand file tree Collapse file tree 5 files changed +50
-5
lines changed Expand file tree Collapse file tree 5 files changed +50
-5
lines changed Original file line number Diff line number Diff line change @@ -1173,3 +1173,22 @@ jobs:
1173
1173
uses : ./terraform-apply
1174
1174
with :
1175
1175
path : tests/workflows/test-apply/long_outputs
1176
+
1177
+ outputs :
1178
+ runs-on : ubuntu-latest
1179
+ name : Apply a plan with outputs
1180
+ env :
1181
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1182
+ steps :
1183
+ - name : Checkout
1184
+ uses : actions/checkout@v3
1185
+
1186
+ - name : Plan
1187
+ uses : ./terraform-plan
1188
+ with :
1189
+ path : tests/workflows/test-apply/outputs
1190
+
1191
+ - name : Apply
1192
+ uses : ./terraform-apply
1193
+ with :
1194
+ path : tests/workflows/test-apply/outputs
Original file line number Diff line number Diff line change @@ -411,13 +411,13 @@ def format_plan_text(plan_text: str) -> Tuple[str, str]:
411
411
412
412
def format_output_status (outputs : Optional [dict ], remaining_size : int ) -> str :
413
413
status = f':white_check_mark: Plan applied in { job_markdown_ref ()} '
414
- if outputs is not None :
415
- stripped_output = render_outputs (outputs ).strip ()
414
+ stripped_output = render_outputs (outputs ).strip ()
416
415
416
+ if stripped_output :
417
417
if len (stripped_output ) > remaining_size :
418
418
stripped_output = truncate (stripped_output , remaining_size , 'Outputs are too large to fit in a PR comment. See the full outputs in the workflow log.' )
419
419
420
- open_att = ' open' if len (stripped_output .splitlines ()) > 6 else ''
420
+ open_att = ' open' if len (stripped_output .splitlines ()) < 6 else ''
421
421
422
422
status += f'''\n <details{ open_att } ><summary>Outputs</summary>
423
423
Original file line number Diff line number Diff line change 1
1
variable "input" {
2
2
type = string
3
- default = " This is my long string\n "
3
+ default = " This is my long string"
4
4
}
5
5
6
6
output "output" {
7
- value = repeat (var . input , 5000 )
7
+ value = join ('\n', [ for i in range ( 0 , 5000 ) : var . input ] )
8
8
}
Original file line number Diff line number Diff line change
1
+ output "sensitive" {
2
+ value = " This is a sensistive value"
3
+ sensitive = true
4
+ }
5
+
6
+ output "not_sensitive" {
7
+ value = " This is not a sensistive value"
8
+ }
9
+
10
+ output "sensitive_map" {
11
+ value = {
12
+ " password" = " passw0rd"
13
+ }
14
+ sensitive = true
15
+ }
16
+
17
+ output "not_sensitive_complex" {
18
+ value = [
19
+ {
20
+ " hello" = " world"
21
+ },
22
+ {
23
+ " hello" = " again"
24
+ }
25
+ ]
26
+ }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments