简体   繁体   中英

How to implement shared resources in Pulumi

I'm trying to understand how to implement Pulumi in our AWS environment.

I understand that a stack can be used to have the same resource structure for production and development, but that results in independant instances, which is great.

However we also have a shared management VPC where certain tools reside such as pgadmin, gitlab, monitoring tools,...

So what would be the best approach for that?

  • Force a stack for that management project (if that is possible)?
  • Put a constraint in code so that this management stuff is only deployed in production stack?

Or am I missing the approach of stacks here?

Your first thought is the right way to go. Deploy shared resources in their own stack(s) and use Stack References to share information across stacks.

These links discuss these concepts: https://www.pulumi.com/docs/intro/concepts/organizing-stacks-projects/ https://www.pulumi.com/docs/intro/concepts/programming-model/#stack-references

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM