https://pulumi.com logo
Docs
Join the conversationJoin Slack
Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
plugin-framework
pulumi-cdk
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumi-service
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by Linen
general
  • b

    blue-answer-29496

    06/20/2018, 6:43 PM
    Maybe since this all just executes and builds a desired object model up that is shared across languages… maybe they could make it so that these stacks can be called across languages with parameters.
  • b

    blue-answer-29496

    06/20/2018, 6:44 PM
    seems like that would be hard though since it would require both NodeJS and Python to be installed and package managers for both of them.
  • s

    stocky-spoon-28903

    06/20/2018, 6:45 PM
    Right - since the state is already shared, and has the outputs of each stack in it, it seems like that would be a good way to share values
  • s

    stocky-spoon-28903

    06/20/2018, 6:45 PM
    Kind of like the
    terraform_remote_state
    data source
  • c

    chilly-crayon-57653

    06/20/2018, 6:47 PM
    @blue-answer-29496 When we talked to folks during design, some folks wouldn't even look at Pulumi if it didn't support their favorite language ... so we decided to support multiple languages. We briefly looked at cross language support, however, it made so much more sense to support each language's (quickly moving) ecosystems of tools. I think over time, the community will sort out "what's important" and we'll see folks rally around creating re-usable components for their usage scenarios
  • b

    blue-answer-29496

    06/20/2018, 6:48 PM
    Yeah, I can see that somewhat. But it seems like the ecosystem fragmentation is going to be a pretty big issue for gaining momentum.
  • b

    blue-answer-29496

    06/20/2018, 6:51 PM
    Pretty much everyone is required to use js / ts since that is all you can use to build web apps. So it seems like you could get away with just supporting those two and not alienate too many people. Terraform proves there is a big audience for this sort of thing and I think this model is a massive improvement over Terraform and yaml.
  • c

    chilly-crayon-57653

    06/20/2018, 6:52 PM
    @blue-answer-29496 There's definitely a trade-off here ... I'm a big believer that the community will help sort this out over time.
  • b

    blue-answer-29496

    06/20/2018, 6:53 PM
    That’s true. Kind of hard to remove something though. If you decide it was a mistake to support Python / Go / whatever later then it’s going to be a really hard to take it away from people.
    b
    • 2
    • 1
  • s

    stocky-spoon-28903

    06/20/2018, 6:53 PM
    To go back to the earlier question here: is there a way to reference a stack written with (say) Go from a stack written in Javascript and get the outputs?
  • m

    microscopic-florist-22719

    06/20/2018, 6:54 PM
    There isn't anything first-class at the moment, no. We have glued such stacks together using config + outputs in the past.
  • b

    blue-answer-29496

    06/20/2018, 6:55 PM
    since these are scripts and they are not declarative there is no way that they can be shared without executing them which means you would have to basically do some sort of interop and would need to have all language runtimes and package managers installed.
  • m

    microscopic-florist-22719

    06/20/2018, 6:56 PM
    So e.g. if we had some stack with an output
    url
    that we wanted to consume from another stack, we might do
    pulumi config set -s consumingStack inputUrl $(pulumi stack output url)
  • s

    stocky-spoon-28903

    06/20/2018, 6:56 PM
    Yeah, I think a library function to go grab the outputs of a given stack would be pretty compelling
  • m

    microscopic-florist-22719

    06/20/2018, 6:56 PM
    It would be pretty straightforw--yeah, exactly
  • s

    stocky-spoon-28903

    06/20/2018, 6:57 PM
    That’s how most composition is done with Terraform, and you often find different parts of an org composing infrastructure that way
  • s

    stocky-spoon-28903

    06/20/2018, 6:57 PM
    e.g. network team publishes a (read-only) remote state which app teams can consume
  • m

    microscopic-florist-22719

    06/20/2018, 6:57 PM
    You can even imagine getting really fancy with a Pulumi provider that exposes stacks as CRUD resources 😉
  • s

    stocky-spoon-28903

    06/20/2018, 6:57 PM
    Heh, I actually did that for Terraform at one point
  • s

    stocky-spoon-28903

    06/20/2018, 6:58 PM
    Terraform itself is missing the concept of a stack and a project though, and then implemented it the wrong way around when they did environments
  • a

    adamant-restaurant-73893

    06/20/2018, 7:06 PM
    If you missed this morning's stream, catch the recording here:

    https://www.youtube.com/watch?v=Mt7Sr4_5TBk▾

  • b

    big-piano-35669

    06/20/2018, 7:16 PM
    Note that we have a work item tracking the idea of making chaining multiple stacks together more first class: https://github.com/pulumi/pulumi/issues/109. This is a very common pattern and a little tedious to do by hand -- although the
    pulumi stack output
    command was designed to make this easier by scripting the CLI -- and we aspire to do better here. Also, we can tell you if you're about to perturb a stack in a way that affects downstream stack dependencies.
  • s

    stocky-spoon-28903

    06/20/2018, 8:49 PM
    Is there any documentation on
    pulumi.ComponentResource
    ?
  • w

    white-balloon-205

    06/20/2018, 9:06 PM
    There is https://pulumi.io/reference/pkg/nodejs/@pulumi/pulumi/index.html#ComponentResource and https://pulumi.io/reference/component-tutorial.html, which should be two good starting points. Let us know if you have any other specific questions though.
  • c

    chilly-crayon-57653

    06/20/2018, 9:15 PM
    @stocky-spoon-28903 Also note that our latest docs drop now has Search, thanks to @microscopic-pilot-97530 -- literally the last feature to make our Public Preview!
  • s

    stocky-spoon-28903

    06/20/2018, 10:11 PM
    Noted. That is useful.
  • s

    stocky-spoon-28903

    06/20/2018, 10:11 PM
    Is there a plan to integrate policy with the intermediate representation of a pulumi stack?
  • s

    stocky-spoon-28903

    06/20/2018, 10:12 PM
    For example: “all instances must have a cost centre tag associated with them”, or “no instances may have an ENI in a subnet with an internet gateway”
  • c

    colossal-beach-47527

    06/20/2018, 10:15 PM
    PSA: There is now a
    pulumi
    tag on Stackoverflow. While everyone is certainly welcome in the Pulumi Community, feel free to ask questions there too. Questions on Stackoverflow have the advantage of helping other people who run into the same problems.
    👍 2
  • m

    microscopic-florist-22719

    06/20/2018, 10:16 PM
    @stocky-spoon-28903 yes, there are plans to integrate policy features in the form of analyzers. Some initial work has been done here, but it remains a bit raw at the moment.
Powered by Linen
Title
m

microscopic-florist-22719

06/20/2018, 10:16 PM
@stocky-spoon-28903 yes, there are plans to integrate policy features in the form of analyzers. Some initial work has been done here, but it remains a bit raw at the moment.
View count: 1