Class ComponentResource<TData>

ComponentResource is a resource that aggregates one or more other child resources into a higher level abstraction. The component resource itself is a resource, but does not require custom CRUD operations for provisioning.

Type Parameters

  • TData = any

Hierarchy (view full)

Constructors

  • Creates and registers a new component resource. type is the fully qualified type token and name is the "name" part to use in creating a stable and globally unique URN for the object. opts.parent is the optional parent for this component, and opts.dependsOn is an optional list of other resources that this resource depends on, controlling the order in which we perform resource operations.

    Type Parameters

    • TData = any

    Parameters

    • type: string

      The type of the resource.

    • name: string

      The unique name of the resource.

    • args: Inputs = {}

      Information passed to [initialize] method.

    • opts: ComponentResourceOptions = {}

      A bag of options that control this resource's behavior.

    • remote: boolean = false

      True if this is a remote component resource.

    Returns ComponentResource<TData>

Properties

urn: Output<string>

The stable logical URN used to distinctly address a resource, both before and after deployments.

Methods

  • Can be overridden by a subclass to asynchronously initialize data for this component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use getData.

    Parameters

    Returns Promise<TData>

  • Registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.

    Component resources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.

    Parameters

    Returns void

Generated using TypeDoc