Skip to main content
⏳ Estimated read time: 1 min read

Policies Overview

Policies Overview

The stackgen policies command is used to list, inspect, and upload organization policies from the CLI. Resource restriction policies are available under stackgen policies resource-restriction instead of stackgen upload resource-restriction-policy (deprecated).

Usage

stackgen policies [command]

Sub Commands

Resource restriction

Manage policies that limit which StackGen resources or custom modules users can add in topology builders.

SubcommandDescription
listList resource restriction policies, or one policy with --id or --name.
uploadUpload a resource restriction policy from a JSON file.

Flags

FlagDescription
-h, --helpHelp for policies.

See Global CLI flags for --interactive, --log, --output, --project, and --stackgen-home.

Examples

List all resource restriction policies

stackgen policies resource-restriction list

The above command will display every resource restriction policy in the project.

Upload a policy from a JSON file

stackgen policies resource-restriction upload -p /path/to/resource_restriction_policy.json

The above command will:

  • Read the restriction policy from the specified JSON file.
  • Upload the policy to StackGen.