Skip to content

Latest commit

 

History

History
1550 lines (965 loc) · 54.8 KB

API.md

File metadata and controls

1550 lines (965 loc) · 54.8 KB

API Reference

Constructs

BaseStack

Initializers

import { BaseStack } from 'cdktf-multi-stack-tfe'

new BaseStack(scope: Construct, organizationName: string, prefix: string, options?: BaseStackConfig)
Name Type Description
scope constructs.Construct No description.
organizationName string No description.
prefix string No description.
options BaseStackConfig No description.

scopeRequired
  • Type: constructs.Construct

organizationNameRequired
  • Type: string

prefixRequired
  • Type: string

optionsOptional

Methods

Name Description
toString Returns a string representation of this construct.
addDependency No description.
addOverride No description.
allProviders No description.
dependsOn No description.
ensureBackendExists No description.
getLogicalId No description.
hasResourceMove No description.
prepareStack No description.
registerIncomingCrossStackReference No description.
registerOutgoingCrossStackReference No description.
runAllValidations Run all validations on the stack.
toHclTerraform No description.
toTerraform No description.
bootstrapWorkspace No description.
createSecret No description.
getRemoteBackendConfig No description.
getWorkspaceName If you want to have more control over the workspace name, you can override this method.

toString
public toString(): string

Returns a string representation of this construct.

addDependency
public addDependency(dependency: TerraformStack): void
dependencyRequired
  • Type: cdktf.TerraformStack

addOverride
public addOverride(path: string, value: any): void
pathRequired
  • Type: string

valueRequired
  • Type: any

allProviders
public allProviders(): TerraformProvider[]
dependsOn
public dependsOn(stack: TerraformStack): boolean
stackRequired
  • Type: cdktf.TerraformStack

ensureBackendExists
public ensureBackendExists(): TerraformBackend
getLogicalId
public getLogicalId(tfElement: Node | TerraformElement): string
tfElementRequired
  • Type: constructs.Node | cdktf.TerraformElement

hasResourceMove
public hasResourceMove(): boolean
prepareStack
public prepareStack(): void
registerIncomingCrossStackReference
public registerIncomingCrossStackReference(fromStack: TerraformStack): TerraformRemoteState
fromStackRequired
  • Type: cdktf.TerraformStack

registerOutgoingCrossStackReference
public registerOutgoingCrossStackReference(identifier: string): TerraformOutput
identifierRequired
  • Type: string

runAllValidations
public runAllValidations(): void

Run all validations on the stack.

toHclTerraform
public toHclTerraform(): {[ key: string ]: any}
toTerraform
public toTerraform(): any
bootstrapWorkspace
public bootstrapWorkspace(stackName: string, stackConfig?: WorkspaceConfig): Workspace
stackNameRequired
  • Type: string

stackConfigOptional

createSecret
public createSecret(targetStack: Stack, secretName: string, config: TerraformVariableConfig): void
targetStackRequired

secretNameRequired
  • Type: string

configRequired
  • Type: cdktf.TerraformVariableConfig

getRemoteBackendConfig
public getRemoteBackendConfig(stackName: string): RemoteBackendConfig
stackNameRequired
  • Type: string

getWorkspaceName
public getWorkspaceName(stackName: string): string

If you want to have more control over the workspace name, you can override this method.

stackNameRequired
  • Type: string

Static Functions

Name Description
isConstruct Checks if x is a construct.
isStack No description.
of No description.
baseStackOf No description.
isBaseStack No description.

isConstruct
import { BaseStack } from 'cdktf-multi-stack-tfe'

BaseStack.isConstruct(x: any)

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
  • Type: any

Any object.


isStack
import { BaseStack } from 'cdktf-multi-stack-tfe'

BaseStack.isStack(x: any)
xRequired
  • Type: any

of
import { BaseStack } from 'cdktf-multi-stack-tfe'

BaseStack.of(construct: IConstruct)
constructRequired
  • Type: constructs.IConstruct

baseStackOf
import { BaseStack } from 'cdktf-multi-stack-tfe'

BaseStack.baseStackOf(construct: IConstruct)
constructRequired
  • Type: constructs.IConstruct

isBaseStack
import { BaseStack } from 'cdktf-multi-stack-tfe'

BaseStack.isBaseStack(x: any)
xRequired
  • Type: any

Properties

Name Type Description
node constructs.Node The tree node.
dependencies cdktf.TerraformStack[] No description.
moveTargets cdktf.TerraformResourceTargets No description.
synthesizer cdktf.IStackSynthesizer No description.
prefix string No description.
organization @cdktf/provider-tfe.dataTfeOrganization.DataTfeOrganization No description.
tfeProvider @cdktf/provider-tfe.provider.TfeProvider No description.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


dependenciesRequired
public readonly dependencies: TerraformStack[];
  • Type: cdktf.TerraformStack[]

moveTargetsRequired
public readonly moveTargets: TerraformResourceTargets;
  • Type: cdktf.TerraformResourceTargets

synthesizerRequired
public readonly synthesizer: IStackSynthesizer;
  • Type: cdktf.IStackSynthesizer

prefixRequired
public readonly prefix: string;
  • Type: string

organizationRequired
public readonly organization: DataTfeOrganization;
  • Type: @cdktf/provider-tfe.dataTfeOrganization.DataTfeOrganization

tfeProviderRequired
public readonly tfeProvider: TfeProvider;
  • Type: @cdktf/provider-tfe.provider.TfeProvider

Stack

Initializers

import { Stack } from 'cdktf-multi-stack-tfe'

new Stack(scope: Construct, stackName: string, config?: WorkspaceConfig)
Name Type Description
scope constructs.Construct No description.
stackName string No description.
config WorkspaceConfig No description.

scopeRequired
  • Type: constructs.Construct

stackNameRequired
  • Type: string

configOptional

Methods

Name Description
toString Returns a string representation of this construct.
addDependency No description.
addOverride No description.
allProviders No description.
dependsOn No description.
ensureBackendExists No description.
getLogicalId No description.
hasResourceMove No description.
prepareStack No description.
registerIncomingCrossStackReference No description.
registerOutgoingCrossStackReference No description.
runAllValidations Run all validations on the stack.
toHclTerraform No description.
toTerraform No description.

toString
public toString(): string

Returns a string representation of this construct.

addDependency
public addDependency(dependency: TerraformStack): void
dependencyRequired
  • Type: cdktf.TerraformStack

addOverride
public addOverride(path: string, value: any): void
pathRequired
  • Type: string

valueRequired
  • Type: any

allProviders
public allProviders(): TerraformProvider[]
dependsOn
public dependsOn(stack: TerraformStack): boolean
stackRequired
  • Type: cdktf.TerraformStack

ensureBackendExists
public ensureBackendExists(): TerraformBackend
getLogicalId
public getLogicalId(tfElement: Node | TerraformElement): string
tfElementRequired
  • Type: constructs.Node | cdktf.TerraformElement

hasResourceMove
public hasResourceMove(): boolean
prepareStack
public prepareStack(): void
registerIncomingCrossStackReference
public registerIncomingCrossStackReference(fromStack: TerraformStack): TerraformRemoteState
fromStackRequired
  • Type: cdktf.TerraformStack

registerOutgoingCrossStackReference
public registerOutgoingCrossStackReference(identifier: string): TerraformOutput
identifierRequired
  • Type: string

runAllValidations
public runAllValidations(): void

Run all validations on the stack.

toHclTerraform
public toHclTerraform(): {[ key: string ]: any}
toTerraform
public toTerraform(): any

Static Functions

Name Description
isConstruct Checks if x is a construct.
isStack No description.
of No description.
isMultiStackStack No description.
multiStackOf No description.

isConstruct
import { Stack } from 'cdktf-multi-stack-tfe'

Stack.isConstruct(x: any)

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
  • Type: any

Any object.


isStack
import { Stack } from 'cdktf-multi-stack-tfe'

Stack.isStack(x: any)
xRequired
  • Type: any

of
import { Stack } from 'cdktf-multi-stack-tfe'

Stack.of(construct: IConstruct)
constructRequired
  • Type: constructs.IConstruct

isMultiStackStack
import { Stack } from 'cdktf-multi-stack-tfe'

Stack.isMultiStackStack(x: any)
xRequired
  • Type: any

multiStackOf
import { Stack } from 'cdktf-multi-stack-tfe'

Stack.multiStackOf(construct: IConstruct)
constructRequired
  • Type: constructs.IConstruct

Properties

Name Type Description
node constructs.Node The tree node.
dependencies cdktf.TerraformStack[] No description.
moveTargets cdktf.TerraformResourceTargets No description.
synthesizer cdktf.IStackSynthesizer No description.
workspace @cdktf/provider-tfe.workspace.Workspace No description.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


dependenciesRequired
public readonly dependencies: TerraformStack[];
  • Type: cdktf.TerraformStack[]

moveTargetsRequired
public readonly moveTargets: TerraformResourceTargets;
  • Type: cdktf.TerraformResourceTargets

synthesizerRequired
public readonly synthesizer: IStackSynthesizer;
  • Type: cdktf.IStackSynthesizer

workspaceRequired
public readonly workspace: Workspace;
  • Type: @cdktf/provider-tfe.workspace.Workspace

TFVariable

Initializers

import { TFVariable } from 'cdktf-multi-stack-tfe'

new TFVariable(scope: Construct, id: string, config: TerraformVariableConfig)
Name Type Description
scope constructs.Construct No description.
id string No description.
config cdktf.TerraformVariableConfig No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

configRequired
  • Type: cdktf.TerraformVariableConfig

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.
addValidation No description.
synthesizeAttributes No description.
synthesizeHclAttributes No description.

toString
public toString(): string

Returns a string representation of this construct.

addOverride
public addOverride(path: string, value: any): void
pathRequired
  • Type: string

valueRequired
  • Type: any

overrideLogicalId
public overrideLogicalId(newLogicalId: string): void

Overrides the auto-generated logical ID with a specific ID.

newLogicalIdRequired
  • Type: string

The new logical ID to use for this stack element.


resetOverrideLogicalId
public resetOverrideLogicalId(): void

Resets a previously passed logical Id to use the auto-generated logical id again.

toHclTerraform
public toHclTerraform(): any
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any
addValidation
public addValidation(validation: TerraformVariableValidationConfig): void
validationRequired
  • Type: cdktf.TerraformVariableValidationConfig

synthesizeAttributes
public synthesizeAttributes(): {[ key: string ]: any}
synthesizeHclAttributes
public synthesizeHclAttributes(): {[ key: string ]: any}

Static Functions

Name Description
isConstruct Checks if x is a construct.
isTerraformElement No description.

isConstruct
import { TFVariable } from 'cdktf-multi-stack-tfe'

TFVariable.isConstruct(x: any)

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
  • Type: any

Any object.


isTerraformElement
import { TFVariable } from 'cdktf-multi-stack-tfe'

TFVariable.isTerraformElement(x: any)
xRequired
  • Type: any

Properties

Name Type Description
node constructs.Node The tree node.
cdktfStack cdktf.TerraformStack No description.
fqn string No description.
friendlyUniqueId string No description.
booleanValue cdktf.IResolvable No description.
listValue string[] No description.
numberValue number No description.
stringValue string No description.
value any No description.
default any No description.
description string No description.
nullable boolean No description.
sensitive boolean No description.
type string No description.
validation cdktf.TerraformVariableValidationConfig[] No description.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


cdktfStackRequired
public readonly cdktfStack: TerraformStack;
  • Type: cdktf.TerraformStack

fqnRequired
public readonly fqn: string;
  • Type: string

friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
  • Type: string

booleanValueRequired
public readonly booleanValue: IResolvable;
  • Type: cdktf.IResolvable

listValueRequired
public readonly listValue: string[];
  • Type: string[]

numberValueRequired
public readonly numberValue: number;
  • Type: number

stringValueRequired
public readonly stringValue: string;
  • Type: string

valueRequired
public readonly value: any;
  • Type: any

defaultOptional
public readonly default: any;
  • Type: any

descriptionOptional
public readonly description: string;
  • Type: string

nullableOptional
public readonly nullable: boolean;
  • Type: boolean

sensitiveOptional
public readonly sensitive: boolean;
  • Type: boolean

typeOptional
public readonly type: string;
  • Type: string

validationOptional
public readonly validation: TerraformVariableValidationConfig[];
  • Type: cdktf.TerraformVariableValidationConfig[]

Structs

BaseStackConfig

Initializer

import { BaseStackConfig } from 'cdktf-multi-stack-tfe'

const baseStackConfig: BaseStackConfig = { ... }

Properties

Name Type Description
defaultWorkspaceConfig WorkspaceConfig No description.
hostname string No description.
sslSkipVerify boolean No description.
token string No description.

defaultWorkspaceConfigOptional
public readonly defaultWorkspaceConfig: WorkspaceConfig;

hostnameOptional
public readonly hostname: string;
  • Type: string

sslSkipVerifyOptional
public readonly sslSkipVerify: boolean;
  • Type: boolean

tokenOptional
public readonly token: string;
  • Type: string

RemoteBackendConfig

Initializer

import { RemoteBackendConfig } from 'cdktf-multi-stack-tfe'

const remoteBackendConfig: RemoteBackendConfig = { ... }

Properties

Name Type Description
organization string No description.
workspaces RemoteBackendConfigWorkspace No description.
hostname string No description.
token string No description.

organizationRequired
public readonly organization: string;
  • Type: string

workspacesRequired
public readonly workspaces: RemoteBackendConfigWorkspace;

hostnameOptional
public readonly hostname: string;
  • Type: string

tokenOptional
public readonly token: string;
  • Type: string

RemoteBackendConfigWorkspace

Initializer

import { RemoteBackendConfigWorkspace } from 'cdktf-multi-stack-tfe'

const remoteBackendConfigWorkspace: RemoteBackendConfigWorkspace = { ... }

Properties

Name Type Description
name string No description.

nameRequired
public readonly name: string;
  • Type: string

WorkspaceConfig

Initializer

import { WorkspaceConfig } from 'cdktf-multi-stack-tfe'

const workspaceConfig: WorkspaceConfig = { ... }

Properties

Name Type Description
agentPoolId string Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#agent_pool_id Workspace#agent_pool_id}.
allowDestroyPlan boolean | cdktf.IResolvable Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#allow_destroy_plan Workspace#allow_destroy_plan}.
autoApply boolean | cdktf.IResolvable Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#auto_apply Workspace#auto_apply}.
description string Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#description Workspace#description}.
executionMode string Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#execution_mode Workspace#execution_mode}.
fileTriggersEnabled boolean | cdktf.IResolvable Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#file_triggers_enabled Workspace#file_triggers_enabled}.
globalRemoteState boolean | cdktf.IResolvable Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#global_remote_state Workspace#global_remote_state}.
queueAllRuns boolean | cdktf.IResolvable Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#queue_all_runs Workspace#queue_all_runs}.
remoteStateConsumerIds string[] Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#remote_state_consumer_ids Workspace#remote_state_consumer_ids}.
speculativeEnabled boolean | cdktf.IResolvable Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#speculative_enabled Workspace#speculative_enabled}.
sshKeyId string Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#ssh_key_id Workspace#ssh_key_id}.
structuredRunOutputEnabled boolean | cdktf.IResolvable Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#structured_run_output_enabled Workspace#structured_run_output_enabled}.
tagNames string[] Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#tag_names Workspace#tag_names}.
terraformVersion string Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#terraform_version Workspace#terraform_version}.
triggerPrefixes string[] Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#trigger_prefixes Workspace#trigger_prefixes}.

agentPoolIdOptional
public readonly agentPoolId: string;
  • Type: string

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#agent_pool_id Workspace#agent_pool_id}.


allowDestroyPlanOptional
public readonly allowDestroyPlan: boolean | IResolvable;
  • Type: boolean | cdktf.IResolvable

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#allow_destroy_plan Workspace#allow_destroy_plan}.


autoApplyOptional
public readonly autoApply: boolean | IResolvable;
  • Type: boolean | cdktf.IResolvable

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#auto_apply Workspace#auto_apply}.


descriptionOptional
public readonly description: string;
  • Type: string

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#description Workspace#description}.


executionModeOptional
public readonly executionMode: string;
  • Type: string

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#execution_mode Workspace#execution_mode}.


fileTriggersEnabledOptional
public readonly fileTriggersEnabled: boolean | IResolvable;
  • Type: boolean | cdktf.IResolvable

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#file_triggers_enabled Workspace#file_triggers_enabled}.


globalRemoteStateOptional
public readonly globalRemoteState: boolean | IResolvable;
  • Type: boolean | cdktf.IResolvable

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#global_remote_state Workspace#global_remote_state}.


queueAllRunsOptional
public readonly queueAllRuns: boolean | IResolvable;
  • Type: boolean | cdktf.IResolvable

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#queue_all_runs Workspace#queue_all_runs}.


remoteStateConsumerIdsOptional
public readonly remoteStateConsumerIds: string[];
  • Type: string[]

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#remote_state_consumer_ids Workspace#remote_state_consumer_ids}.


speculativeEnabledOptional
public readonly speculativeEnabled: boolean | IResolvable;
  • Type: boolean | cdktf.IResolvable

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#speculative_enabled Workspace#speculative_enabled}.


sshKeyIdOptional
public readonly sshKeyId: string;
  • Type: string

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#ssh_key_id Workspace#ssh_key_id}.


structuredRunOutputEnabledOptional
public readonly structuredRunOutputEnabled: boolean | IResolvable;
  • Type: boolean | cdktf.IResolvable

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#structured_run_output_enabled Workspace#structured_run_output_enabled}.


tagNamesOptional
public readonly tagNames: string[];
  • Type: string[]

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#tag_names Workspace#tag_names}.


terraformVersionOptional
public readonly terraformVersion: string;
  • Type: string

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#terraform_version Workspace#terraform_version}.


triggerPrefixesOptional
public readonly triggerPrefixes: string[];
  • Type: string[]

Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/tfe/r/workspace#trigger_prefixes Workspace#trigger_prefixes}.