abstractATerraformResource <S, T>
Hierarchy
- AResource<S, T>
- ATerraformResource
Index
Properties
Accessors
Methods
Properties
readonlyinheritedlocalResourceId
The ID of the resource, unique within its scope.
readonlyinheritedparents
The resources this one is built on top of. A parent is always created before its children, and destroyed after them.
readonlyinheritedproperties
The desired configuration of the resource.
readonlyinheritedresponse
What the cloud provider reported back about this resource, e.g. an ARN or a generated ID. It is empty until the resource has actually been created, and is what other resources read when they need to reference this one.
readonlyinheritedscope
The contexts of the models this resource is placed under, sorted. Octo derives it from the node whose action created the resource; a resource created outside a model action has an empty scope.
readonlyinheritedtags
The tags applied to this resource. See Octo.registerTags to set them in bulk.
staticreadonlyinheritedNODE_NAME
The name of the node. All nodes with same name are of the same category.
staticreadonlyinheritedNODE_PACKAGE
The package of the node.
staticreadonlyinheritedNODE_SCHEMA
The schema of the node.
staticreadonlyinheritedNODE_TYPE
The type of the node.
Accessors
inheritedresourceId
The ID of the resource, unique across the infrastructure: its
localResourceId, followed by a hash of its scope when it has one.Returns S[resourceId]
Methods
inheritedaddFieldDependency
Returns void
inheritedaddRelationship
Returns { thatToThisDependency: Dependency; thisToThatDependency: Dependency }
thatToThisDependency: Dependency
thisToThatDependency: Dependency
inheriteddiffUnpack
inheritedfindParentsByProperty
To find this resource's parents whose properties match every given filter.
Parameters
filters: { key: string; value: unknown }[]
Each filter is a property
keythe parent must carry with the givenvalue.
Returns UnknownResource[]
inheritedfindParentsByTag
To find this resource's parents whose tags match every given filter.
Parameters
filters: { key: string; value: string }[]
Each filter is a tag
keythe parent must carry with the givenvalue.
Returns UnknownResource[]
inheritedgetBoundaryMembers
Returns UnknownResource[]
inheritedgetExternalTriggerProperties
The properties whose change means an external resource has to be run again. Terraform hashes them into the trigger of the
null_resourcethat stands in for the resource, which is how it decides to call back.A resource that overrides diffProperties to ignore a property must exclude that property here too. The two answer the same question, and terraform plans a replacement for any property only this one covers, which octo then reports no change for.
Returns Partial<S[properties]>
inheritedgetSiblings
Returns {}
[p string]: Dependency[]
inheritedisMarkedDeleted
Whether this resource is marked for deletion, and will leave the graph at the end of the transaction.
Returns boolean
inheritedremove
To mark this resource for deletion. It leaves the graph at the end of the transaction.
Parameters
force: boolean = false
Removes the resource even if other resources still depend on it.
Returns void
inheritedsetResponse
To record what the cloud provider reported back about this resource. Keys absent from
responseare left as they were.Parameters
response: S[response]
Returns void
abstracttoHCL
Emits this resource as terraform.
Parameters
terraform: TerraformModuleScope
The module folder to write into, already scoped to this resource's module.
Returns void | Promise<void>
Base class for resources whose lifecycle is managed by Terraform.
Subclasses implement
toHCL()to contribute terraform resource blocks and outputs. Octo invokestoHCL()automatically while generating terraform files. The received scope is bound to the module folder this resource belongs to.Terraform resources cannot have resource actions; registering one throws.
Resources
toHCL()can emit.