1. Packages
  2. Packages
  3. Pulumi Cloud (Pulumi Service provider)
  4. API Docs
  5. PolicyPack

This provider is currently in preview.

Viewing docs for Pulumi Cloud v1.2.0
published on Thursday, May 28, 2026 by Pulumi
pulumiservice logo

This provider is currently in preview.

Viewing docs for Pulumi Cloud v1.2.0
published on Thursday, May 28, 2026 by Pulumi

    A Policy Pack published to Pulumi Cloud. The source directory is tarballed and uploaded on Create; changing source content publishes a new version (replace).

    Create PolicyPack Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PolicyPack(name: string, args: PolicyPackArgs, opts?: CustomResourceOptions);
    @overload
    def PolicyPack(resource_name: str,
                   args: PolicyPackArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def PolicyPack(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   name: Optional[str] = None,
                   organization: Optional[str] = None,
                   source_path: Optional[str] = None,
                   version_tag: Optional[str] = None,
                   display_name: Optional[str] = None,
                   policies: Optional[Sequence[PolicyPackPolicyInputArgs]] = None)
    func NewPolicyPack(ctx *Context, name string, args PolicyPackArgs, opts ...ResourceOption) (*PolicyPack, error)
    public PolicyPack(string name, PolicyPackArgs args, CustomResourceOptions? opts = null)
    public PolicyPack(String name, PolicyPackArgs args)
    public PolicyPack(String name, PolicyPackArgs args, CustomResourceOptions options)
    
    type: pulumiservice:PolicyPack
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "pulumiservice_policypack" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args PolicyPackArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PolicyPackArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PolicyPackArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyPackArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyPackArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var policyPackResource = new PulumiService.PolicyPack("policyPackResource", new()
    {
        Name = "string",
        Organization = "string",
        SourcePath = "string",
        VersionTag = "string",
        DisplayName = "string",
        Policies = new[]
        {
            new PulumiService.Inputs.PolicyPackPolicyInputArgs
            {
                Name = "string",
                ConfigSchema = 
                {
                    { "string", "any" },
                },
                Description = "string",
                DisplayName = "string",
                EnforcementLevel = "string",
                Framework = new PulumiService.Inputs.PolicyPackComplianceFrameworkInputArgs
                {
                    Name = "string",
                    Reference = "string",
                    Specification = "string",
                    Version = "string",
                },
                Message = "string",
                RemediationSteps = "string",
                Severity = "string",
                Tags = new[]
                {
                    "string",
                },
                Url = "string",
            },
        },
    });
    
    example, err := pulumiservice.NewPolicyPack(ctx, "policyPackResource", &pulumiservice.PolicyPackArgs{
    	Name:         pulumi.String("string"),
    	Organization: pulumi.String("string"),
    	SourcePath:   pulumi.String("string"),
    	VersionTag:   pulumi.String("string"),
    	DisplayName:  pulumi.String("string"),
    	Policies: pulumiservice.PolicyPackPolicyInputArray{
    		&pulumiservice.PolicyPackPolicyInputArgs{
    			Name: pulumi.String("string"),
    			ConfigSchema: pulumi.Map{
    				"string": pulumi.Any("any"),
    			},
    			Description:      pulumi.String("string"),
    			DisplayName:      pulumi.String("string"),
    			EnforcementLevel: pulumi.String("string"),
    			Framework: &pulumiservice.PolicyPackComplianceFrameworkInputArgs{
    				Name:          pulumi.String("string"),
    				Reference:     pulumi.String("string"),
    				Specification: pulumi.String("string"),
    				Version:       pulumi.String("string"),
    			},
    			Message:          pulumi.String("string"),
    			RemediationSteps: pulumi.String("string"),
    			Severity:         pulumi.String("string"),
    			Tags: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Url: pulumi.String("string"),
    		},
    	},
    })
    
    resource "pulumiservice_policypack" "policyPackResource" {
      name         = "string"
      organization = "string"
      source_path  = "string"
      version_tag  = "string"
      display_name = "string"
      policies {
        name = "string"
        config_schema = {
          "string" = "any"
        }
        description       = "string"
        display_name      = "string"
        enforcement_level = "string"
        framework = {
          name          = "string"
          reference     = "string"
          specification = "string"
          version       = "string"
        }
        message           = "string"
        remediation_steps = "string"
        severity          = "string"
        tags              = ["string"]
        url               = "string"
      }
    }
    
    var policyPackResource = new PolicyPack("policyPackResource", PolicyPackArgs.builder()
        .name("string")
        .organization("string")
        .sourcePath("string")
        .versionTag("string")
        .displayName("string")
        .policies(PolicyPackPolicyInputArgs.builder()
            .name("string")
            .configSchema(Map.of("string", "any"))
            .description("string")
            .displayName("string")
            .enforcementLevel("string")
            .framework(PolicyPackComplianceFrameworkInputArgs.builder()
                .name("string")
                .reference("string")
                .specification("string")
                .version("string")
                .build())
            .message("string")
            .remediationSteps("string")
            .severity("string")
            .tags("string")
            .url("string")
            .build())
        .build());
    
    policy_pack_resource = pulumiservice.PolicyPack("policyPackResource",
        name="string",
        organization="string",
        source_path="string",
        version_tag="string",
        display_name="string",
        policies=[{
            "name": "string",
            "config_schema": {
                "string": "any",
            },
            "description": "string",
            "display_name": "string",
            "enforcement_level": "string",
            "framework": {
                "name": "string",
                "reference": "string",
                "specification": "string",
                "version": "string",
            },
            "message": "string",
            "remediation_steps": "string",
            "severity": "string",
            "tags": ["string"],
            "url": "string",
        }])
    
    const policyPackResource = new pulumiservice.PolicyPack("policyPackResource", {
        name: "string",
        organization: "string",
        sourcePath: "string",
        versionTag: "string",
        displayName: "string",
        policies: [{
            name: "string",
            configSchema: {
                string: "any",
            },
            description: "string",
            displayName: "string",
            enforcementLevel: "string",
            framework: {
                name: "string",
                reference: "string",
                specification: "string",
                version: "string",
            },
            message: "string",
            remediationSteps: "string",
            severity: "string",
            tags: ["string"],
            url: "string",
        }],
    });
    
    type: pulumiservice:PolicyPack
    properties:
        displayName: string
        name: string
        organization: string
        policies:
            - configSchema:
                string: any
              description: string
              displayName: string
              enforcementLevel: string
              framework:
                name: string
                reference: string
                specification: string
                version: string
              message: string
              name: string
              remediationSteps: string
              severity: string
              tags:
                - string
              url: string
        sourcePath: string
        versionTag: string
    

    PolicyPack Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The PolicyPack resource accepts the following input properties:

    Name string
    Policy pack name (unique within the org).
    Organization string
    Organization name.
    SourcePath string
    Path to the directory containing the policy pack source. The directory is tarballed and uploaded.
    VersionTag string
    Semantic version tag (e.g. "1.0.0"). Versions are immutable; change to publish a new version.
    DisplayName string
    Optional display name. Changing it requires a new versionTag (policy pack versions are immutable in Pulumi Cloud).
    Policies List<Pulumi.PulumiService.Inputs.PolicyPackPolicyInput>
    Metadata for each policy in the pack.
    Name string
    Policy pack name (unique within the org).
    Organization string
    Organization name.
    SourcePath string
    Path to the directory containing the policy pack source. The directory is tarballed and uploaded.
    VersionTag string
    Semantic version tag (e.g. "1.0.0"). Versions are immutable; change to publish a new version.
    DisplayName string
    Optional display name. Changing it requires a new versionTag (policy pack versions are immutable in Pulumi Cloud).
    Policies []PolicyPackPolicyInputArgs
    Metadata for each policy in the pack.
    name string
    Policy pack name (unique within the org).
    organization string
    Organization name.
    source_path string
    Path to the directory containing the policy pack source. The directory is tarballed and uploaded.
    version_tag string
    Semantic version tag (e.g. "1.0.0"). Versions are immutable; change to publish a new version.
    display_name string
    Optional display name. Changing it requires a new versionTag (policy pack versions are immutable in Pulumi Cloud).
    policies list(object)
    Metadata for each policy in the pack.
    name String
    Policy pack name (unique within the org).
    organization String
    Organization name.
    sourcePath String
    Path to the directory containing the policy pack source. The directory is tarballed and uploaded.
    versionTag String
    Semantic version tag (e.g. "1.0.0"). Versions are immutable; change to publish a new version.
    displayName String
    Optional display name. Changing it requires a new versionTag (policy pack versions are immutable in Pulumi Cloud).
    policies List<PolicyPackPolicyInput>
    Metadata for each policy in the pack.
    name string
    Policy pack name (unique within the org).
    organization string
    Organization name.
    sourcePath string
    Path to the directory containing the policy pack source. The directory is tarballed and uploaded.
    versionTag string
    Semantic version tag (e.g. "1.0.0"). Versions are immutable; change to publish a new version.
    displayName string
    Optional display name. Changing it requires a new versionTag (policy pack versions are immutable in Pulumi Cloud).
    policies PolicyPackPolicyInput[]
    Metadata for each policy in the pack.
    name str
    Policy pack name (unique within the org).
    organization str
    Organization name.
    source_path str
    Path to the directory containing the policy pack source. The directory is tarballed and uploaded.
    version_tag str
    Semantic version tag (e.g. "1.0.0"). Versions are immutable; change to publish a new version.
    display_name str
    Optional display name. Changing it requires a new versionTag (policy pack versions are immutable in Pulumi Cloud).
    policies Sequence[PolicyPackPolicyInputArgs]
    Metadata for each policy in the pack.
    name String
    Policy pack name (unique within the org).
    organization String
    Organization name.
    sourcePath String
    Path to the directory containing the policy pack source. The directory is tarballed and uploaded.
    versionTag String
    Semantic version tag (e.g. "1.0.0"). Versions are immutable; change to publish a new version.
    displayName String
    Optional display name. Changing it requires a new versionTag (policy pack versions are immutable in Pulumi Cloud).
    policies List<Property Map>
    Metadata for each policy in the pack.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PolicyPack resource produces the following output properties:

    ContentHash string
    Id string
    The provider-assigned unique ID for this managed resource.
    Version int
    ContentHash string
    Id string
    The provider-assigned unique ID for this managed resource.
    Version int
    content_hash string
    id string
    The provider-assigned unique ID for this managed resource.
    version number
    contentHash String
    id String
    The provider-assigned unique ID for this managed resource.
    version Integer
    contentHash string
    id string
    The provider-assigned unique ID for this managed resource.
    version number
    content_hash str
    id str
    The provider-assigned unique ID for this managed resource.
    version int
    contentHash String
    id String
    The provider-assigned unique ID for this managed resource.
    version Number

    Supporting Types

    PolicyPackComplianceFrameworkInput, PolicyPackComplianceFrameworkInputArgs

    Name string
    Compliance framework name (e.g. "PCI-DSS", "SOC2").
    Reference string
    Reference to the framework (e.g. a control ID).
    Specification string
    Free-form specification text.
    Version string
    Compliance framework version.
    Name string
    Compliance framework name (e.g. "PCI-DSS", "SOC2").
    Reference string
    Reference to the framework (e.g. a control ID).
    Specification string
    Free-form specification text.
    Version string
    Compliance framework version.
    name string
    Compliance framework name (e.g. "PCI-DSS", "SOC2").
    reference string
    Reference to the framework (e.g. a control ID).
    specification string
    Free-form specification text.
    version string
    Compliance framework version.
    name String
    Compliance framework name (e.g. "PCI-DSS", "SOC2").
    reference String
    Reference to the framework (e.g. a control ID).
    specification String
    Free-form specification text.
    version String
    Compliance framework version.
    name string
    Compliance framework name (e.g. "PCI-DSS", "SOC2").
    reference string
    Reference to the framework (e.g. a control ID).
    specification string
    Free-form specification text.
    version string
    Compliance framework version.
    name str
    Compliance framework name (e.g. "PCI-DSS", "SOC2").
    reference str
    Reference to the framework (e.g. a control ID).
    specification str
    Free-form specification text.
    version str
    Compliance framework version.
    name String
    Compliance framework name (e.g. "PCI-DSS", "SOC2").
    reference String
    Reference to the framework (e.g. a control ID).
    specification String
    Free-form specification text.
    version String
    Compliance framework version.

    PolicyPackPolicyInput, PolicyPackPolicyInputArgs

    Name string
    Unique policy name within the pack.
    ConfigSchema Dictionary<string, object>
    JSON Schema (properties/required/type) for the policy's runtime config. Values are supplied per-policy via the PolicyGroup's policyPacks[].config map.
    Description string
    DisplayName string
    EnforcementLevel string
    One of: advisory, mandatory, remediate, disabled.
    Framework Pulumi.PulumiService.Inputs.PolicyPackComplianceFrameworkInput
    Compliance framework this policy belongs to.
    Message string
    RemediationSteps string
    Description of steps to remediate a violation.
    Severity string
    Severity level: low, medium, high, or critical.
    Tags List<string>
    Tags associated with the policy.
    Url string
    URL with more information about the policy.
    Name string
    Unique policy name within the pack.
    ConfigSchema map[string]interface{}
    JSON Schema (properties/required/type) for the policy's runtime config. Values are supplied per-policy via the PolicyGroup's policyPacks[].config map.
    Description string
    DisplayName string
    EnforcementLevel string
    One of: advisory, mandatory, remediate, disabled.
    Framework PolicyPackComplianceFrameworkInput
    Compliance framework this policy belongs to.
    Message string
    RemediationSteps string
    Description of steps to remediate a violation.
    Severity string
    Severity level: low, medium, high, or critical.
    Tags []string
    Tags associated with the policy.
    Url string
    URL with more information about the policy.
    name string
    Unique policy name within the pack.
    config_schema map(any)
    JSON Schema (properties/required/type) for the policy's runtime config. Values are supplied per-policy via the PolicyGroup's policyPacks[].config map.
    description string
    display_name string
    enforcement_level string
    One of: advisory, mandatory, remediate, disabled.
    framework object
    Compliance framework this policy belongs to.
    message string
    remediation_steps string
    Description of steps to remediate a violation.
    severity string
    Severity level: low, medium, high, or critical.
    tags list(string)
    Tags associated with the policy.
    url string
    URL with more information about the policy.
    name String
    Unique policy name within the pack.
    configSchema Map<String,Object>
    JSON Schema (properties/required/type) for the policy's runtime config. Values are supplied per-policy via the PolicyGroup's policyPacks[].config map.
    description String
    displayName String
    enforcementLevel String
    One of: advisory, mandatory, remediate, disabled.
    framework PolicyPackComplianceFrameworkInput
    Compliance framework this policy belongs to.
    message String
    remediationSteps String
    Description of steps to remediate a violation.
    severity String
    Severity level: low, medium, high, or critical.
    tags List<String>
    Tags associated with the policy.
    url String
    URL with more information about the policy.
    name string
    Unique policy name within the pack.
    configSchema {[key: string]: any}
    JSON Schema (properties/required/type) for the policy's runtime config. Values are supplied per-policy via the PolicyGroup's policyPacks[].config map.
    description string
    displayName string
    enforcementLevel string
    One of: advisory, mandatory, remediate, disabled.
    framework PolicyPackComplianceFrameworkInput
    Compliance framework this policy belongs to.
    message string
    remediationSteps string
    Description of steps to remediate a violation.
    severity string
    Severity level: low, medium, high, or critical.
    tags string[]
    Tags associated with the policy.
    url string
    URL with more information about the policy.
    name str
    Unique policy name within the pack.
    config_schema Mapping[str, Any]
    JSON Schema (properties/required/type) for the policy's runtime config. Values are supplied per-policy via the PolicyGroup's policyPacks[].config map.
    description str
    display_name str
    enforcement_level str
    One of: advisory, mandatory, remediate, disabled.
    framework PolicyPackComplianceFrameworkInput
    Compliance framework this policy belongs to.
    message str
    remediation_steps str
    Description of steps to remediate a violation.
    severity str
    Severity level: low, medium, high, or critical.
    tags Sequence[str]
    Tags associated with the policy.
    url str
    URL with more information about the policy.
    name String
    Unique policy name within the pack.
    configSchema Map<Any>
    JSON Schema (properties/required/type) for the policy's runtime config. Values are supplied per-policy via the PolicyGroup's policyPacks[].config map.
    description String
    displayName String
    enforcementLevel String
    One of: advisory, mandatory, remediate, disabled.
    framework Property Map
    Compliance framework this policy belongs to.
    message String
    remediationSteps String
    Description of steps to remediate a violation.
    severity String
    Severity level: low, medium, high, or critical.
    tags List<String>
    Tags associated with the policy.
    url String
    URL with more information about the policy.

    Package Details

    Repository
    pulumiservice pulumi/pulumi-pulumiservice
    License
    Apache-2.0
    pulumiservice logo

    This provider is currently in preview.

    Viewing docs for Pulumi Cloud v1.2.0
    published on Thursday, May 28, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial