heroku.slug.Slug
Explore with Pulumi AI
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)
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:
- App
Id string - Heroku app ID (do not use app name)
- Process
Types Dictionary<string, string> - Map of processes to launch on Heroku Dynos
- Buildpack
Provided stringDescription - 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
orfile_url
,SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- Commit string
- Identification of the code with your version control system (eg: SHA of the git HEAD),
"60883d9e8947a57e04dc9124f25df004866a2051"
- Commit
Description string - Description of the provided commit
- File
Path string - Local path to a slug archive,
"slugs/current.tgz"
- File
Url 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 string - Heroku app ID (do not use app name)
- Process
Types map[string]string - Map of processes to launch on Heroku Dynos
- Buildpack
Provided stringDescription - 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
orfile_url
,SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- Commit string
- Identification of the code with your version control system (eg: SHA of the git HEAD),
"60883d9e8947a57e04dc9124f25df004866a2051"
- Commit
Description string - Description of the provided commit
- File
Path string - Local path to a slug archive,
"slugs/current.tgz"
- File
Url 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 String - Heroku app ID (do not use app name)
- process
Types Map<String,String> - Map of processes to launch on Heroku Dynos
- buildpack
Provided StringDescription - 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
orfile_url
,SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- commit String
- Identification of the code with your version control system (eg: SHA of the git HEAD),
"60883d9e8947a57e04dc9124f25df004866a2051"
- commit
Description String - Description of the provided commit
- file
Path String - Local path to a slug archive,
"slugs/current.tgz"
- file
Url 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 string - Heroku app ID (do not use app name)
- process
Types {[key: string]: string} - Map of processes to launch on Heroku Dynos
- buildpack
Provided stringDescription - 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
orfile_url
,SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- commit string
- Identification of the code with your version control system (eg: SHA of the git HEAD),
"60883d9e8947a57e04dc9124f25df004866a2051"
- commit
Description string - Description of the provided commit
- file
Path string - Local path to a slug archive,
"slugs/current.tgz"
- file
Url 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_ strdescription - 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
orfile_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
- app
Id String - Heroku app ID (do not use app name)
- process
Types Map<String> - Map of processes to launch on Heroku Dynos
- buildpack
Provided StringDescription - 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
orfile_url
,SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- commit String
- Identification of the code with your version control system (eg: SHA of the git HEAD),
"60883d9e8947a57e04dc9124f25df004866a2051"
- commit
Description String - Description of the provided commit
- file
Path String - Local path to a slug archive,
"slugs/current.tgz"
- file
Url 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. Slug Blob> - 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
- Stack
Id string - Heroku stack ID
- Blobs
[]Slug
Blob - 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
- Stack
Id string - Heroku stack ID
- blobs
List<Slug
Blob> - 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
- stack
Id String - Heroku stack ID
- blobs
Slug
Blob[] - 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
- stack
Id string - Heroku stack ID
- blobs
Sequence[Slug
Blob] - 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
- stack
Id 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.
- App
Id string - Heroku app ID (do not use app name)
- Blobs
List<Pulumiverse.
Heroku. Slug. Inputs. Slug Blob> - Slug archive (compressed tar of executable code)
- Buildpack
Provided stringDescription - 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
orfile_url
,SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- Commit string
- Identification of the code with your version control system (eg: SHA of the git HEAD),
"60883d9e8947a57e04dc9124f25df004866a2051"
- Commit
Description string - Description of the provided commit
- File
Path string - Local path to a slug archive,
"slugs/current.tgz"
- File
Url string - https URL to a slug archive,
"https://example.com/slugs/app-v1.tgz"
- Process
Types 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
- Stack
Id string - Heroku stack ID
- App
Id string - Heroku app ID (do not use app name)
- Blobs
[]Slug
Blob Args - Slug archive (compressed tar of executable code)
- Buildpack
Provided stringDescription - 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
orfile_url
,SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- Commit string
- Identification of the code with your version control system (eg: SHA of the git HEAD),
"60883d9e8947a57e04dc9124f25df004866a2051"
- Commit
Description string - Description of the provided commit
- File
Path string - Local path to a slug archive,
"slugs/current.tgz"
- File
Url string - https URL to a slug archive,
"https://example.com/slugs/app-v1.tgz"
- Process
Types 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
- Stack
Id string - Heroku stack ID
- app
Id String - Heroku app ID (do not use app name)
- blobs
List<Slug
Blob> - Slug archive (compressed tar of executable code)
- buildpack
Provided StringDescription - 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
orfile_url
,SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- commit String
- Identification of the code with your version control system (eg: SHA of the git HEAD),
"60883d9e8947a57e04dc9124f25df004866a2051"
- commit
Description String - Description of the provided commit
- file
Path String - Local path to a slug archive,
"slugs/current.tgz"
- file
Url String - https URL to a slug archive,
"https://example.com/slugs/app-v1.tgz"
- process
Types 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
- stack
Id String - Heroku stack ID
- app
Id string - Heroku app ID (do not use app name)
- blobs
Slug
Blob[] - Slug archive (compressed tar of executable code)
- buildpack
Provided stringDescription - 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
orfile_url
,SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- commit string
- Identification of the code with your version control system (eg: SHA of the git HEAD),
"60883d9e8947a57e04dc9124f25df004866a2051"
- commit
Description string - Description of the provided commit
- file
Path string - Local path to a slug archive,
"slugs/current.tgz"
- file
Url string - https URL to a slug archive,
"https://example.com/slugs/app-v1.tgz"
- process
Types {[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
- stack
Id string - Heroku stack ID
- app_
id str - Heroku app ID (do not use app name)
- blobs
Sequence[Slug
Blob Args] - Slug archive (compressed tar of executable code)
- buildpack_
provided_ strdescription - 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
orfile_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
- app
Id String - Heroku app ID (do not use app name)
- blobs List<Property Map>
- Slug archive (compressed tar of executable code)
- buildpack
Provided StringDescription - 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
orfile_url
,SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- commit String
- Identification of the code with your version control system (eg: SHA of the git HEAD),
"60883d9e8947a57e04dc9124f25df004866a2051"
- commit
Description String - Description of the provided commit
- file
Path String - Local path to a slug archive,
"slugs/current.tgz"
- file
Url String - https URL to a slug archive,
"https://example.com/slugs/app-v1.tgz"
- process
Types 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
- stack
Id String - Heroku stack ID
Supporting Types
SlugBlob, SlugBlobArgs
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 namebazbux
is the Heroku app name (or ID) that the slug belongs to:
separates the app identifier & the slug identifier4f1db8ef…
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.