Skip to main content
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.

Initializers

using Io.Cdktn;

new TerraformSelf();
NameTypeDescription

Static Functions

NameDescription
GetAnyOnly usable within a connection block to reference the connections parent resource.
GetNumberOnly usable within a connection block to reference the connections parent resource.
GetStringOnly usable within a connection block to reference the connections parent resource.

GetAny

using Io.Cdktn;

TerraformSelf.GetAny(string Key);
Only usable within a connection block to reference the connections parent resource. Access a property on the resource like this: getAny("hostPort")

KeyRequired

  • Type: string

GetNumber

using Io.Cdktn;

TerraformSelf.GetNumber(string Key);
Only usable within a connection block to reference the connections parent resource. Access a property on the resource like this: getNumber("hostPort")

KeyRequired

  • Type: string

GetString

using Io.Cdktn;

TerraformSelf.GetString(string Key);
Only usable within a connection block to reference the connections parent resource. Access a property on the resource like this: getString("publicIp")

KeyRequired

  • Type: string