You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(terraform-docs): Add support for replace mode for TF 0.12+; Use native saving to file for TF 0.12+. Both requires terraform-docs v0.12.0+ which released in 2021. (antonbabenko#705)
# Use of insertion markers to insert the terraform-docs output between the markers
286
-
# Replace content between markers with the placeholder - https://stackoverflow.com/questions/1212799/how-do-i-extract-lines-between-two-line-delimiters-in-perl#1212834
287
-
perl_expression="if (/$insertion_marker_begin/../$insertion_marker_end/) { print \$_ if /$insertion_marker_begin/; print \"I_WANT_TO_BE_REPLACED\\n\$_\" if /$insertion_marker_end/;} else { print \$_ }"
288
-
perl -i -ne "$perl_expression""$output_file"
293
+
# Use of insertion markers to insert the terraform-docs output between the markers
294
+
# Replace content between markers with the placeholder - https://stackoverflow.com/questions/1212799/how-do-i-extract-lines-between-two-line-delimiters-in-perl#1212834
295
+
perl_expression="if (/$insertion_marker_begin/../$insertion_marker_end/) { print \$_ if /$insertion_marker_begin/; print \"I_WANT_TO_BE_REPLACED\\n\$_\" if /$insertion_marker_end/;} else { print \$_ }"
296
+
perl -i -ne "$perl_expression""$output_file"
289
297
290
-
# Replace placeholder with the content of the file
0 commit comments