Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TerraformInjectorElementContainerAsync<TerraformElementType, SharedType>

Injectable terraform element container. You cannot instantiate directly, only by yourInjector.provide or yourInjector.backend(for backend only).

Type Parameters

  • TerraformElementType extends TerraformElement

  • SharedType

Hierarchy

Implemented by

Index

Accessors

  • get element(): TerraformElementType
  • get shared(): SharedType

Methods

  • addOutput(outputId: string | ((elementId: string) => string), outputConfig: ((element: TerraformElementType, shared: SharedType) => TerraformOutputConfig | Promise<TerraformOutputConfig>)): TerraformInjectorElementContainerAsync<TerraformElementType, SharedType>
  • Add TerraformOutput. You can provide output element by provide method of injector but sometime, it would be more clear using addOutput method for each element.

    see

    https://www.terraform.io/cdktf/concepts/variables-and-outputs

    Parameters

    • outputId: string | ((elementId: string) => string)

      Id string for output element. It could either be a string or another callback that retunrs a string. Likewise, it also has to be unique amongst other siblings.

    • outputConfig: ((element: TerraformElementType, shared: SharedType) => TerraformOutputConfig | Promise<TerraformOutputConfig>)

      Configuration callbak for TerraformOutput class.

        • (element: TerraformElementType, shared: SharedType): TerraformOutputConfig | Promise<TerraformOutputConfig>
        • Parameters

          • element: TerraformElementType
          • shared: SharedType

          Returns TerraformOutputConfig | Promise<TerraformOutputConfig>

    Returns TerraformInjectorElementContainerAsync<TerraformElementType, SharedType>

  • afterDependenciesInjected(afterDependenciesInjectedCallback: ((element: TerraformElementType, shared: SharedType) => void | Promise<void>)): TerraformInjectorElementContainerAsync<TerraformElementType, SharedType>
  • Add after dependencies injected callback. Callback will run after dependency injection process is completed.

    You can add multiple callbacks, then they will be executed in sequence.

    Parameters

    • afterDependenciesInjectedCallback: ((element: TerraformElementType, shared: SharedType) => void | Promise<void>)

      Action block to execute after di process

        • (element: TerraformElementType, shared: SharedType): void | Promise<void>
        • Parameters

          • element: TerraformElementType
          • shared: SharedType

          Returns void | Promise<void>

    Returns TerraformInjectorElementContainerAsync<TerraformElementType, SharedType>

  • Add after init callback. Callbacks will run right after this element is initialized.

    You can add multiple callbacks, then they will be executed in sequence.

    Parameters

    • afterInitCallback: ((element: TerraformElementType, shared: SharedType) => void | Promise<void>)

      Action block to execute right after element is created.

        • (element: TerraformElementType, shared: SharedType): void | Promise<void>
        • Parameters

          • element: TerraformElementType
          • shared: SharedType

          Returns void | Promise<void>

    Returns TerraformInjectorElementContainerAsync<TerraformElementType, SharedType>

Generated using TypeDoc