Fix tfdoc parsing on newllines in outputs (#649)

* fix

* use the right (ugly) Python formatter

* boilerplate on new file

* and do the actual tfdoc run on the original outputs file
This commit is contained in:
Ludovico Magnocavallo 2022-05-05 14:43:38 +02:00 committed by GitHub
parent f2d663d19f
commit ff25809020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 3 deletions

View File

@ -144,8 +144,7 @@ healthchecks:
| name | description | sensitive |
|---|---|:---:|
| [admin_ranges](outputs.tf#L17) | Admin ranges data.
value = { enabled = length(var.admin_ranges) > 0 ranges = join(",", var.admin_ranges) } | |
| [admin_ranges](outputs.tf#L17) | Admin ranges data. | |
| [custom_egress_allow_rules](outputs.tf#L26) | Custom egress rules with allow blocks. | |
| [custom_egress_deny_rules](outputs.tf#L34) | Custom egress rules with allow blocks. | |
| [custom_ingress_allow_rules](outputs.tf#L42) | Custom ingress rules with allow blocks. | |

View File

@ -0,0 +1,13 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

View File

@ -70,7 +70,7 @@ OUT_RE = re.compile(r'''(?smx)
# output open
(?:^\s*output\s*"([^"]+)"\s*\{\s*$) |
# attribute
(?:^\s{2}([a-z]+)\s*=\s*"?(.*?)"?\s*$) |
(?:^\n?\s{2}([a-z]+)\s*=\s*"?(.*?)"?\s*$) |
# output close
(?:^\s?(\})\s*$) |
# comment