Skip to main content
⏳ Estimated read time: 2 min read
Important

You will need a StackGen Admin or DevOps access to run this command.

resource-pack-policy

The stackgen upload resource-pack-policy command allows you to enforce the usage of specific resource packs that will be added to topologies.

Supported Clouds

All cloud providers.

Usage

stackgen upload resource-pack-policy [flags]

Flags

FlagDescription
-p, --resource-pack-policy-file-path stringPath to resource pack policy file. (default "/home/user")
-h, --helpHelp for resource-pack-policy.

Examples

Upload resource pack policy from a local file

stackgen upload resource-pack-policy -p /path/to/resource-pack-policy.json

This command will:

  • Read the resource pack policy from the specified JSON file,
  • Upload the policy to the StackGen platform,
  • Enforce the use of specified resource packs in your topologies.

File Format

The resource pack policy file should be in JSON format and define which resource packs must be used in topologies. Here's an example:

[
{
"name": "resource_pack_policy",
"description": "Resource Pack Policy",
"resourcePackIds": ["pack-1"]
}
]

Each policy object in the array must include:

  • name: A unique identifier for the policy.
  • description: A brief explanation of the policy's purpose.
  • resourcePackIds: An array of resource pack IDs that should be enforced.
note
  • Resource pack policies help maintain consistency across projects.
  • Non-compliant topologies will generate policy violation warnings.
  • You can find resource pack IDs by running stackgen resource type -k.
  • Regardless of whether the policy includes all available resource packs (e.g., AWS, Azure), only those compatible with the current appStack will be applied.