diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-condition.ts b/packages/@aws-cdk/cdk/lib/cloudformation/cfn-condition.ts index a2edf6a43af30..783ca2ba8d620 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-condition.ts +++ b/packages/@aws-cdk/cdk/lib/cloudformation/cfn-condition.ts @@ -1,6 +1,6 @@ import { Construct } from '../core/construct'; import { ResolveContext } from '../core/tokens'; -import { Referenceable } from './stack-element'; +import { Referenceable } from './cfn-element'; export interface CfnConditionProps { expression?: IConditionExpression; diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/stack-element.ts b/packages/@aws-cdk/cdk/lib/cloudformation/cfn-element.ts similarity index 100% rename from packages/@aws-cdk/cdk/lib/cloudformation/stack-element.ts rename to packages/@aws-cdk/cdk/lib/cloudformation/cfn-element.ts diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-output.ts b/packages/@aws-cdk/cdk/lib/cloudformation/cfn-output.ts index 56c96edf7b5ca..9848879a70aba 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-output.ts +++ b/packages/@aws-cdk/cdk/lib/cloudformation/cfn-output.ts @@ -1,5 +1,5 @@ import { Construct } from '../core/construct'; -import { CfnElement } from './stack-element'; +import { CfnElement } from './cfn-element'; export interface CfnOutputProps { /** diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-parameter.ts b/packages/@aws-cdk/cdk/lib/cloudformation/cfn-parameter.ts index 6d837d4073ba7..8b19e995fc0e3 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-parameter.ts +++ b/packages/@aws-cdk/cdk/lib/cloudformation/cfn-parameter.ts @@ -1,6 +1,6 @@ import { Construct } from '../core/construct'; import { Token } from '../core/tokens'; -import { Ref, Referenceable } from './stack-element'; +import { Ref, Referenceable } from './cfn-element'; export interface CfnParameterProps { /** diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-resource.ts b/packages/@aws-cdk/cdk/lib/cloudformation/cfn-resource.ts index e1079b149e1e7..7177d88c25f72 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-resource.ts +++ b/packages/@aws-cdk/cdk/lib/cloudformation/cfn-resource.ts @@ -5,7 +5,9 @@ import { capitalizePropertyNames, ignoreEmpty, PostResolveToken } from '../core/ import { CfnCondition } from './cfn-condition'; import { CfnReference } from './cfn-tokens'; import { CreationPolicy, DeletionPolicy, UpdatePolicy } from './resource-policy'; -import { Referenceable } from './stack-element'; +// import required to be here, otherwise causes a cycle when running the generated JavaScript +// tslint:disable-next-line:ordered-imports +import { Referenceable } from './cfn-element'; export interface CfnResourceProps { /** diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/include.ts b/packages/@aws-cdk/cdk/lib/cloudformation/include.ts index 79734af608696..e493121209801 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/include.ts +++ b/packages/@aws-cdk/cdk/lib/cloudformation/include.ts @@ -1,5 +1,5 @@ import { Construct } from '../core/construct'; -import { CfnElement } from './stack-element'; +import { CfnElement } from './cfn-element'; export interface IncludeProps { /** diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/logical-id.ts b/packages/@aws-cdk/cdk/lib/cloudformation/logical-id.ts index a13db16d27461..decb63c909fd8 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/logical-id.ts +++ b/packages/@aws-cdk/cdk/lib/cloudformation/logical-id.ts @@ -1,5 +1,5 @@ import { makeUniqueId } from '../util/uniqueid'; -import { CfnElement } from './stack-element'; +import { CfnElement } from './cfn-element'; const PATH_SEP = '/'; diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/mapping.ts b/packages/@aws-cdk/cdk/lib/cloudformation/mapping.ts index 5446b6977f49b..9f426a69e35f8 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/mapping.ts +++ b/packages/@aws-cdk/cdk/lib/cloudformation/mapping.ts @@ -1,6 +1,6 @@ import { Construct } from '../core/construct'; +import { Referenceable } from './cfn-element'; import { Fn } from './fn'; -import { Referenceable } from './stack-element'; export interface MappingProps { mapping?: { [k1: string]: { [k2: string]: any } }; diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/rule.ts b/packages/@aws-cdk/cdk/lib/cloudformation/rule.ts index 4d95adeea2b01..733d7af23f93a 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/rule.ts +++ b/packages/@aws-cdk/cdk/lib/cloudformation/rule.ts @@ -1,7 +1,7 @@ import { Construct } from '../core/construct'; import { capitalizePropertyNames } from '../core/util'; import { IConditionExpression } from './cfn-condition'; -import { Referenceable } from './stack-element'; +import { Referenceable } from './cfn-element'; /** * A rule can include a RuleCondition property and must include an Assertions property. diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/stack.ts b/packages/@aws-cdk/cdk/lib/cloudformation/stack.ts index e97b34905c070..651e56a9faf2e 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/stack.ts +++ b/packages/@aws-cdk/cdk/lib/cloudformation/stack.ts @@ -602,9 +602,9 @@ function cfnElements(node: IConstruct, into: CfnElement[] = []): CfnElement[] { // These imports have to be at the end to prevent circular imports import { ArnComponents, arnFromComponents, parseArn } from './arn'; +import { CfnElement } from './cfn-element'; import { CfnResource } from './cfn-resource'; import { Aws, ScopedAws } from './pseudo'; -import { CfnElement } from './stack-element'; /** * Find all resources in a set of constructs diff --git a/packages/@aws-cdk/cdk/lib/index.ts b/packages/@aws-cdk/cdk/lib/index.ts index 4689886c8f00f..f0b2d6eeb4722 100644 --- a/packages/@aws-cdk/cdk/lib/index.ts +++ b/packages/@aws-cdk/cdk/lib/index.ts @@ -20,7 +20,7 @@ export * from './cloudformation/cfn-resource'; export * from './cloudformation/resource-policy'; export * from './cloudformation/rule'; export * from './cloudformation/stack'; -export * from './cloudformation/stack-element'; +export * from './cloudformation/cfn-element'; export * from './cloudformation/dynamic-reference'; export * from './cloudformation/tag'; export * from './cloudformation/removal-policy';