Skip to content

Conversation

@t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Jun 24, 2025

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)

@pulumi-bot
Copy link
Collaborator

@t0yv0 t0yv0 changed the title WIP: Add language choosers for directly exectued modules blog Add language choosers for directly exectued modules blog Jun 24, 2025
@t0yv0 t0yv0 marked this pull request as ready for review June 24, 2025 18:54
@t0yv0 t0yv0 requested review from a team and meagancojocar June 24, 2025 18:54

```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
Copy link
Member Author

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.

@t0yv0
Copy link
Member Author

t0yv0 commented Jun 24, 2025

@t0yv0 t0yv0 merged commit e0a35f8 into master Jun 24, 2025
18 checks passed
@t0yv0 t0yv0 deleted the t0yv0/add-language-choosers-for-modules branch June 24, 2025 18:59
Comment on lines +153 to +159
$ ls sdks/vpcmod
build pulumi_vpcmod pulumi_vpcmod.egg-info setup.py
{{% /choosable %}}

{{% choosable language go %}}
$ ls sdks/vpcmod
go.mod vpcmod
Copy link
Contributor

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:
Copy link
Contributor

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.

Comment on lines +208 to +228
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;
Copy link
Contributor

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?

@t0yv0
Copy link
Member Author

t0yv0 commented Jun 24, 2025

Let me address comments in a subsequent PR.

@t0yv0
Copy link
Member Author

t0yv0 commented Jun 24, 2025

Continued in #15397

t0yv0 added a commit that referenced this pull request Jun 25, 2025
…, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants