-
Notifications
You must be signed in to change notification settings - Fork 246
Blog post on terraform convert improvements #13777
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
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 a great article, @brandonpollack23 ! Thanks much for the write-up. There are some minor grammatical issues to address (as noted), but otherwise the post looks good.
This comment was marked as outdated.
This comment was marked as outdated.
54e8df1
to
cec090c
Compare
Your site preview for commit cec090c is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-13777-cec090cb.s3-website.us-west-2.amazonaws.com. |
Your site preview for commit 8dae809 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-13777-8dae8094.s3-website.us-west-2.amazonaws.com. |
Addressed :) |
to navigate to your project directory and run the following command with the | ||
latest version of Pulumi installed: | ||
|
||
{{% chooser language "javascript,typescript,python,go" %}} |
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.
Does this not work for yaml/dotnet/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.
it does but I havent gotten around to testing each of those (there are enough issues from various subtleties in the ones built into the repo). Figured I'd wait until it was out of draft stage and folks had a look at it, but I'm going to test/add them after that.
Your site preview for commit a0dcd9a is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-13777-a0dcd9a8.s3-website.us-west-2.amazonaws.com. |
Your site preview for commit 8591a1f is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-13777-8591a1fc.s3-website.us-west-2.amazonaws.com. |
Your site preview for commit c94166b is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-13777-c94166b6.s3-website.us-west-2.amazonaws.com. |
Your site preview for commit 1cc431e is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-13777-1cc431ef.s3-website.us-west-2.amazonaws.com. |
Your site preview for commit 7b54a73 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-13777-7b54a73c.s3-website.us-west-2.amazonaws.com. |
Your site preview for commit 4a5ab23 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-13777-4a5ab23a.s3-website.us-west-2.amazonaws.com. |
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.
Sorry for not sending sooner, but I have some additional feedback on the import section
With the release of [Pulumi 3.146.0](https://github.com/pulumi/pulumi/releases/tag/v3.146.0), we have also | ||
addressed this limitation, and you can now import resources that will be | ||
managed by the Pulumi Terraform parameterized provider and code will also be | ||
generated to manage these resources from within Pulumi. See the [documentation for `pulumi import`](https://www.pulumi.com/docs/iac/cli/commands/pulumi_import/) | ||
for more details. |
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.
Could we show an example of importing a PlanetScale resource?
With the release of [Pulumi 3.146.0](https://github.com/pulumi/pulumi/releases/tag/v3.146.0), we have also | |
addressed this limitation, and you can now import resources that will be | |
managed by the Pulumi Terraform parameterized provider and code will also be | |
generated to manage these resources from within Pulumi. See the [documentation for `pulumi import`](https://www.pulumi.com/docs/iac/cli/commands/pulumi_import/) | |
for more details. | |
In addition to being able to use any Terraform/OpenTofu provider with `pulumi convert`, with the release of [Pulumi 3.146.0](https://github.com/pulumi/pulumi/releases/tag/v3.146.0) you can now _import_ resources from any Terraform/OpenTofu provider using the [`pulumi import`](https://www.pulumi.com/docs/iac/cli/commands/pulumi_import/) command. | |
Here's an example of importing an existing PlanetScale resource: | |
TODO |
## What's Really New Here? 🚀 | ||
|
||
1. **Automatic Provider Bridging**: The converter now automatically handles any Terraform provider, even ones without Pulumi equivalents | ||
2. **Improved Import Support**: With [Pulumi 3.146.0](https://github.com/pulumi/pulumi/releases/tag/v3.146.0), you can now import resources from any bridged provider |
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.
2. **Improved Import Support**: With [Pulumi 3.146.0](https://github.com/pulumi/pulumi/releases/tag/v3.146.0), you can now import resources from any bridged provider | |
2. **Improved Import Support**: With [Pulumi 3.146.0](https://github.com/pulumi/pulumi/releases/tag/v3.146.0), you can now import resources from any Terraform provider |
We should wait to submit this until pulumi/pulumi#18259 is released |
|
||
- Abstract functionality that is shared, perhaps by extracting it into reusable functions or classes. | ||
- Consider moving any functions that you will use in different infrastructure projects to a shared dependency or a [Component Resource](/docs/iac/concepts/resources/components/#component-resources). | ||
- Do anything you need to have your infrastructure behave how you want: consolidate functionality from scripts, read information from files and services, the sky is the limit! A Pulumi program is _just a program_! |
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.
Suggested edit for clarity: Customize your infrastructure however you need: You can consolidate script functionality, read data from files and services, and more. A Pulumi program is just code!
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 mixed the two, I kind of want to get the point through that you can do anything the target language can do
pulumi import "b2:index/bucket:Bucket" example_bucket "YOUR_BUCKET_ID" | ||
``` | ||
|
||
1. As part of the import, code will be generated for you to add to your project as you see fit to manage the resource from Pulumi. By default, Pulumi will set the `protect` option when generating code, which prevents the resources from being deleted by Pulumi; you can use `--protect=false` to disable this. |
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.
Suggestion for this as well: During the import, Pulumi generates code for you to add to your project, allowing you to manage the resource as needed.
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.
done
1. **Improved Import Support**: With [Pulumi 3.153.0](https://github.com/pulumi/pulumi/releases/tag/v3.153.0), you can now import resources from any Terraform provider | ||
1. **Seamless Integration**: Generated code works right out of the box with minimal to no tweaking needed | ||
|
||
## The Road Ahead |
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'd suggest a CTA at the end to download Pulumi, or send folks to our get started guides.
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.
CTA = Call to Action? ok adding
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.
Left a couple of comments, looks great.
This commit fixes a few typos, makes some of the language more direct and addresses some remaining pieces of PR feedback.
9e5a8af
to
a728820
Compare
Your site preview for commit a728820 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-13777-a728820a.s3-website.us-west-2.amazonaws.com. |
Addressed these comments a while ago, way new version now and got approval
Proposed changes
Unreleased product version (optional)
Related issues (optional)