Hello Team, I'm building a Pulumi provider using t...
# general
m
Hello Team, I'm building a Pulumi provider using the Terraform boilerplate, and got everything working so far except for the docs. The documentation is in the terraform porvider's docs folder in github (under docs/resources/resource_name.md, just like most other terraform providers), but I get this mapping error for all of my resources: "warning: could not find docs for resource "resource_name''. Override the Docs property in the data source mapping. See type tfbridge.DocInfo for details." Any ideas on what I'm missing here and/or what could I do to fix this? I have tried adding the following to the DocInfo mapping: Docs: &tfbridge.DocInfo{Source: ""}, however I have no clue what the format of the source string should be here and what should it contain.
d
Here is docs for spinnaker
Copy code
Resources: map[string]*tfbridge.ResourceInfo{
			"spinnaker_application": {
				Tok: tfbridge.MakeResource(mainPkg, mainMod, "SpinnakerApplication"),
				Docs: &tfbridge.DocInfo{
					Source: "spinnaker_application.md",
				}},
			"spinnaker_canary_config": {
				Tok: tfbridge.MakeResource(mainPkg, mainMod, "SpinnakerCanaryConfig"),
				Docs: &tfbridge.DocInfo{
					Source: "spinnaker_canary_config",
				}},
			"spinnaker_project": {
				Tok: tfbridge.MakeResource(mainPkg, mainMod, "Spinnaker"),
				Docs: &tfbridge.DocInfo{
					Source: "spinnaker_project.md",
				}},
			"spinnaker_pipeline": {
				Tok: tfbridge.MakeResource(mainPkg, mainMod, "SpinnakerPipeline"),
				Docs: &tfbridge.DocInfo{
					Source: "spinnaker_pipeline.md",
				}},
			"spinnaker_pipeline_template": {
				Tok: tfbridge.MakeResource(mainPkg, mainMod, "SpinnakerPipelineTemplate"),
				Docs: &tfbridge.DocInfo{
					Source: "spinnaker_pipeline_template.md",
				}},
		},
for this provider https://github.com/armory-io/terraform-provider-spinnaker Hope that helps.
m
Thanks Andrii, I have already tried doing it that way, but it didn't work. I also looked at the spinnaker TF provider repo you linked, but I cannot find any docs in that repo. Where are you storing those docs that you are refeencing here?