Package com.hashicorp.cdktf
Class TerraformResource
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
com.hashicorp.cdktf.TerraformElement
com.hashicorp.cdktf.TerraformResource
- All Implemented Interfaces:
IInterpolatingParent
,ITerraformAddressable
,ITerraformDependable
,ITerraformResource
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
- Direct Known Subclasses:
DataResource
@Generated(value="jsii-pacmak/1.93.0 (build 1706ca5)",
date="2024-02-05T09:47:54.031Z")
@Stability(Experimental)
public class TerraformResource
extends TerraformElement
implements ITerraformResource, ITerraformDependable, IInterpolatingParent
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
(experimental) A fluent builder forTerraformResource
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface com.hashicorp.cdktf.IInterpolatingParent
IInterpolatingParent.Jsii$Default, IInterpolatingParent.Jsii$Proxy
Nested classes/interfaces inherited from interface com.hashicorp.cdktf.ITerraformDependable
ITerraformDependable.Jsii$Default, ITerraformDependable.Jsii$Proxy
Nested classes/interfaces inherited from interface com.hashicorp.cdktf.ITerraformResource
ITerraformResource.Jsii$Default, ITerraformResource.Jsii$Proxy
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TerraformResource
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
TerraformResource
(software.amazon.jsii.JsiiObjectRef objRef) TerraformResource
(software.constructs.Construct scope, String id, TerraformResourceConfig config) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMoveTarget
(String moveTarget) (experimental) Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move.getAnyMapAttribute
(String terraformAttribute) getBooleanAttribute
(String terraformAttribute) getBooleanMapAttribute
(String terraformAttribute) getCount()
getListAttribute
(String terraformAttribute) getNumberAttribute
(String terraformAttribute) getNumberListAttribute
(String terraformAttribute) getNumberMapAttribute
(String terraformAttribute) getStringAttribute
(String terraformAttribute) getStringMapAttribute
(String terraformAttribute) void
importFrom
(String id) void
importFrom
(String id, TerraformProvider provider) interpolationForAttribute
(String terraformAttribute) static Boolean
void
moveFromId
(String id) (experimental) Move the resource corresponding to "id" to this resource.void
(experimental) Moves this resource to the target resource given by moveTarget.void
(experimental) Moves this resource to the target resource given by moveTarget.void
(experimental) Moves this resource to the resource corresponding to "id".void
void
void
setCount
(TerraformCount value) void
void
setDependsOn
(List<String> value) void
setForEach
(ITerraformIterator value) void
void
setProvider
(TerraformProvider value) void
setProvisioners
(List<Object> value) (experimental) Adds this resource to the terraform JSON output.Methods inherited from class com.hashicorp.cdktf.TerraformElement
addOverride, getCdktfStack, getConstructNodeMetadata, getFqn, getFriendlyUniqueId, getRawOverrides, isTerraformElement, overrideLogicalId, resetOverrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.hashicorp.cdktf.ITerraformAddressable
getFqn
Methods inherited from interface com.hashicorp.cdktf.ITerraformResource
getFqn, getFriendlyUniqueId
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
TerraformResource
protected TerraformResource(software.amazon.jsii.JsiiObjectRef objRef) -
TerraformResource
protected TerraformResource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
TerraformResource
@Stability(Experimental) public TerraformResource(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TerraformResourceConfig config) - Parameters:
scope
- This parameter is required.id
- This parameter is required.config
- This parameter is required.
-
-
Method Details
-
isTerraformResource
- Parameters:
x
- This parameter is required.
-
addMoveTarget
(experimental) Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move.- Parameters:
moveTarget
- The string move target that will correspond to this resource. This parameter is required.
-
getAnyMapAttribute
@Stability(Experimental) @NotNull public Map<String,Object> getAnyMapAttribute(@NotNull String terraformAttribute) - Parameters:
terraformAttribute
- This parameter is required.
-
getBooleanAttribute
@Stability(Experimental) @NotNull public IResolvable getBooleanAttribute(@NotNull String terraformAttribute) - Parameters:
terraformAttribute
- This parameter is required.
-
getBooleanMapAttribute
@Stability(Experimental) @NotNull public Map<String,Boolean> getBooleanMapAttribute(@NotNull String terraformAttribute) - Parameters:
terraformAttribute
- This parameter is required.
-
getListAttribute
@Stability(Experimental) @NotNull public List<String> getListAttribute(@NotNull String terraformAttribute) - Parameters:
terraformAttribute
- This parameter is required.
-
getNumberAttribute
@Stability(Experimental) @NotNull public Number getNumberAttribute(@NotNull String terraformAttribute) - Parameters:
terraformAttribute
- This parameter is required.
-
getNumberListAttribute
@Stability(Experimental) @NotNull public List<Number> getNumberListAttribute(@NotNull String terraformAttribute) - Parameters:
terraformAttribute
- This parameter is required.
-
getNumberMapAttribute
@Stability(Experimental) @NotNull public Map<String,Number> getNumberMapAttribute(@NotNull String terraformAttribute) - Parameters:
terraformAttribute
- This parameter is required.
-
getStringAttribute
@Stability(Experimental) @NotNull public String getStringAttribute(@NotNull String terraformAttribute) - Parameters:
terraformAttribute
- This parameter is required.
-
getStringMapAttribute
@Stability(Experimental) @NotNull public Map<String,String> getStringMapAttribute(@NotNull String terraformAttribute) - Parameters:
terraformAttribute
- This parameter is required.
-
hasResourceMove
-
importFrom
@Stability(Experimental) public void importFrom(@NotNull String id, @Nullable TerraformProvider provider) - Parameters:
id
- This parameter is required.provider
-
-
importFrom
- Parameters:
id
- This parameter is required.
-
interpolationForAttribute
@Stability(Experimental) @NotNull public IResolvable interpolationForAttribute(@NotNull String terraformAttribute) - Specified by:
interpolationForAttribute
in interfaceIInterpolatingParent
- Specified by:
interpolationForAttribute
in interfaceITerraformResource
- Parameters:
terraformAttribute
- This parameter is required.
-
moveFromId
(experimental) Move the resource corresponding to "id" to this resource.Note that the resource being moved from must be marked as moved using it's instance function.
- Parameters:
id
- Full id of resource being moved from, e.g. "aws_s3_bucket.example". This parameter is required.
-
moveTo
(experimental) Moves this resource to the target resource given by moveTarget.- Parameters:
moveTarget
- The previously set user defined string set by .addMoveTarget() corresponding to the resource to move to. This parameter is required.index
- Optional The index corresponding to the key the resource is to appear in the foreach of a resource to move to.
-
moveTo
(experimental) Moves this resource to the target resource given by moveTarget.- Parameters:
moveTarget
- The previously set user defined string set by .addMoveTarget() corresponding to the resource to move to. This parameter is required.
-
moveToId
(experimental) Moves this resource to the resource corresponding to "id".- Parameters:
id
- Full id of resource to move to, e.g. "aws_s3_bucket.example". This parameter is required.
-
synthesizeAttributes
-
synthesizeHclAttributes
-
toHclTerraform
- Overrides:
toHclTerraform
in classTerraformElement
-
toMetadata
- Overrides:
toMetadata
in classTerraformElement
-
toTerraform
(experimental) Adds this resource to the terraform JSON output.- Overrides:
toTerraform
in classTerraformElement
-
getTerraformMetaArguments
-
getTerraformResourceType
- Specified by:
getTerraformResourceType
in interfaceITerraformResource
-
getTerraformGeneratorMetadata
@Stability(Experimental) @Nullable public TerraformProviderGeneratorMetadata getTerraformGeneratorMetadata() -
getConnection
-
setConnection
-
setConnection
-
getCount
- Specified by:
getCount
in interfaceITerraformResource
-
setCount
- Specified by:
setCount
in interfaceITerraformResource
-
setCount
- Specified by:
setCount
in interfaceITerraformResource
-
getDependsOn
- Specified by:
getDependsOn
in interfaceITerraformResource
-
setDependsOn
- Specified by:
setDependsOn
in interfaceITerraformResource
-
getForEach
- Specified by:
getForEach
in interfaceITerraformResource
-
setForEach
- Specified by:
setForEach
in interfaceITerraformResource
-
getLifecycle
- Specified by:
getLifecycle
in interfaceITerraformResource
-
setLifecycle
- Specified by:
setLifecycle
in interfaceITerraformResource
-
getProvider
- Specified by:
getProvider
in interfaceITerraformResource
-
setProvider
- Specified by:
setProvider
in interfaceITerraformResource
-
getProvisioners
-
setProvisioners
-