-
Notifications
You must be signed in to change notification settings - Fork 255
Add examples in every langage for directly executed TF modules doc #15406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| return await Deployment.RunAsync(() => | ||
| { | ||
| // Get available availability zones |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent
|
Your site preview for commit 5fd89b9 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-15406-5fd89b93.s3-website.us-west-2.amazonaws.com. |
|
Your site preview for commit a4de396 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-15406-a4de396d.s3-website.us-west-2.amazonaws.com. |
|
Your site preview for commit 42bcbc1 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-15406-42bcbc1a.s3-website.us-west-2.amazonaws.com. |
| Some modules require Terraform providers to be configured with specific settings. You can configure these providers from within Pulumi: | ||
| **Example:** index.ts - Configuring the imported Terraform bucket module* | ||
| {{% chooser language "typescript,python,go,csharp,java" %}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got a problem formulating this with YAML:
| return err | ||
| } | ||
| // Use the provider with the module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation
|
Your site preview for commit 3e63643 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-15406-3e63643a.s3-website.us-west-2.amazonaws.com. |
|
Your site preview for commit 3caf269 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-15406-3caf269e.s3-website.us-west-2.amazonaws.com. |
|
|
||
| {{% choosable language yaml %}} | ||
|
|
||
| When authoring in YAML, there's no need for Pulumi to generate a SDK. In the YAML you can reference the Terraform module by its schema token, which takes the format `<module-name>:index:Module`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit. iirc, we do actually generate a sdks/vpc/vpc-5.19.0.yaml that captures the parameterization. (Since the provider is allowed to serialize a arbitrary blob there to pass between the pulumi package add invocation and the program runtime.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good point I can demonstrate that.
|
Your site preview for commit 54981df is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-15406-54981df2.s3-website.us-west-2.amazonaws.com. |
|
Your site preview for commit 8c80161 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-15406-8c801615.s3-website.us-west-2.amazonaws.com. |
Updates examples on the https://www.pulumi.com/docs/iac/extending-pulumi/use-terraform-module/ page to use language choosers to explain every supported language.
Code was tested through
pulumi preview.Fixes pulumi/pulumi-terraform-module#390