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 string
- The unique name of the resource.
- args AppConfigArgs
- 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 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 string
- The unique name of the resource.
- args AppConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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,
});
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),
})
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());
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)
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,
});
type: heroku:review:AppConfig
properties:
automaticReviewApps: false
baseName: string
deployTarget:
id: string
type: string
destroyStaleApps: false
orgRepo: string
pipelineId: string
staleDays: 0
waitForCi: false
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:
- Deploy
Target Pulumiverse.Heroku. Review. Inputs. App Config Deploy Target - Provides a key/value pair to specify whether to use a common runtime or a private space.
- Org
Repo string - The full_name of the repository that you want to enable review-apps from.
Example
heroku/homebrew-brew
. - Pipeline
Id string - The UUID of an existing pipeline.
- Automatic
Review boolApps - If true, this will trigger the creation of review apps when pull-requests
are opened in the repo. Defaults to
false
. - Base
Name string - A unique prefix that will be used to create review app names.
- Destroy
Stale boolApps - If
true
, this will trigger automatic deletion of review apps when they’re stale. Defaults tofalse
. - 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 between1
and30
inclusive. - Wait
For boolCi - If true, review apps will only be created when CI passes. Defaults to
false
.
- Deploy
Target AppConfig Deploy Target Args - Provides a key/value pair to specify whether to use a common runtime or a private space.
- Org
Repo string - The full_name of the repository that you want to enable review-apps from.
Example
heroku/homebrew-brew
. - Pipeline
Id string - The UUID of an existing pipeline.
- Automatic
Review boolApps - If true, this will trigger the creation of review apps when pull-requests
are opened in the repo. Defaults to
false
. - Base
Name string - A unique prefix that will be used to create review app names.
- Destroy
Stale boolApps - If
true
, this will trigger automatic deletion of review apps when they’re stale. Defaults tofalse
. - 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 between1
and30
inclusive. - Wait
For boolCi - If true, review apps will only be created when CI passes. Defaults to
false
.
- deploy
Target AppConfig Deploy Target - Provides a key/value pair to specify whether to use a common runtime or a private space.
- org
Repo String - The full_name of the repository that you want to enable review-apps from.
Example
heroku/homebrew-brew
. - pipeline
Id String - The UUID of an existing pipeline.
- automatic
Review BooleanApps - If true, this will trigger the creation of review apps when pull-requests
are opened in the repo. Defaults to
false
. - base
Name String - A unique prefix that will be used to create review app names.
- destroy
Stale BooleanApps - If
true
, this will trigger automatic deletion of review apps when they’re stale. Defaults tofalse
. - stale
Days 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 between1
and30
inclusive. - wait
For BooleanCi - If true, review apps will only be created when CI passes. Defaults to
false
.
- deploy
Target AppConfig Deploy Target - Provides a key/value pair to specify whether to use a common runtime or a private space.
- org
Repo string - The full_name of the repository that you want to enable review-apps from.
Example
heroku/homebrew-brew
. - pipeline
Id string - The UUID of an existing pipeline.
- automatic
Review booleanApps - If true, this will trigger the creation of review apps when pull-requests
are opened in the repo. Defaults to
false
. - base
Name string - A unique prefix that will be used to create review app names.
- destroy
Stale booleanApps - If
true
, this will trigger automatic deletion of review apps when they’re stale. Defaults tofalse
. - stale
Days 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 between1
and30
inclusive. - wait
For booleanCi - If true, review apps will only be created when CI passes. Defaults to
false
.
- deploy_
target AppConfig Deploy Target Args - Provides a key/value pair to specify whether to use a common runtime or a private space.
- org_
repo str - The full_name of the repository that you want to enable review-apps from.
Example
heroku/homebrew-brew
. - pipeline_
id str - The UUID of an existing pipeline.
- automatic_
review_ boolapps - 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_ boolapps - If
true
, this will trigger automatic deletion of review apps when they’re stale. Defaults tofalse
. - 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 between1
and30
inclusive. - wait_
for_ boolci - If true, review apps will only be created when CI passes. Defaults to
false
.
- deploy
Target Property Map - Provides a key/value pair to specify whether to use a common runtime or a private space.
- org
Repo String - The full_name of the repository that you want to enable review-apps from.
Example
heroku/homebrew-brew
. - pipeline
Id String - The UUID of an existing pipeline.
- automatic
Review BooleanApps - If true, this will trigger the creation of review apps when pull-requests
are opened in the repo. Defaults to
false
. - base
Name String - A unique prefix that will be used to create review app names.
- destroy
Stale BooleanApps - If
true
, this will trigger automatic deletion of review apps when they’re stale. Defaults tofalse
. - stale
Days 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 between1
and30
inclusive. - wait
For BooleanCi - 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:
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
- 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.
- Automatic
Review boolApps - If true, this will trigger the creation of review apps when pull-requests
are opened in the repo. Defaults to
false
. - Base
Name string - A unique prefix that will be used to create review app names.
- Deploy
Target Pulumiverse.Heroku. Review. Inputs. App Config Deploy Target - Provides a key/value pair to specify whether to use a common runtime or a private space.
- Destroy
Stale boolApps - If
true
, this will trigger automatic deletion of review apps when they’re stale. Defaults tofalse
. - Org
Repo string - The full_name of the repository that you want to enable review-apps from.
Example
heroku/homebrew-brew
. - Pipeline
Id string - 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 between1
and30
inclusive. - Wait
For boolCi - If true, review apps will only be created when CI passes. Defaults to
false
.
- Automatic
Review boolApps - If true, this will trigger the creation of review apps when pull-requests
are opened in the repo. Defaults to
false
. - Base
Name string - A unique prefix that will be used to create review app names.
- Deploy
Target AppConfig Deploy Target Args - Provides a key/value pair to specify whether to use a common runtime or a private space.
- Destroy
Stale boolApps - If
true
, this will trigger automatic deletion of review apps when they’re stale. Defaults tofalse
. - Org
Repo string - The full_name of the repository that you want to enable review-apps from.
Example
heroku/homebrew-brew
. - Pipeline
Id string - 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 between1
and30
inclusive. - Wait
For boolCi - If true, review apps will only be created when CI passes. Defaults to
false
.
- automatic
Review BooleanApps - If true, this will trigger the creation of review apps when pull-requests
are opened in the repo. Defaults to
false
. - base
Name String - A unique prefix that will be used to create review app names.
- deploy
Target AppConfig Deploy Target - Provides a key/value pair to specify whether to use a common runtime or a private space.
- destroy
Stale BooleanApps - If
true
, this will trigger automatic deletion of review apps when they’re stale. Defaults tofalse
. - org
Repo String - The full_name of the repository that you want to enable review-apps from.
Example
heroku/homebrew-brew
. - pipeline
Id String - The UUID of an existing pipeline.
- repo
Id Integer - stale
Days 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 between1
and30
inclusive. - wait
For BooleanCi - If true, review apps will only be created when CI passes. Defaults to
false
.
- automatic
Review booleanApps - If true, this will trigger the creation of review apps when pull-requests
are opened in the repo. Defaults to
false
. - base
Name string - A unique prefix that will be used to create review app names.
- deploy
Target AppConfig Deploy Target - Provides a key/value pair to specify whether to use a common runtime or a private space.
- destroy
Stale booleanApps - If
true
, this will trigger automatic deletion of review apps when they’re stale. Defaults tofalse
. - org
Repo string - The full_name of the repository that you want to enable review-apps from.
Example
heroku/homebrew-brew
. - pipeline
Id string - The UUID of an existing pipeline.
- repo
Id number - stale
Days 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 between1
and30
inclusive. - wait
For booleanCi - If true, review apps will only be created when CI passes. Defaults to
false
.
- automatic_
review_ boolapps - 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 AppConfig Deploy Target Args - Provides a key/value pair to specify whether to use a common runtime or a private space.
- destroy_
stale_ boolapps - If
true
, this will trigger automatic deletion of review apps when they’re stale. Defaults tofalse
. - org_
repo str - The full_name of the repository that you want to enable review-apps from.
Example
heroku/homebrew-brew
. - pipeline_
id 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 between1
and30
inclusive. - wait_
for_ boolci - If true, review apps will only be created when CI passes. Defaults to
false
.
- automatic
Review BooleanApps - If true, this will trigger the creation of review apps when pull-requests
are opened in the repo. Defaults to
false
. - base
Name String - A unique prefix that will be used to create review app names.
- deploy
Target Property Map - Provides a key/value pair to specify whether to use a common runtime or a private space.
- destroy
Stale BooleanApps - If
true
, this will trigger automatic deletion of review apps when they’re stale. Defaults tofalse
. - org
Repo String - The full_name of the repository that you want to enable review-apps from.
Example
heroku/homebrew-brew
. - pipeline
Id String - The UUID of an existing pipeline.
- repo
Id Number - stale
Days 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 between1
and30
inclusive. - wait
For BooleanCi - If true, review apps will only be created when CI passes. Defaults to
false
.
Supporting Types
AppConfigDeployTarget, AppConfigDeployTargetArgs
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
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.