Creating Reusable Resource Packs with StackGen

January 31, 2025 Cesar Rodriguez

In this post, we explore how StackGen can help you streamline your cloud provisioning and governance processes by creating reusable resource packs. These packs are bundles of resources that can be easily shared and utilized across your team, allowing for consistent and efficient cloud setups.

What You’ll Learn:

  • Creating Resource Packs: Learn how to select resources, group them into packs, and share them with your team for faster deployment.
  • Using Resource Pack Policies: Discover how to automate the inclusion of resource packs when creating new app stacks, ensuring consistent compliance with governance rules.
  • Integrating Governance Configuration: See how you can enforce policies to automatically apply resource packs based on team needs.

But that’s not all—if you prefer to watch a more detailed explanation, we’ve got you covered! In the video below, we walk you through the entire process of creating and managing resource packs, setting up resource pack policies, and integrating them into your governance configurations.

Watch the full video for a step-by-step guide, and be sure to check out the transcript below for an easy reference to all the details.

By the end of this post (and video!), you’ll have a clear understanding of how StackGen can optimize your cloud workflows, helping you meet compliance requirements faster and reducing manual errors. Ready to get started? Let’s dive in!



Transcript:

Gabriel Araújo:  It's possible for you to group resources into what we call resource packs, which are reusable bundles of resources that can be shared amongst the members of your team and utilized through various different app stacks to create them. Just select the resources and connections you'd like to use and click the floppy disk icon that shows up on top, give it a name, a description and choose whether you want to share it with your team or keep it private. 

Now if you go to other topologies of the same cloud service, you'll be able to find your resource packs and use them as you like. Here's the one I just created. It's also possible to create resource pack policies.

Which, when used with your governance configuration, will allow you to automatically use certain resource packs whenever an app stack is created. To create these policies, you create a JSON file like this, a list of objects, with each object having a name, a description, and a list of resource pack IDs. To get these IDs, you'll need to use the StackGen CLI, and run this command:  stackgen resource type -k true.

This will give you a list of all your resource packs. Just find the ones you wish, copy this ID, and use it in your policy. Then, you can run this command, stackgen upload resourcepackpolicy p [path-to-policy] and the path to your policy, and this will upload it to StackGen. Now let's create a governance configuration with the policy we uploaded.

Go here to Governance Configurations, New Configuration. Select our cloud. Our security policies and here in the custom policies we can go to resource packs, select the one we uploaded, select the team we want to assign the configuration to, and add a name and description. Now with this configuration and with the team selected we're going to create a new AppStack. We have our policy here. As you can see, the AppStack will be created with the resource pack that we assigned to our governance.

To try StackGen resource packs, book a 15 minute meeting with us to unlock the trial. 

 

Share This: