-
Notifications
You must be signed in to change notification settings - Fork 227
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
Add brandon-pollack and blog post on terraform convert #13777
base: master
Are you sure you want to change the base?
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.
with a single unified programming model. | ||
To that end, we've already added support for [any Terraform/OpenTofu provider](/home/brpol/src/pulumi/docs/content/blog/any-terraform-provider/). | ||
This works great if you already have an existing pulumi project and want to | ||
utilize some providers from the Terraform ecosystem that aren't yet available for |
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.
"utilize" -> "use" (improper word use: "utilize" means to use for a purpose other than what was intended, "e.g. i utilized a kitchen spatula to remove the ice from the car." vs "i used a kitchen spatula to flip an egg" or "i used an ice scraper to remove the ice from the car)
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 want to emphasize that we are taking advantage of somehting very useful. How about "leverage"
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.
Leverage works!
To that end, we've already added support for [any Terraform/OpenTofu provider](/home/brpol/src/pulumi/docs/content/blog/any-terraform-provider/). | ||
This works great if you already have an existing pulumi project and want to | ||
utilize some providers from the Terraform ecosystem that aren't yet available for | ||
Pulumi natively! However, What if you are trying to move your already existing |
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.
"What" -> "what" (capitalize beginnings of sentences, not phrases)
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.
"already existing" -> "existing" (simplify grammar)
This works great if you already have an existing pulumi project and want to | ||
utilize some providers from the Terraform ecosystem that aren't yet available for | ||
Pulumi natively! However, What if you are trying to move your already existing | ||
Infrastructure as Code solution to Pulumi IaC? |
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.
"Infrastructure as Code" -> "infrastructure as code" (infrastructure as code is not a proper noun so should not be capitalized)
|
||
We already have a [handy | ||
utility](/docs/using-pulumi/adopting-pulumi/migrating-to-pulumi/from-terraform/) | ||
called `pulumi convert` built into the cli to convert terraform projects to any |
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.
"cli" -> "CLI" (capitalize acronyms)
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.
"terraform" -> "Terraform" (capitalize proper nouns)
utility](/docs/using-pulumi/adopting-pulumi/migrating-to-pulumi/from-terraform/) | ||
called `pulumi convert` built into the cli to convert terraform projects to any | ||
Pulumi language, but up until now it didn't handle dependencies on external | ||
terraform providers which don't have a known Pulumi native equivalent. |
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.
"terraform" -> "Terraform" (capitalize proper nouns)
* We still have a bit of [unimplemented Terraform functionality](https://github.com/pulumi/pulumi-converter-terraform/issues/65) that we're tracking and are evaluating how to move forward. For now when these functions are detected it will require some manual intervention on the converted project before you're ready to deploy. | ||
* If you define your terraform module in a parent directory of your deployment code, you'll encounter a [known bug](https://github.com/pulumi/pulumi-converter-terraform/issues/194), but a simple workaround is to restructure your Terraform code before running a conversion. | ||
* Terraform programs are dynamically typed, when converting to a type safe language sometimes a type is unknown and still needs to be added manually (as in the typescript example above). | ||
* Variables/Configuration are not yet converted automatically, so tfvars files etc will need to be manually converted into pulumi stack configurations. |
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.
"Variables/Configuration" -> "Variables and configuration" (grammar: sentence capitalization and conjunction use)
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.
"tfvars" -> ".tfvars
" (use code formatting for filenames)
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.
"pulumi" -> "Pulumi" (capitalize proper nouns)
--- | ||
title: "Pulumi Convert Terraform Improvements" | ||
date: 2025-01-08T14:47:13+09:00 | ||
meta_desc: "Pulumi convert now supports a number of enhancements and bug fixes for terraform, including automatically bridging providers" |
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.
"terraform" -> "Terraform" (capitalize proper nouns)
At Pulumi, we want to provide access to manage **any** cloud infrastructure | ||
with a single unified programming model. | ||
To that end, we've already added support for [any Terraform/OpenTofu provider](/home/brpol/src/pulumi/docs/content/blog/any-terraform-provider/). | ||
This works great if you already have an existing pulumi project and want to |
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.
"pulumi" -> "Pulumi" (capitalize proper nouns)
|
||
In order to illustrate the example further, I've thrown together a simple | ||
Terraform project that sets up a Google Compute Engine virtual machine, a | ||
Planetscale database, and wires them together. At the time of writing, there |
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.
"Planetscale" -> "PlanetScale" (use correct capitalization for product name)
Also, looks like the build is failing the linter check:
You can run |
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 :) |
|
||
At Pulumi, we want to provide access to manage **any** cloud infrastructure | ||
with a single unified programming model. | ||
To that end, we've already added support for [any Terraform/OpenTofu provider](/home/brpol/src/pulumi/docs/content/blog/any-terraform-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.
To that end, we've already added support for [any Terraform/OpenTofu provider](/home/brpol/src/pulumi/docs/content/blog/any-terraform-provider/). | |
To that end, we've already added support for [any Terraform/OpenTofu provider](blog/any-terraform-provider/). |
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.
|
||
{{% /chooser %}} | ||
|
||
This will download the necessary converter and language plugins, run the |
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.
Aren't language plugins always bundled with the pulumi installation? So they shouldn't need to be downloaded.
{{% choosable language python %}} | ||
|
||
```shell | ||
pulumi convert --from terraform --language python --out python |
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.
pulumi convert --from terraform --language python --out python | |
pulumi convert --from terraform --language python --out pulumi-program |
Or something? I stumbled over this wondering why we need python
twice for a minute.
@@ -0,0 +1,352 @@ | |||
--- | |||
title: "Pulumi Convert Terraform Improvements" |
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 wonder if we can come up with a more exciting/specific title for this. Maybe
Convert Terraform Projects With Any Provider
Though I don't really love that either 🤔
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'm open to suggestions for sure, I'm not in love with this title
Your site preview for commit a0dcd9a is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-13777-a0dcd9a8.s3-website.us-west-2.amazonaws.com. |
Proposed changes
Unreleased product version (optional)
Related issues (optional)