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

heroku.addon.Attachment

Explore with Pulumi AI

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

    Attaches a Heroku Addon Resource to an additional Heroku App.

    Example Usage

    resource "heroku_addon_attachment" "database" {
      app_id  = heroku_app.default.id
      addon_id = heroku_addon.database.id
    }
    
    // attach postgres credentials
    resource "heroku_addon_attachment" "database_credentials" {
      app_id  = heroku_app.default.id
      addon_id = heroku_addon.database.id
      namespace = "credential:${var.credential_name}"
    }
    

    Create Attachment Resource

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

    Constructor syntax

    new Attachment(name: string, args: AttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def Attachment(resource_name: str,
                   args: AttachmentArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Attachment(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   addon_id: Optional[str] = None,
                   app_id: Optional[str] = None,
                   name: Optional[str] = None,
                   namespace: Optional[str] = None)
    func NewAttachment(ctx *Context, name string, args AttachmentArgs, opts ...ResourceOption) (*Attachment, error)
    public Attachment(string name, AttachmentArgs args, CustomResourceOptions? opts = null)
    public Attachment(String name, AttachmentArgs args)
    public Attachment(String name, AttachmentArgs args, CustomResourceOptions options)
    
    type: heroku:addon:Attachment
    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 AttachmentArgs
    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 AttachmentArgs
    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 AttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AttachmentArgs
    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 attachmentResource = new Heroku.Addon.Attachment("attachmentResource", new()
    {
        AddonId = "string",
        AppId = "string",
        Name = "string",
        Namespace = "string",
    });
    
    example, err := addon.NewAttachment(ctx, "attachmentResource", &addon.AttachmentArgs{
    	AddonId:   pulumi.String("string"),
    	AppId:     pulumi.String("string"),
    	Name:      pulumi.String("string"),
    	Namespace: pulumi.String("string"),
    })
    
    var attachmentResource = new Attachment("attachmentResource", AttachmentArgs.builder()
        .addonId("string")
        .appId("string")
        .name("string")
        .namespace("string")
        .build());
    
    attachment_resource = heroku.addon.Attachment("attachmentResource",
        addon_id="string",
        app_id="string",
        name="string",
        namespace="string")
    
    const attachmentResource = new heroku.addon.Attachment("attachmentResource", {
        addonId: "string",
        appId: "string",
        name: "string",
        namespace: "string",
    });
    
    type: heroku:addon:Attachment
    properties:
        addonId: string
        appId: string
        name: string
        namespace: string
    

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

    AddonId string
    The ID of the existing Heroku Addon to attach.
    AppId string
    Heroku app ID (do not use app name)
    Name string
    A friendly name for the Heroku Addon Attachment.
    Namespace string
    The namespace value for the Heroku Addon Attachment. This can be used to configure the behaviour of the attachment. See Heroku Platform API Reference
    AddonId string
    The ID of the existing Heroku Addon to attach.
    AppId string
    Heroku app ID (do not use app name)
    Name string
    A friendly name for the Heroku Addon Attachment.
    Namespace string
    The namespace value for the Heroku Addon Attachment. This can be used to configure the behaviour of the attachment. See Heroku Platform API Reference
    addonId String
    The ID of the existing Heroku Addon to attach.
    appId String
    Heroku app ID (do not use app name)
    name String
    A friendly name for the Heroku Addon Attachment.
    namespace String
    The namespace value for the Heroku Addon Attachment. This can be used to configure the behaviour of the attachment. See Heroku Platform API Reference
    addonId string
    The ID of the existing Heroku Addon to attach.
    appId string
    Heroku app ID (do not use app name)
    name string
    A friendly name for the Heroku Addon Attachment.
    namespace string
    The namespace value for the Heroku Addon Attachment. This can be used to configure the behaviour of the attachment. See Heroku Platform API Reference
    addon_id str
    The ID of the existing Heroku Addon to attach.
    app_id str
    Heroku app ID (do not use app name)
    name str
    A friendly name for the Heroku Addon Attachment.
    namespace str
    The namespace value for the Heroku Addon Attachment. This can be used to configure the behaviour of the attachment. See Heroku Platform API Reference
    addonId String
    The ID of the existing Heroku Addon to attach.
    appId String
    Heroku app ID (do not use app name)
    name String
    A friendly name for the Heroku Addon Attachment.
    namespace String
    The namespace value for the Heroku Addon Attachment. This can be used to configure the behaviour of the attachment. See Heroku Platform API Reference

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Attachment Resource

    Get an existing Attachment 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?: AttachmentState, opts?: CustomResourceOptions): Attachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            addon_id: Optional[str] = None,
            app_id: Optional[str] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None) -> Attachment
    func GetAttachment(ctx *Context, name string, id IDInput, state *AttachmentState, opts ...ResourceOption) (*Attachment, error)
    public static Attachment Get(string name, Input<string> id, AttachmentState? state, CustomResourceOptions? opts = null)
    public static Attachment get(String name, Output<String> id, AttachmentState state, CustomResourceOptions options)
    resources:  _:    type: heroku:addon:Attachment    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:
    AddonId string
    The ID of the existing Heroku Addon to attach.
    AppId string
    Heroku app ID (do not use app name)
    Name string
    A friendly name for the Heroku Addon Attachment.
    Namespace string
    The namespace value for the Heroku Addon Attachment. This can be used to configure the behaviour of the attachment. See Heroku Platform API Reference
    AddonId string
    The ID of the existing Heroku Addon to attach.
    AppId string
    Heroku app ID (do not use app name)
    Name string
    A friendly name for the Heroku Addon Attachment.
    Namespace string
    The namespace value for the Heroku Addon Attachment. This can be used to configure the behaviour of the attachment. See Heroku Platform API Reference
    addonId String
    The ID of the existing Heroku Addon to attach.
    appId String
    Heroku app ID (do not use app name)
    name String
    A friendly name for the Heroku Addon Attachment.
    namespace String
    The namespace value for the Heroku Addon Attachment. This can be used to configure the behaviour of the attachment. See Heroku Platform API Reference
    addonId string
    The ID of the existing Heroku Addon to attach.
    appId string
    Heroku app ID (do not use app name)
    name string
    A friendly name for the Heroku Addon Attachment.
    namespace string
    The namespace value for the Heroku Addon Attachment. This can be used to configure the behaviour of the attachment. See Heroku Platform API Reference
    addon_id str
    The ID of the existing Heroku Addon to attach.
    app_id str
    Heroku app ID (do not use app name)
    name str
    A friendly name for the Heroku Addon Attachment.
    namespace str
    The namespace value for the Heroku Addon Attachment. This can be used to configure the behaviour of the attachment. See Heroku Platform API Reference
    addonId String
    The ID of the existing Heroku Addon to attach.
    appId String
    Heroku app ID (do not use app name)
    name String
    A friendly name for the Heroku Addon Attachment.
    namespace String
    The namespace value for the Heroku Addon Attachment. This can be used to configure the behaviour of the attachment. See Heroku Platform API Reference

    Import

    Addons can be imported using the unique Addon Attachment id, e.g.

    $ pulumi import heroku:addon/attachment:Attachment foobar 01234567-89ab-cdef-0123-456789abcdef
    

    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