sparse-intern-71089
02/10/2022, 2:18 PMechoing-dinner-19531
02/10/2022, 2:23 PMCan I use Pulumi to generate Terraform creation/update/deletion scripts managed by an external stack?This isn't possible. The values for pulumi programs come the user program and we can't run and inspect that without actually doing a the update operations associated with it.
most-pager-34456
02/10/2022, 2:27 PMPulumidiff-script
that makes a change terraform but does not execute the script against AWS.
• Execute terraform via Stax.io tools
Is something like that possible?
Or is it all or nothing type thing?most-pager-34456
02/10/2022, 2:28 PMmost-pager-34456
02/10/2022, 2:29 PMechoing-dinner-19531
02/10/2022, 3:01 PMSomething like a dry run that outputs a scriptYeh that type of thing isn't possible. Consider a really simple pulumi program like the below:
const store = new aws.s3.Bucket("kops-state-store");
const cluster = new eksdistro.Cluster("cluster", {
name: "<http://luke.cluster.pulumi-demos.net|luke.cluster.pulumi-demos.net>",
state: pulumi.interpolate`s3://${store.id}`,
});
At preview we can't see what that interpolate resolves to because we don't have an id
for the store yet. And while it looks like we could maybe template out a simple case like this in general the behaviour of interpolate or apply can do anything your programming language can express. How could we possibly turn the following into a terraform script?
const bucket = new aws.s3.Bucket("some-bucket");
const nmae = bucket.id.apply(some_http_call_to_get_name_based_on_bucket_id)
const cluster = new eksdistro.Cluster("cluster", {
name: name,
state: pulumi.interpolate`s3://${store.id}`,
});
So you can't turn a pulumi program into a terraform script.
You can use pulumi to import resources that we're made by a terraform script, either via tf2pulumi or by just running the pulumi import
command.most-pager-34456
02/10/2022, 3:07 PMpulumi-awsx
which has the best practice part.most-pager-34456
02/10/2022, 3:08 PMechoing-dinner-19531
02/10/2022, 3:11 PMmost-pager-34456
02/10/2022, 3:14 PMpulumi-awsx
mainly feature complete or do you (or the community) plan to extend the package.
I've only completed basic tasks (Build VPC, Subnets (which the auto-sizing was awesome!). EKS).
I'm a developer so would prefer Infra as Code vs a pretty GUI that I essentially have to load terraform scripts into after an initial 'build wizard'echoing-dinner-19531
02/10/2022, 3:16 PMechoing-dinner-19531
02/10/2022, 3:17 PMlimited-rainbow-51650
02/10/2022, 4:16 PMagreeable-eye-87399
02/12/2022, 12:54 AMagreeable-eye-87399
02/12/2022, 12:55 AMmost-pager-34456
02/12/2022, 1:57 AMNo matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by