Class DataResource

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInterpolatingParent, ITerraformAddressable, ITerraformDependable, ITerraformResource, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.93.0 (build 1706ca5)", date="2024-01-15T15:38:00.878Z") @Stability(Experimental) public class DataResource extends TerraformResource
(experimental) The DataResource implements the standard resource lifecycle, but does not directly take any other actions.

You can use the DataResource resource without requiring or configuring a provider.

The DataResource resource is useful for storing values which need to follow a manage resource lifecycle, and for triggering provisioners when there is no other logical managed resource in which to place them.

It requires Terraform 1.4 or later.

It is also possible to generate these bindings by adding "terraform.io/builtin/terraform" to the "terraformProviders" key in your cdktf.json file and running "cdktf get".

https://developer.hashicorp.com/terraform/language/resources/terraform-data

  • Field Details

    • TF_RESOURCE_TYPE

      @Stability(Experimental) public static final String TF_RESOURCE_TYPE
  • Constructor Details

    • DataResource

      protected DataResource(software.amazon.jsii.JsiiObjectRef objRef)
    • DataResource

      protected DataResource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • DataResource

      @Stability(Experimental) public DataResource(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable DataConfig config)
      (experimental) Create a new TerraformData Resource.

      The DataResource resource is useful for storing values which need to follow a manage resource lifecycle, and for triggering provisioners when there is no other logical managed resource in which to place them.

      Parameters:
      scope - The scope in which to define this construct. This parameter is required.
      id - The scoped construct ID. This parameter is required.
      config -
    • DataResource

      @Stability(Experimental) public DataResource(@NotNull software.constructs.Construct scope, @NotNull String id)
      (experimental) Create a new TerraformData Resource.

      The DataResource resource is useful for storing values which need to follow a manage resource lifecycle, and for triggering provisioners when there is no other logical managed resource in which to place them.

      Parameters:
      scope - The scope in which to define this construct. This parameter is required.
      id - The scoped construct ID. This parameter is required.
  • Method Details

    • generateConfigForImport

      @Stability(Experimental) @NotNull public static ImportableResource generateConfigForImport(@NotNull software.constructs.Construct scope, @NotNull String importToId, @NotNull String importFromId, @Nullable TerraformProvider provider)
      (experimental) Generates CDKTF code for importing a Data resource upon running "cdktf plan invalid input: '<'stack-name>".

      Parameters:
      scope - The scope in which to define this construct. This parameter is required.
      importToId - The construct id used in the generated config for the Data to import. This parameter is required.
      importFromId - The id of the existing Data that should be imported. This parameter is required.
      provider - ? Optional instance of the provider where the Data to import is found.
    • generateConfigForImport

      @Stability(Experimental) @NotNull public static ImportableResource generateConfigForImport(@NotNull software.constructs.Construct scope, @NotNull String importToId, @NotNull String importFromId)
      (experimental) Generates CDKTF code for importing a Data resource upon running "cdktf plan invalid input: '<'stack-name>".

      Parameters:
      scope - The scope in which to define this construct. This parameter is required.
      importToId - The construct id used in the generated config for the Data to import. This parameter is required.
      importFromId - The id of the existing Data that should be imported. This parameter is required.
    • resetInput

      @Stability(Experimental) public void resetInput()
    • resetTriggersReplace

      @Stability(Experimental) public void resetTriggersReplace()
    • synthesizeAttributes

      @Stability(Experimental) @NotNull protected Map<String,Object> synthesizeAttributes()
      Overrides:
      synthesizeAttributes in class TerraformResource
    • synthesizeHclAttributes

      @Stability(Experimental) @NotNull protected Map<String,Object> synthesizeHclAttributes()
      Overrides:
      synthesizeHclAttributes in class TerraformResource
    • getId

      @Stability(Experimental) @NotNull public String getId()
    • getOutput

      @Stability(Experimental) @NotNull public AnyMap getOutput()
    • getInputInput

      @Stability(Experimental) @Nullable public Map<String,Object> getInputInput()
    • getTriggersReplaceInput

      @Stability(Experimental) @Nullable public Map<String,Object> getTriggersReplaceInput()
    • getInput

      @Stability(Experimental) @NotNull public Map<String,Object> getInput()
      (experimental) (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply.

      https://developer.hashicorp.com/terraform/language/resources/terraform-data#input

    • setInput

      @Stability(Experimental) public void setInput(@NotNull Map<String,Object> value)
      (experimental) (Optional) A value which will be stored in the instance state, and reflected in the output attribute after apply.

      https://developer.hashicorp.com/terraform/language/resources/terraform-data#input

    • getTriggersReplace

      @Stability(Experimental) @NotNull public Map<String,Object> getTriggersReplace()
      (experimental) (Optional) A value which is stored in the instance state, and will force replacement when the value changes.

      https://developer.hashicorp.com/terraform/language/resources/terraform-data#triggers_replace

    • setTriggersReplace

      @Stability(Experimental) public void setTriggersReplace(@NotNull Map<String,Object> value)
      (experimental) (Optional) A value which is stored in the instance state, and will force replacement when the value changes.

      https://developer.hashicorp.com/terraform/language/resources/terraform-data#triggers_replace