OctoTerraformResourceScope <TResponse>
Type parameters
- TResponse: BaseResourceSchema[response] = BaseResourceSchema[response]
Index
Methods
Methods
addTerraformResource
Emits one
resource "<type>" "<name>"block for this octo resource. Multiple calls chain viadepends_onin call order. The provider alias is applied automatically when the resource was registered with a provider context.Pass
options.chain: falseto keep a block out of the chain: it depends on neither the block before it nor is depended on by the block after it, and waits only on what its attributes reference. Use it for a block emitted once per item, like a file upload, where a chain would run the items one at a time and store every earlier address in each item's terraform state.Parameters
type: string
name: string
optionalspec: Record<string, unknown>
optionaloptions: { chain?: boolean }
optionalchain: boolean
Returns TerraformResource
output
Declares the outputs for this resource — one entry per response key. Every response key must be declared; the commit phase reads exactly these outputs to reconstruct the full response.
Parameters
outputs: Record<keyof TResponse & string, unknown>
optionaloptions: { sensitiveKeys?: (keyof TResponse & string)[] }
optionalsensitiveKeys: (keyof TResponse & string)[]
Returns void
One octo resource's slice of the terraform module being generated.
Obtained from TerraformModuleScope.addOctoTerraformResource. Everything you emit through it is attributed to that octo resource, which is how Octo later maps a terraform plan entry, and a terraform output, back to the resource it belongs to.
Resources
ATerraformResource for where this is used.