-
Notifications
You must be signed in to change notification settings - Fork 258
Add language choosers for directly exectued modules blog #15395
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
|
Your site preview for commit 76a1c2f is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-15395-76a1c2f3.s3-website.us-west-2.amazonaws.com. |
|
|
||
| ```bash | ||
| $ pulumi package add terraform-module terraform-aws-modules/vpc/aws 6.0.1 vpcmod | ||
| $ pulumi package add terraform-module terraform-aws-modules/vpc/aws 6.0.0 vpcmod |
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.
I've downgraded to 6.0.0 because of pulumi/pulumi-terraform-module#437 hiccup we need to fix with 6.0.1.
| $ ls sdks/vpcmod | ||
| build pulumi_vpcmod pulumi_vpcmod.egg-info setup.py | ||
| {{% /choosable %}} | ||
|
|
||
| {{% choosable language go %}} | ||
| $ ls sdks/vpcmod | ||
| go.mod vpcmod |
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.
these should probably be wrapped in triple backticks like the ts version
|
|
||
| {{% /chooser %}} | ||
|
|
||
| And links it into your project such as `package.json` when using TypeScript: |
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. this reads kind of funny for the other languages. You could maybe just only inline the example dependencies block for ts and just say "and links it into your project" for the other languages.
| import * as pulumi from "@pulumi/pulumi"; | ||
| import * as vpcmod from '@pulumi/vpcmod'; | ||
|
|
||
| const vpc = new vpcmod.Module("test-vpc", { | ||
| azs: ["us-west-2a", "us-west-2b"], | ||
| name: `test-vpc-${pulumi.getStack()}`, | ||
| cidr: "10.0.0.0/16", | ||
| public_subnets: [ | ||
| "10.0.1.0/24", | ||
| "10.0.2.0/24", | ||
| ], | ||
| private_subnets: [ | ||
| "10.0.3.0/24", | ||
| "10.0.4.0/24", | ||
| ], | ||
| enable_nat_gateway: true, | ||
| single_nat_gateway: true, | ||
| }); | ||
|
|
||
| export const publicSubnets = vpc.public_subnets; | ||
| export const privateSubnets = vpc.private_subnets; |
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.
this is just a copy of the typescript example?
|
Let me address comments in a subsequent PR. |
|
Continued in #15397 |
…, Java (#15397) Following up on #15395 the PR adds example translations to cover C#, YAML and Java experience. None of these languages currently support terraformConfig() method and the examples for this method are omitted for these languages. The feature is tracked in pulumi/pulumi-terraform-bridge#3131
Proposed changes
This change adds Python and Go to the examples used in https://www.pulumi.com/blog/announcing-direct-tf-modules/
Verified that these work on the latest provider.
More languages will be added in a subsequent PR.
Unreleased product version (optional)
Related issues (optional)