Documentation Index
Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
TerraformModule can be used to reference a local terraform module or a module from the Terraform Registry.
It should be used if you can not use generated bindings for the module as you would get by adding the module
to your cdktf.json files “terraformModules” array and running cdktn get.
This class is not creating a Terraform module to be used outside of CDKTN.
If you want to bundle certain resources together like you would do with a Terraform module,
you should use Constructs instead, see http://cdk.tf/constructs for more details.
Initializers
import "github.com/open-constructs/cdk-terrain-go/cdktn"
cdktn.NewTerraformModule(scope Construct, id *string, options TerraformModuleConfig) TerraformModule
| Name | Type | Description |
|---|
scope | github.com/aws/constructs-go/constructs/v10.Construct | No description. |
id | *string | No description. |
options | TerraformModuleConfig | No description. |
scopeRequired
- Type: github.com/aws/constructs-go/constructs/v10.Construct
idRequired
optionsRequired
Methods
| Name | Description |
|---|
ToString | Returns a string representation of this construct. |
AddOverride | No description. |
OverrideLogicalId | Overrides the auto-generated logical ID with a specific ID. |
ResetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. |
ToHclTerraform | No description. |
ToMetadata | No description. |
ToTerraform | No description. |
AddProvider | No description. |
GetString | No description. |
InterpolationForOutput | No description. |
ToString
Returns a string representation of this construct.
AddOverride
func AddOverride(path *string, value interface{})
pathRequired
valueRequired
OverrideLogicalId
func OverrideLogicalId(newLogicalId *string)
Overrides the auto-generated logical ID with a specific ID.
newLogicalIdRequired
The new logical ID to use for this stack element.
ResetOverrideLogicalId
func ResetOverrideLogicalId()
Resets a previously passed logical Id to use the auto-generated logical id again.
func ToHclTerraform() interface{}
func ToMetadata() interface{}
func ToTerraform() interface{}
AddProvider
func AddProvider(provider interface{})
providerRequired
GetString
func GetString(output *string) *string
outputRequired
InterpolationForOutput
func InterpolationForOutput(moduleOutput *string) IResolvable
moduleOutputRequired
Static Functions
| Name | Description |
|---|
IsConstruct | Checks if x is a construct. |
IsTerraformElement | No description. |
IsConstruct
import "github.com/open-constructs/cdk-terrain-go/cdktn"
cdktn.TerraformModule_IsConstruct(x interface{}) *bool
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired
Any object.
import "github.com/open-constructs/cdk-terrain-go/cdktn"
cdktn.TerraformModule_IsTerraformElement(x interface{}) *bool
xRequired
Properties
| Name | Type | Description |
|---|
Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. |
CdktfStack | TerraformStack | No description. |
Fqn | *string | No description. |
FriendlyUniqueId | *string | No description. |
Source | *string | No description. |
Providers | *[]interface{} | No description. |
SkipAssetCreationFromLocalModules | *bool | No description. |
Version | *string | No description. |
DependsOn | *[]*string | No description. |
ForEach | ITerraformIterator | No description. |
NodeRequired
- Type: github.com/aws/constructs-go/constructs/v10.Node
The tree node.
CdktfStackRequired
func CdktfStack() TerraformStack
FqnRequired
FriendlyUniqueIdRequired
func FriendlyUniqueId() *string
SourceRequired
ProvidersOptional
func Providers() *[]interface{}
SkipAssetCreationFromLocalModulesOptional
func SkipAssetCreationFromLocalModules() *bool
VersionOptional
DependsOnOptional
func DependsOn() *[]*string
ForEachOptional
func ForEach() ITerraformIterator