heroku.addon.Addon
Explore with Pulumi AI
Provides a Heroku Add-On resource. These can be attach services to a Heroku app.
Example Usage
# Create a new Heroku app
resource "heroku_app" "default" {
name = "test-app"
}
# Create a database, and configure the app to use it
resource "heroku_addon" "database" {
app_id = heroku_app.default.id
plan = "heroku-postgresql:standard-0"
}
Create Addon Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Addon(name: string, args: AddonArgs, opts?: CustomResourceOptions);
@overload
def Addon(resource_name: str,
args: AddonArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Addon(resource_name: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
plan: Optional[str] = None,
config: Optional[Mapping[str, str]] = None,
name: Optional[str] = None)
func NewAddon(ctx *Context, name string, args AddonArgs, opts ...ResourceOption) (*Addon, error)
public Addon(string name, AddonArgs args, CustomResourceOptions? opts = null)
type: heroku:addon:Addon
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 AddonArgs
- 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 AddonArgs
- 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 AddonArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AddonArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AddonArgs
- 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 addonResource = new Heroku.Addon.Addon("addonResource", new()
{
AppId = "string",
Plan = "string",
Config =
{
{ "string", "string" },
},
Name = "string",
});
example, err := addon.NewAddon(ctx, "addonResource", &addon.AddonArgs{
AppId: pulumi.String("string"),
Plan: pulumi.String("string"),
Config: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
})
var addonResource = new Addon("addonResource", AddonArgs.builder()
.appId("string")
.plan("string")
.config(Map.of("string", "string"))
.name("string")
.build());
addon_resource = heroku.addon.Addon("addonResource",
app_id="string",
plan="string",
config={
"string": "string",
},
name="string")
const addonResource = new heroku.addon.Addon("addonResource", {
appId: "string",
plan: "string",
config: {
string: "string",
},
name: "string",
});
type: heroku:addon:Addon
properties:
appId: string
config:
string: string
name: string
plan: string
Addon 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 Addon resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the Addon resource produces the following output properties:
- Config
Var Dictionary<string, string>Values - Config
Vars List<string> - The Configuration variables of the add-on
- Id string
- The provider-assigned unique ID for this managed resource.
- Provider
Id string - The ID of the plan provider
- Config
Var map[string]stringValues - Config
Vars []string - The Configuration variables of the add-on
- Id string
- The provider-assigned unique ID for this managed resource.
- Provider
Id string - The ID of the plan provider
- config
Var Map<String,String>Values - config
Vars List<String> - The Configuration variables of the add-on
- id String
- The provider-assigned unique ID for this managed resource.
- provider
Id String - The ID of the plan provider
- config
Var {[key: string]: string}Values - config
Vars string[] - The Configuration variables of the add-on
- id string
- The provider-assigned unique ID for this managed resource.
- provider
Id string - The ID of the plan provider
- config_
var_ Mapping[str, str]values - config_
vars Sequence[str] - The Configuration variables of the add-on
- id str
- The provider-assigned unique ID for this managed resource.
- provider_
id str - The ID of the plan provider
- config
Var Map<String>Values - config
Vars List<String> - The Configuration variables of the add-on
- id String
- The provider-assigned unique ID for this managed resource.
- provider
Id String - The ID of the plan provider
Look up Existing Addon Resource
Get an existing Addon 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?: AddonState, opts?: CustomResourceOptions): Addon
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
config: Optional[Mapping[str, str]] = None,
config_var_values: Optional[Mapping[str, str]] = None,
config_vars: Optional[Sequence[str]] = None,
name: Optional[str] = None,
plan: Optional[str] = None,
provider_id: Optional[str] = None) -> Addon
func GetAddon(ctx *Context, name string, id IDInput, state *AddonState, opts ...ResourceOption) (*Addon, error)
public static Addon Get(string name, Input<string> id, AddonState? state, CustomResourceOptions? opts = null)
public static Addon get(String name, Output<String> id, AddonState state, CustomResourceOptions options)
resources: _: type: heroku:addon:Addon 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)
- Config Dictionary<string, string>
- Optional plan configuration.
- Config
Var Dictionary<string, string>Values - Config
Vars List<string> - The Configuration variables of the add-on
- Name string
- Globally unique name of the add-on.
- Plan string
- The addon to add.
- Provider
Id string - The ID of the plan provider
- App
Id string - Heroku app ID (do not use app name)
- Config map[string]string
- Optional plan configuration.
- Config
Var map[string]stringValues - Config
Vars []string - The Configuration variables of the add-on
- Name string
- Globally unique name of the add-on.
- Plan string
- The addon to add.
- Provider
Id string - The ID of the plan provider
- app
Id String - Heroku app ID (do not use app name)
- config Map<String,String>
- Optional plan configuration.
- config
Var Map<String,String>Values - config
Vars List<String> - The Configuration variables of the add-on
- name String
- Globally unique name of the add-on.
- plan String
- The addon to add.
- provider
Id String - The ID of the plan provider
- app
Id string - Heroku app ID (do not use app name)
- config {[key: string]: string}
- Optional plan configuration.
- config
Var {[key: string]: string}Values - config
Vars string[] - The Configuration variables of the add-on
- name string
- Globally unique name of the add-on.
- plan string
- The addon to add.
- provider
Id string - The ID of the plan provider
- app_
id str - Heroku app ID (do not use app name)
- config Mapping[str, str]
- Optional plan configuration.
- config_
var_ Mapping[str, str]values - config_
vars Sequence[str] - The Configuration variables of the add-on
- name str
- Globally unique name of the add-on.
- plan str
- The addon to add.
- provider_
id str - The ID of the plan provider
- app
Id String - Heroku app ID (do not use app name)
- config Map<String>
- Optional plan configuration.
- config
Var Map<String>Values - config
Vars List<String> - The Configuration variables of the add-on
- name String
- Globally unique name of the add-on.
- plan String
- The addon to add.
- provider
Id String - The ID of the plan provider
Import
Addons can be imported using the Addon id
, e.g.
$ pulumi import heroku:addon/addon:Addon foobar 12345678
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.