1. Packages
  2. Heroku Provider
  3. API Docs
  4. slug
  5. Slug
Heroku v1.0.4 published on Tuesday, Apr 8, 2025 by pulumiverse - Marcel Arns

heroku.slug.Slug

Explore with Pulumi AI

heroku logo
Heroku v1.0.4 published on Tuesday, Apr 8, 2025 by pulumiverse - Marcel Arns

    Example Usage

    Complete config to launch a Heroku app:

    resource "heroku_app" "foobar" {
        name = "foobar"
        region = "us"
    }
    
    # Create a slug for the app with a local slug archive file
    resource "heroku_slug" "foobar" {
      app_id                         = heroku_app.foobar.id
      buildpack_provided_description = "Ruby"
      // The slug archive file must already exist
      file_path                      = "slug.tgz"
    
      process_types = {
        web = "ruby server.rb"
      }
    }
    
    # Deploy a release to the app with the slug
    resource "heroku_app_release" "foobar" {
      app_id  = heroku_app.foobar.id
      slug_id = heroku_slug.foobar.id
    }
    
    # Launch the app's web process by scaling-up
    resource "heroku_formation" "foobar" {
      app_id     = heroku_app.foobar.id
      type       = "web"
      quantity   = 1
      size       = "Standard-1x"
      depends_on = ["heroku_app_release.foobar"]
    }
    

    Create Slug Resource

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

    Constructor syntax

    new Slug(name: string, args: SlugArgs, opts?: CustomResourceOptions);
    @overload
    def Slug(resource_name: str,
             args: SlugArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Slug(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             app_id: Optional[str] = None,
             process_types: Optional[Mapping[str, str]] = None,
             buildpack_provided_description: Optional[str] = None,
             checksum: Optional[str] = None,
             commit: Optional[str] = None,
             commit_description: Optional[str] = None,
             file_path: Optional[str] = None,
             file_url: Optional[str] = None,
             stack: Optional[str] = None)
    func NewSlug(ctx *Context, name string, args SlugArgs, opts ...ResourceOption) (*Slug, error)
    public Slug(string name, SlugArgs args, CustomResourceOptions? opts = null)
    public Slug(String name, SlugArgs args)
    public Slug(String name, SlugArgs args, CustomResourceOptions options)
    
    type: heroku:slug:Slug
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SlugArgs
    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 SlugArgs
    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 SlugArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SlugArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SlugArgs
    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 slugResource = new Heroku.Slug.Slug("slugResource", new()
    {
        AppId = "string",
        ProcessTypes = 
        {
            { "string", "string" },
        },
        BuildpackProvidedDescription = "string",
        Checksum = "string",
        Commit = "string",
        CommitDescription = "string",
        FilePath = "string",
        FileUrl = "string",
        Stack = "string",
    });
    
    example, err := slug.NewSlug(ctx, "slugResource", &slug.SlugArgs{
    	AppId: pulumi.String("string"),
    	ProcessTypes: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	BuildpackProvidedDescription: pulumi.String("string"),
    	Checksum:                     pulumi.String("string"),
    	Commit:                       pulumi.String("string"),
    	CommitDescription:            pulumi.String("string"),
    	FilePath:                     pulumi.String("string"),
    	FileUrl:                      pulumi.String("string"),
    	Stack:                        pulumi.String("string"),
    })
    
    var slugResource = new Slug("slugResource", SlugArgs.builder()
        .appId("string")
        .processTypes(Map.of("string", "string"))
        .buildpackProvidedDescription("string")
        .checksum("string")
        .commit("string")
        .commitDescription("string")
        .filePath("string")
        .fileUrl("string")
        .stack("string")
        .build());
    
    slug_resource = heroku.slug.Slug("slugResource",
        app_id="string",
        process_types={
            "string": "string",
        },
        buildpack_provided_description="string",
        checksum="string",
        commit="string",
        commit_description="string",
        file_path="string",
        file_url="string",
        stack="string")
    
    const slugResource = new heroku.slug.Slug("slugResource", {
        appId: "string",
        processTypes: {
            string: "string",
        },
        buildpackProvidedDescription: "string",
        checksum: "string",
        commit: "string",
        commitDescription: "string",
        filePath: "string",
        fileUrl: "string",
        stack: "string",
    });
    
    type: heroku:slug:Slug
    properties:
        appId: string
        buildpackProvidedDescription: string
        checksum: string
        commit: string
        commitDescription: string
        filePath: string
        fileUrl: string
        processTypes:
            string: string
        stack: string
    

    Slug 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 Slug resource accepts the following input properties:

    AppId string
    Heroku app ID (do not use app name)
    ProcessTypes Dictionary<string, string>
    Map of processes to launch on Heroku Dynos
    BuildpackProvidedDescription string
    Description of language or app framework, "Ruby/Rack"; displayed as the app's language in the Heroku Dashboard
    Checksum string
    Hash of the slug for verifying its integrity, auto-generated from contents of file_path or file_url, SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    Commit string
    Identification of the code with your version control system (eg: SHA of the git HEAD), "60883d9e8947a57e04dc9124f25df004866a2051"
    CommitDescription string
    Description of the provided commit
    FilePath string
    Local path to a slug archive, "slugs/current.tgz"
    FileUrl string
    https URL to a slug archive, "https://example.com/slugs/app-v1.tgz"
    Stack string
    Name or ID of the Heroku stack
    AppId string
    Heroku app ID (do not use app name)
    ProcessTypes map[string]string
    Map of processes to launch on Heroku Dynos
    BuildpackProvidedDescription string
    Description of language or app framework, "Ruby/Rack"; displayed as the app's language in the Heroku Dashboard
    Checksum string
    Hash of the slug for verifying its integrity, auto-generated from contents of file_path or file_url, SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    Commit string
    Identification of the code with your version control system (eg: SHA of the git HEAD), "60883d9e8947a57e04dc9124f25df004866a2051"
    CommitDescription string
    Description of the provided commit
    FilePath string
    Local path to a slug archive, "slugs/current.tgz"
    FileUrl string
    https URL to a slug archive, "https://example.com/slugs/app-v1.tgz"
    Stack string
    Name or ID of the Heroku stack
    appId String
    Heroku app ID (do not use app name)
    processTypes Map<String,String>
    Map of processes to launch on Heroku Dynos
    buildpackProvidedDescription String
    Description of language or app framework, "Ruby/Rack"; displayed as the app's language in the Heroku Dashboard
    checksum String
    Hash of the slug for verifying its integrity, auto-generated from contents of file_path or file_url, SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    commit String
    Identification of the code with your version control system (eg: SHA of the git HEAD), "60883d9e8947a57e04dc9124f25df004866a2051"
    commitDescription String
    Description of the provided commit
    filePath String
    Local path to a slug archive, "slugs/current.tgz"
    fileUrl String
    https URL to a slug archive, "https://example.com/slugs/app-v1.tgz"
    stack String
    Name or ID of the Heroku stack
    appId string
    Heroku app ID (do not use app name)
    processTypes {[key: string]: string}
    Map of processes to launch on Heroku Dynos
    buildpackProvidedDescription string
    Description of language or app framework, "Ruby/Rack"; displayed as the app's language in the Heroku Dashboard
    checksum string
    Hash of the slug for verifying its integrity, auto-generated from contents of file_path or file_url, SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    commit string
    Identification of the code with your version control system (eg: SHA of the git HEAD), "60883d9e8947a57e04dc9124f25df004866a2051"
    commitDescription string
    Description of the provided commit
    filePath string
    Local path to a slug archive, "slugs/current.tgz"
    fileUrl string
    https URL to a slug archive, "https://example.com/slugs/app-v1.tgz"
    stack string
    Name or ID of the Heroku stack
    app_id str
    Heroku app ID (do not use app name)
    process_types Mapping[str, str]
    Map of processes to launch on Heroku Dynos
    buildpack_provided_description str
    Description of language or app framework, "Ruby/Rack"; displayed as the app's language in the Heroku Dashboard
    checksum str
    Hash of the slug for verifying its integrity, auto-generated from contents of file_path or file_url, SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    commit str
    Identification of the code with your version control system (eg: SHA of the git HEAD), "60883d9e8947a57e04dc9124f25df004866a2051"
    commit_description str
    Description of the provided commit
    file_path str
    Local path to a slug archive, "slugs/current.tgz"
    file_url str
    https URL to a slug archive, "https://example.com/slugs/app-v1.tgz"
    stack str
    Name or ID of the Heroku stack
    appId String
    Heroku app ID (do not use app name)
    processTypes Map<String>
    Map of processes to launch on Heroku Dynos
    buildpackProvidedDescription String
    Description of language or app framework, "Ruby/Rack"; displayed as the app's language in the Heroku Dashboard
    checksum String
    Hash of the slug for verifying its integrity, auto-generated from contents of file_path or file_url, SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    commit String
    Identification of the code with your version control system (eg: SHA of the git HEAD), "60883d9e8947a57e04dc9124f25df004866a2051"
    commitDescription String
    Description of the provided commit
    filePath String
    Local path to a slug archive, "slugs/current.tgz"
    fileUrl String
    https URL to a slug archive, "https://example.com/slugs/app-v1.tgz"
    stack String
    Name or ID of the Heroku stack

    Outputs

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

    Blobs List<Pulumiverse.Heroku.Slug.Outputs.SlugBlob>
    Slug archive (compressed tar of executable code)
    Id string
    The provider-assigned unique ID for this managed resource.
    Size int
    Slug archive filesize in bytes
    StackId string
    Heroku stack ID
    Blobs []SlugBlob
    Slug archive (compressed tar of executable code)
    Id string
    The provider-assigned unique ID for this managed resource.
    Size int
    Slug archive filesize in bytes
    StackId string
    Heroku stack ID
    blobs List<SlugBlob>
    Slug archive (compressed tar of executable code)
    id String
    The provider-assigned unique ID for this managed resource.
    size Integer
    Slug archive filesize in bytes
    stackId String
    Heroku stack ID
    blobs SlugBlob[]
    Slug archive (compressed tar of executable code)
    id string
    The provider-assigned unique ID for this managed resource.
    size number
    Slug archive filesize in bytes
    stackId string
    Heroku stack ID
    blobs Sequence[SlugBlob]
    Slug archive (compressed tar of executable code)
    id str
    The provider-assigned unique ID for this managed resource.
    size int
    Slug archive filesize in bytes
    stack_id str
    Heroku stack ID
    blobs List<Property Map>
    Slug archive (compressed tar of executable code)
    id String
    The provider-assigned unique ID for this managed resource.
    size Number
    Slug archive filesize in bytes
    stackId String
    Heroku stack ID

    Look up Existing Slug Resource

    Get an existing Slug resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SlugState, opts?: CustomResourceOptions): Slug
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_id: Optional[str] = None,
            blobs: Optional[Sequence[SlugBlobArgs]] = None,
            buildpack_provided_description: Optional[str] = None,
            checksum: Optional[str] = None,
            commit: Optional[str] = None,
            commit_description: Optional[str] = None,
            file_path: Optional[str] = None,
            file_url: Optional[str] = None,
            process_types: Optional[Mapping[str, str]] = None,
            size: Optional[int] = None,
            stack: Optional[str] = None,
            stack_id: Optional[str] = None) -> Slug
    func GetSlug(ctx *Context, name string, id IDInput, state *SlugState, opts ...ResourceOption) (*Slug, error)
    public static Slug Get(string name, Input<string> id, SlugState? state, CustomResourceOptions? opts = null)
    public static Slug get(String name, Output<String> id, SlugState state, CustomResourceOptions options)
    resources:  _:    type: heroku:slug:Slug    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AppId string
    Heroku app ID (do not use app name)
    Blobs List<Pulumiverse.Heroku.Slug.Inputs.SlugBlob>
    Slug archive (compressed tar of executable code)
    BuildpackProvidedDescription string
    Description of language or app framework, "Ruby/Rack"; displayed as the app's language in the Heroku Dashboard
    Checksum string
    Hash of the slug for verifying its integrity, auto-generated from contents of file_path or file_url, SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    Commit string
    Identification of the code with your version control system (eg: SHA of the git HEAD), "60883d9e8947a57e04dc9124f25df004866a2051"
    CommitDescription string
    Description of the provided commit
    FilePath string
    Local path to a slug archive, "slugs/current.tgz"
    FileUrl string
    https URL to a slug archive, "https://example.com/slugs/app-v1.tgz"
    ProcessTypes Dictionary<string, string>
    Map of processes to launch on Heroku Dynos
    Size int
    Slug archive filesize in bytes
    Stack string
    Name or ID of the Heroku stack
    StackId string
    Heroku stack ID
    AppId string
    Heroku app ID (do not use app name)
    Blobs []SlugBlobArgs
    Slug archive (compressed tar of executable code)
    BuildpackProvidedDescription string
    Description of language or app framework, "Ruby/Rack"; displayed as the app's language in the Heroku Dashboard
    Checksum string
    Hash of the slug for verifying its integrity, auto-generated from contents of file_path or file_url, SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    Commit string
    Identification of the code with your version control system (eg: SHA of the git HEAD), "60883d9e8947a57e04dc9124f25df004866a2051"
    CommitDescription string
    Description of the provided commit
    FilePath string
    Local path to a slug archive, "slugs/current.tgz"
    FileUrl string
    https URL to a slug archive, "https://example.com/slugs/app-v1.tgz"
    ProcessTypes map[string]string
    Map of processes to launch on Heroku Dynos
    Size int
    Slug archive filesize in bytes
    Stack string
    Name or ID of the Heroku stack
    StackId string
    Heroku stack ID
    appId String
    Heroku app ID (do not use app name)
    blobs List<SlugBlob>
    Slug archive (compressed tar of executable code)
    buildpackProvidedDescription String
    Description of language or app framework, "Ruby/Rack"; displayed as the app's language in the Heroku Dashboard
    checksum String
    Hash of the slug for verifying its integrity, auto-generated from contents of file_path or file_url, SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    commit String
    Identification of the code with your version control system (eg: SHA of the git HEAD), "60883d9e8947a57e04dc9124f25df004866a2051"
    commitDescription String
    Description of the provided commit
    filePath String
    Local path to a slug archive, "slugs/current.tgz"
    fileUrl String
    https URL to a slug archive, "https://example.com/slugs/app-v1.tgz"
    processTypes Map<String,String>
    Map of processes to launch on Heroku Dynos
    size Integer
    Slug archive filesize in bytes
    stack String
    Name or ID of the Heroku stack
    stackId String
    Heroku stack ID
    appId string
    Heroku app ID (do not use app name)
    blobs SlugBlob[]
    Slug archive (compressed tar of executable code)
    buildpackProvidedDescription string
    Description of language or app framework, "Ruby/Rack"; displayed as the app's language in the Heroku Dashboard
    checksum string
    Hash of the slug for verifying its integrity, auto-generated from contents of file_path or file_url, SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    commit string
    Identification of the code with your version control system (eg: SHA of the git HEAD), "60883d9e8947a57e04dc9124f25df004866a2051"
    commitDescription string
    Description of the provided commit
    filePath string
    Local path to a slug archive, "slugs/current.tgz"
    fileUrl string
    https URL to a slug archive, "https://example.com/slugs/app-v1.tgz"
    processTypes {[key: string]: string}
    Map of processes to launch on Heroku Dynos
    size number
    Slug archive filesize in bytes
    stack string
    Name or ID of the Heroku stack
    stackId string
    Heroku stack ID
    app_id str
    Heroku app ID (do not use app name)
    blobs Sequence[SlugBlobArgs]
    Slug archive (compressed tar of executable code)
    buildpack_provided_description str
    Description of language or app framework, "Ruby/Rack"; displayed as the app's language in the Heroku Dashboard
    checksum str
    Hash of the slug for verifying its integrity, auto-generated from contents of file_path or file_url, SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    commit str
    Identification of the code with your version control system (eg: SHA of the git HEAD), "60883d9e8947a57e04dc9124f25df004866a2051"
    commit_description str
    Description of the provided commit
    file_path str
    Local path to a slug archive, "slugs/current.tgz"
    file_url str
    https URL to a slug archive, "https://example.com/slugs/app-v1.tgz"
    process_types Mapping[str, str]
    Map of processes to launch on Heroku Dynos
    size int
    Slug archive filesize in bytes
    stack str
    Name or ID of the Heroku stack
    stack_id str
    Heroku stack ID
    appId String
    Heroku app ID (do not use app name)
    blobs List<Property Map>
    Slug archive (compressed tar of executable code)
    buildpackProvidedDescription String
    Description of language or app framework, "Ruby/Rack"; displayed as the app's language in the Heroku Dashboard
    checksum String
    Hash of the slug for verifying its integrity, auto-generated from contents of file_path or file_url, SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    commit String
    Identification of the code with your version control system (eg: SHA of the git HEAD), "60883d9e8947a57e04dc9124f25df004866a2051"
    commitDescription String
    Description of the provided commit
    filePath String
    Local path to a slug archive, "slugs/current.tgz"
    fileUrl String
    https URL to a slug archive, "https://example.com/slugs/app-v1.tgz"
    processTypes Map<String>
    Map of processes to launch on Heroku Dynos
    size Number
    Slug archive filesize in bytes
    stack String
    Name or ID of the Heroku stack
    stackId String
    Heroku stack ID

    Supporting Types

    SlugBlob, SlugBlobArgs

    Method string
    HTTP method to upload the archive
    Url string
    Pre-signed, expiring URL to upload the archive
    Method string
    HTTP method to upload the archive
    Url string
    Pre-signed, expiring URL to upload the archive
    method String
    HTTP method to upload the archive
    url String
    Pre-signed, expiring URL to upload the archive
    method string
    HTTP method to upload the archive
    url string
    Pre-signed, expiring URL to upload the archive
    method str
    HTTP method to upload the archive
    url str
    Pre-signed, expiring URL to upload the archive
    method String
    HTTP method to upload the archive
    url String
    Pre-signed, expiring URL to upload the archive

    Import

    Existing slugs can be imported using the combination of the application name, a colon, and the slug ID.

    For example:

    $ pulumi import heroku:slug/slug:Slug foobar bazbux:4f1db8ef-ed5c-4c42-a3d6-3c28262d5abc
    
    • foobar is the heroku_slug resource’s name

    • bazbux is the Heroku app name (or ID) that the slug belongs to

    • : separates the app identifier & the slug identifier

    • 4f1db8ef… is the slug ID

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    heroku pulumiverse/pulumi-heroku
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the heroku Terraform Provider.
    heroku logo
    Heroku v1.0.4 published on Tuesday, Apr 8, 2025 by pulumiverse - Marcel Arns