I know we can consume a terraform state in pulumi,...
# general
b
I know we can consume a terraform state in pulumi, but can we do the opposite? There are very useful community modules that I wouldn't want to live without (e.g. https://github.com/npalm/terraform-aws-gitlab-runner), so I need to keep that in Terraform but I also need to pass it values from resources managed by pulumi (vpc id, for instance) I also never got
tf2pulumi
to work so I can't convert that module into pulumi either
1
I just thought of something, I could write a
foo.auto.tvars.json
from pulumi and consume those variables from Terraform. It's not very elegant but it might work
g
There's not anything built-in to do that. You could write out a tfvars file as you mention. Another option is use the
external
terraform data source to run
pulumi stack output ...
. I have an example of that at https://gist.github.com/clstokes/80cddb26e2defd708d499ed0c081d87c.
🙌 1
b
I like your option better! Thanks 🙂
👍 1