Skip to content

Commit

Permalink
Add DocRules
Browse files Browse the repository at this point in the history
  • Loading branch information
skirsten committed Sep 3, 2024
1 parent c775352 commit 47a36a8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions provider/doc_edits.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package genesiscloud

import (
"bytes"

"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
)

var replaceTerraformWithPulumi = tfbridge.DocsEdit{
Path: "*",
Edit: func(_ string, content []byte) ([]byte, error) {
content = bytes.ReplaceAll(content, []byte("Terraform"), []byte("Pulumi"))

return content, nil
},
}

func editRules(defaults []tfbridge.DocsEdit) []tfbridge.DocsEdit {
return append(defaults,
replaceTerraformWithPulumi,
)
}
1 change: 1 addition & 0 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func Provider() tfbridge.ProviderInfo {
"Pulumi": "3.*",
},
},
DocRules: &tfbridge.DocRuleInfo{EditRules: editRules},
}

// These are new API's that you may opt to use to automatically compute resource
Expand Down

0 comments on commit 47a36a8

Please sign in to comment.