Class TerraformSelf

java.lang.Object
software.amazon.jsii.JsiiObject
com.hashicorp.cdktf.TerraformSelf
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.93.0 (build 1706ca5)", date="2024-02-05T09:47:54.058Z") @Stability(Experimental) public class TerraformSelf extends software.amazon.jsii.JsiiObject
(experimental) Expressions in connection blocks cannot refer to their parent resource by name.

References create dependencies, and referring to a resource by name within its own block would create a dependency cycle. Instead, expressions can use the self object, which represents the connection's parent resource and has all of that resource's attributes. For example, use self.public_ip to reference an aws_instance's public_ip attribute.

  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    TerraformSelf(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    TerraformSelf(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Object
    (experimental) Only usable within a connection block to reference the connections parent resource.
    static Number
    (experimental) Only usable within a connection block to reference the connections parent resource.
    static String
    (experimental) Only usable within a connection block to reference the connections parent resource.

    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, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • TerraformSelf

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

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

      @Stability(Experimental) public TerraformSelf()
  • Method Details

    • getAny

      @Stability(Experimental) @NotNull public static Object getAny(@NotNull String key)
      (experimental) Only usable within a connection block to reference the connections parent resource.

      Access a property on the resource like this: getAny("hostPort")

      Parameters:
      key - This parameter is required.
    • getNumber

      @Stability(Experimental) @NotNull public static Number getNumber(@NotNull String key)
      (experimental) Only usable within a connection block to reference the connections parent resource.

      Access a property on the resource like this: getNumber("hostPort")

      Parameters:
      key - This parameter is required.
    • getString

      @Stability(Experimental) @NotNull public static String getString(@NotNull String key)
      (experimental) Only usable within a connection block to reference the connections parent resource.

      Access a property on the resource like this: getString("publicIp")

      Parameters:
      key - This parameter is required.