TerraformResource represents a resource in Terraform.
Resources
TerraformResource
Base class for all Terraform resources.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Base class for all Terraform resources.
TerraformResource represents a resource in Terraform.
| Property | Type | Description |
|---|---|---|
dependsOn | ITerraformAddressable[] | Explicit dependencies. |
count | number | TerraformCount | Resource count. |
provider | TerraformProvider | Specific provider instance. |
lifecycle | TerraformResourceLifecycle | Lifecycle configuration. |
forEach | TerraformIterator | Iterator for multiple resources. |
| Property | Type | Description |
|---|---|---|
createBeforeDestroy | boolean | Create new resource before destroying old one. |
preventDestroy | boolean | Prevent accidental destruction. |
ignoreChanges | string[] | List of attributes to ignore changes for. |
replaceTriggeredBy | any[] | Replace resource when these change. |
importFrom(id: string): void
moveTo(target: string): void
moveToId(id: string): void
moveFromId(id: string): void
interpolationForAttribute(attr: string): IResolvable
getStringAttribute(name: string): string
getNumberAttribute(name: string): number
getBooleanAttribute(name: string): boolean
getListAttribute(name: string): string[]
getMapAttribute(name: string): Record<string, any>