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

heroku.review.AppConfig

Explore with Pulumi AI

Provides a resource for configuring review apps. Using this resource also enables review apps for a pipeline.

IMPORTANT! This resource can only be used after you create a pipeline, and the pipeline has been connected to a Github repository. Please visit this help article for more information.

Example Usage

data "heroku_pipeline" "test-pipeline" {
  name = "test pipeline"
}

resource "heroku_review_app_config" "foobar" {
  pipeline_id = data.heroku_pipeline.test-pipeline.id
  org_repo = "yourcompany/yourrepo"
  automatic_review_apps = true
  base_name = "yourcompany"

  deploy_target {
    id   = "us"
    type = "region"
  }

  destroy_stale_apps = true
  stale_days = 5
  wait_for_ci = true
}

Create AppConfig Resource

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

Constructor syntax

new AppConfig(name: string, args: AppConfigArgs, opts?: CustomResourceOptions);
@overload
def AppConfig(resource_name: str,
              args: AppConfigArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def AppConfig(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              deploy_target: Optional[AppConfigDeployTargetArgs] = None,
              org_repo: Optional[str] = None,
              pipeline_id: Optional[str] = None,
              automatic_review_apps: Optional[bool] = None,
              base_name: Optional[str] = None,
              destroy_stale_apps: Optional[bool] = None,
              stale_days: Optional[int] = None,
              wait_for_ci: Optional[bool] = None)
func NewAppConfig(ctx *Context, name string, args AppConfigArgs, opts ...ResourceOption) (*AppConfig, error)
public AppConfig(string name, AppConfigArgs args, CustomResourceOptions? opts = null)
public AppConfig(String name, AppConfigArgs args)
public AppConfig(String name, AppConfigArgs args, CustomResourceOptions options)
type: heroku:review:AppConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AppConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AppConfigArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AppConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AppConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AppConfigArgs
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 appConfigResource = new Heroku.Review.AppConfig("appConfigResource", new()
{
    DeployTarget = new Heroku.Review.Inputs.AppConfigDeployTargetArgs
    {
        Id = "string",
        Type = "string",
    },
    OrgRepo = "string",
    PipelineId = "string",
    AutomaticReviewApps = false,
    BaseName = "string",
    DestroyStaleApps = false,
    StaleDays = 0,
    WaitForCi = false,
});
Copy
example, err := review.NewAppConfig(ctx, "appConfigResource", &review.AppConfigArgs{
	DeployTarget: &review.AppConfigDeployTargetArgs{
		Id:   pulumi.String("string"),
		Type: pulumi.String("string"),
	},
	OrgRepo:             pulumi.String("string"),
	PipelineId:          pulumi.String("string"),
	AutomaticReviewApps: pulumi.Bool(false),
	BaseName:            pulumi.String("string"),
	DestroyStaleApps:    pulumi.Bool(false),
	StaleDays:           pulumi.Int(0),
	WaitForCi:           pulumi.Bool(false),
})
Copy
var appConfigResource = new AppConfig("appConfigResource", AppConfigArgs.builder()
    .deployTarget(AppConfigDeployTargetArgs.builder()
        .id("string")
        .type("string")
        .build())
    .orgRepo("string")
    .pipelineId("string")
    .automaticReviewApps(false)
    .baseName("string")
    .destroyStaleApps(false)
    .staleDays(0)
    .waitForCi(false)
    .build());
Copy
app_config_resource = heroku.review.AppConfig("appConfigResource",
    deploy_target={
        "id": "string",
        "type": "string",
    },
    org_repo="string",
    pipeline_id="string",
    automatic_review_apps=False,
    base_name="string",
    destroy_stale_apps=False,
    stale_days=0,
    wait_for_ci=False)
Copy
const appConfigResource = new heroku.review.AppConfig("appConfigResource", {
    deployTarget: {
        id: "string",
        type: "string",
    },
    orgRepo: "string",
    pipelineId: "string",
    automaticReviewApps: false,
    baseName: "string",
    destroyStaleApps: false,
    staleDays: 0,
    waitForCi: false,
});
Copy
type: heroku:review:AppConfig
properties:
    automaticReviewApps: false
    baseName: string
    deployTarget:
        id: string
        type: string
    destroyStaleApps: false
    orgRepo: string
    pipelineId: string
    staleDays: 0
    waitForCi: false
Copy

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

DeployTarget This property is required. Pulumiverse.Heroku.Review.Inputs.AppConfigDeployTarget
Provides a key/value pair to specify whether to use a common runtime or a private space.
OrgRepo
This property is required.
Changes to this property will trigger replacement.
string
The full_name of the repository that you want to enable review-apps from. Example heroku/homebrew-brew.
PipelineId
This property is required.
Changes to this property will trigger replacement.
string
The UUID of an existing pipeline.
AutomaticReviewApps bool
If true, this will trigger the creation of review apps when pull-requests are opened in the repo. Defaults to false.
BaseName string
A unique prefix that will be used to create review app names.
DestroyStaleApps bool
If true, this will trigger automatic deletion of review apps when they’re stale. Defaults to false.
StaleDays int
Destroy stale review apps automatically after these many days without any deploys. Must be set with destroy_stale_apps and value needs to be between 1 and 30 inclusive.
WaitForCi bool
If true, review apps will only be created when CI passes. Defaults to false.
DeployTarget This property is required. AppConfigDeployTargetArgs
Provides a key/value pair to specify whether to use a common runtime or a private space.
OrgRepo
This property is required.
Changes to this property will trigger replacement.
string
The full_name of the repository that you want to enable review-apps from. Example heroku/homebrew-brew.
PipelineId
This property is required.
Changes to this property will trigger replacement.
string
The UUID of an existing pipeline.
AutomaticReviewApps bool
If true, this will trigger the creation of review apps when pull-requests are opened in the repo. Defaults to false.
BaseName string
A unique prefix that will be used to create review app names.
DestroyStaleApps bool
If true, this will trigger automatic deletion of review apps when they’re stale. Defaults to false.
StaleDays int
Destroy stale review apps automatically after these many days without any deploys. Must be set with destroy_stale_apps and value needs to be between 1 and 30 inclusive.
WaitForCi bool
If true, review apps will only be created when CI passes. Defaults to false.
deployTarget This property is required. AppConfigDeployTarget
Provides a key/value pair to specify whether to use a common runtime or a private space.
orgRepo
This property is required.
Changes to this property will trigger replacement.
String
The full_name of the repository that you want to enable review-apps from. Example heroku/homebrew-brew.
pipelineId
This property is required.
Changes to this property will trigger replacement.
String
The UUID of an existing pipeline.
automaticReviewApps Boolean
If true, this will trigger the creation of review apps when pull-requests are opened in the repo. Defaults to false.
baseName String
A unique prefix that will be used to create review app names.
destroyStaleApps Boolean
If true, this will trigger automatic deletion of review apps when they’re stale. Defaults to false.
staleDays Integer
Destroy stale review apps automatically after these many days without any deploys. Must be set with destroy_stale_apps and value needs to be between 1 and 30 inclusive.
waitForCi Boolean
If true, review apps will only be created when CI passes. Defaults to false.
deployTarget This property is required. AppConfigDeployTarget
Provides a key/value pair to specify whether to use a common runtime or a private space.
orgRepo
This property is required.
Changes to this property will trigger replacement.
string
The full_name of the repository that you want to enable review-apps from. Example heroku/homebrew-brew.
pipelineId
This property is required.
Changes to this property will trigger replacement.
string
The UUID of an existing pipeline.
automaticReviewApps boolean
If true, this will trigger the creation of review apps when pull-requests are opened in the repo. Defaults to false.
baseName string
A unique prefix that will be used to create review app names.
destroyStaleApps boolean
If true, this will trigger automatic deletion of review apps when they’re stale. Defaults to false.
staleDays number
Destroy stale review apps automatically after these many days without any deploys. Must be set with destroy_stale_apps and value needs to be between 1 and 30 inclusive.
waitForCi boolean
If true, review apps will only be created when CI passes. Defaults to false.
deploy_target This property is required. AppConfigDeployTargetArgs
Provides a key/value pair to specify whether to use a common runtime or a private space.
org_repo
This property is required.
Changes to this property will trigger replacement.
str
The full_name of the repository that you want to enable review-apps from. Example heroku/homebrew-brew.
pipeline_id
This property is required.
Changes to this property will trigger replacement.
str
The UUID of an existing pipeline.
automatic_review_apps bool
If true, this will trigger the creation of review apps when pull-requests are opened in the repo. Defaults to false.
base_name str
A unique prefix that will be used to create review app names.
destroy_stale_apps bool
If true, this will trigger automatic deletion of review apps when they’re stale. Defaults to false.
stale_days int
Destroy stale review apps automatically after these many days without any deploys. Must be set with destroy_stale_apps and value needs to be between 1 and 30 inclusive.
wait_for_ci bool
If true, review apps will only be created when CI passes. Defaults to false.
deployTarget This property is required. Property Map
Provides a key/value pair to specify whether to use a common runtime or a private space.
orgRepo
This property is required.
Changes to this property will trigger replacement.
String
The full_name of the repository that you want to enable review-apps from. Example heroku/homebrew-brew.
pipelineId
This property is required.
Changes to this property will trigger replacement.
String
The UUID of an existing pipeline.
automaticReviewApps Boolean
If true, this will trigger the creation of review apps when pull-requests are opened in the repo. Defaults to false.
baseName String
A unique prefix that will be used to create review app names.
destroyStaleApps Boolean
If true, this will trigger automatic deletion of review apps when they’re stale. Defaults to false.
staleDays Number
Destroy stale review apps automatically after these many days without any deploys. Must be set with destroy_stale_apps and value needs to be between 1 and 30 inclusive.
waitForCi Boolean
If true, review apps will only be created when CI passes. Defaults to false.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
RepoId int
Id string
The provider-assigned unique ID for this managed resource.
RepoId int
id String
The provider-assigned unique ID for this managed resource.
repoId Integer
id string
The provider-assigned unique ID for this managed resource.
repoId number
id str
The provider-assigned unique ID for this managed resource.
repo_id int
id String
The provider-assigned unique ID for this managed resource.
repoId Number

Look up Existing AppConfig Resource

Get an existing AppConfig 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?: AppConfigState, opts?: CustomResourceOptions): AppConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        automatic_review_apps: Optional[bool] = None,
        base_name: Optional[str] = None,
        deploy_target: Optional[AppConfigDeployTargetArgs] = None,
        destroy_stale_apps: Optional[bool] = None,
        org_repo: Optional[str] = None,
        pipeline_id: Optional[str] = None,
        repo_id: Optional[int] = None,
        stale_days: Optional[int] = None,
        wait_for_ci: Optional[bool] = None) -> AppConfig
func GetAppConfig(ctx *Context, name string, id IDInput, state *AppConfigState, opts ...ResourceOption) (*AppConfig, error)
public static AppConfig Get(string name, Input<string> id, AppConfigState? state, CustomResourceOptions? opts = null)
public static AppConfig get(String name, Output<String> id, AppConfigState state, CustomResourceOptions options)
resources:  _:    type: heroku:review:AppConfig    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AutomaticReviewApps bool
If true, this will trigger the creation of review apps when pull-requests are opened in the repo. Defaults to false.
BaseName string
A unique prefix that will be used to create review app names.
DeployTarget Pulumiverse.Heroku.Review.Inputs.AppConfigDeployTarget
Provides a key/value pair to specify whether to use a common runtime or a private space.
DestroyStaleApps bool
If true, this will trigger automatic deletion of review apps when they’re stale. Defaults to false.
OrgRepo Changes to this property will trigger replacement. string
The full_name of the repository that you want to enable review-apps from. Example heroku/homebrew-brew.
PipelineId Changes to this property will trigger replacement. string
The UUID of an existing pipeline.
RepoId int
StaleDays int
Destroy stale review apps automatically after these many days without any deploys. Must be set with destroy_stale_apps and value needs to be between 1 and 30 inclusive.
WaitForCi bool
If true, review apps will only be created when CI passes. Defaults to false.
AutomaticReviewApps bool
If true, this will trigger the creation of review apps when pull-requests are opened in the repo. Defaults to false.
BaseName string
A unique prefix that will be used to create review app names.
DeployTarget AppConfigDeployTargetArgs
Provides a key/value pair to specify whether to use a common runtime or a private space.
DestroyStaleApps bool
If true, this will trigger automatic deletion of review apps when they’re stale. Defaults to false.
OrgRepo Changes to this property will trigger replacement. string
The full_name of the repository that you want to enable review-apps from. Example heroku/homebrew-brew.
PipelineId Changes to this property will trigger replacement. string
The UUID of an existing pipeline.
RepoId int
StaleDays int
Destroy stale review apps automatically after these many days without any deploys. Must be set with destroy_stale_apps and value needs to be between 1 and 30 inclusive.
WaitForCi bool
If true, review apps will only be created when CI passes. Defaults to false.
automaticReviewApps Boolean
If true, this will trigger the creation of review apps when pull-requests are opened in the repo. Defaults to false.
baseName String
A unique prefix that will be used to create review app names.
deployTarget AppConfigDeployTarget
Provides a key/value pair to specify whether to use a common runtime or a private space.
destroyStaleApps Boolean
If true, this will trigger automatic deletion of review apps when they’re stale. Defaults to false.
orgRepo Changes to this property will trigger replacement. String
The full_name of the repository that you want to enable review-apps from. Example heroku/homebrew-brew.
pipelineId Changes to this property will trigger replacement. String
The UUID of an existing pipeline.
repoId Integer
staleDays Integer
Destroy stale review apps automatically after these many days without any deploys. Must be set with destroy_stale_apps and value needs to be between 1 and 30 inclusive.
waitForCi Boolean
If true, review apps will only be created when CI passes. Defaults to false.
automaticReviewApps boolean
If true, this will trigger the creation of review apps when pull-requests are opened in the repo. Defaults to false.
baseName string
A unique prefix that will be used to create review app names.
deployTarget AppConfigDeployTarget
Provides a key/value pair to specify whether to use a common runtime or a private space.
destroyStaleApps boolean
If true, this will trigger automatic deletion of review apps when they’re stale. Defaults to false.
orgRepo Changes to this property will trigger replacement. string
The full_name of the repository that you want to enable review-apps from. Example heroku/homebrew-brew.
pipelineId Changes to this property will trigger replacement. string
The UUID of an existing pipeline.
repoId number
staleDays number
Destroy stale review apps automatically after these many days without any deploys. Must be set with destroy_stale_apps and value needs to be between 1 and 30 inclusive.
waitForCi boolean
If true, review apps will only be created when CI passes. Defaults to false.
automatic_review_apps bool
If true, this will trigger the creation of review apps when pull-requests are opened in the repo. Defaults to false.
base_name str
A unique prefix that will be used to create review app names.
deploy_target AppConfigDeployTargetArgs
Provides a key/value pair to specify whether to use a common runtime or a private space.
destroy_stale_apps bool
If true, this will trigger automatic deletion of review apps when they’re stale. Defaults to false.
org_repo Changes to this property will trigger replacement. str
The full_name of the repository that you want to enable review-apps from. Example heroku/homebrew-brew.
pipeline_id Changes to this property will trigger replacement. str
The UUID of an existing pipeline.
repo_id int
stale_days int
Destroy stale review apps automatically after these many days without any deploys. Must be set with destroy_stale_apps and value needs to be between 1 and 30 inclusive.
wait_for_ci bool
If true, review apps will only be created when CI passes. Defaults to false.
automaticReviewApps Boolean
If true, this will trigger the creation of review apps when pull-requests are opened in the repo. Defaults to false.
baseName String
A unique prefix that will be used to create review app names.
deployTarget Property Map
Provides a key/value pair to specify whether to use a common runtime or a private space.
destroyStaleApps Boolean
If true, this will trigger automatic deletion of review apps when they’re stale. Defaults to false.
orgRepo Changes to this property will trigger replacement. String
The full_name of the repository that you want to enable review-apps from. Example heroku/homebrew-brew.
pipelineId Changes to this property will trigger replacement. String
The UUID of an existing pipeline.
repoId Number
staleDays Number
Destroy stale review apps automatically after these many days without any deploys. Must be set with destroy_stale_apps and value needs to be between 1 and 30 inclusive.
waitForCi Boolean
If true, review apps will only be created when CI passes. Defaults to false.

Supporting Types

AppConfigDeployTarget
, AppConfigDeployTargetArgs

Id This property is required. string
Unique identifier of deploy target.
Type This property is required. string
Type of deploy target. Must be either space or region.
Id This property is required. string
Unique identifier of deploy target.
Type This property is required. string
Type of deploy target. Must be either space or region.
id This property is required. String
Unique identifier of deploy target.
type This property is required. String
Type of deploy target. Must be either space or region.
id This property is required. string
Unique identifier of deploy target.
type This property is required. string
Type of deploy target. Must be either space or region.
id This property is required. str
Unique identifier of deploy target.
type This property is required. str
Type of deploy target. Must be either space or region.
id This property is required. String
Unique identifier of deploy target.
type This property is required. String
Type of deploy target. Must be either space or region.

Import

An Existing review app config using the combination of the pipeline UUID and the Github organization/repository

separated by a colon.

$ pulumi import heroku:review/appConfig:AppConfig foobar afd193fb-7c5a-4d8f-afad-2388f4e6049d:heroku/homebrew-brew
Copy

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.