-
Notifications
You must be signed in to change notification settings - Fork 50
Description
What happened?
Let's say we're creating a new DocsEdit rule:
func skipExamplesSection(path string) tfbridge.DocsEdit {
return tfbridge.DocsEdit{
Path: path,
Edit: func(_ string, content []byte) ([]byte, error) {
return tfgen.SkipSectionByHeaderContent(content, func(headerText string) bool {
return headerText == "Example Usage"
})
},
}
}
If a resource's upstream doc file is called fantastic_service.html.markdown
and it lives in a r
folder for "resources", and a data source's upstream doc file is also called fantastic_service.html.markdown
, if in our example we set path
to r/fantastic_service.html.markdown
, the DocsEdit logic ignores the first part of the path, and affects both the resource and the data source files.
TL;DR: There's no way to specify the upstream folder location for a filename, and if there are two filenames (one in the r
folder and one in the d
folder) that are equal, both files will be affected.
Example
pulumi/pulumi-alicloud#1045 shows that adding such a docs rule removes a section from both the resource and the data source.
Output of pulumi about
n/a
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).