Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core): revisit the Stack API #2818

Merged
merged 6 commits into from
Jun 12, 2019
Merged

refactor(core): revisit the Stack API #2818

merged 6 commits into from
Jun 12, 2019

Commits on Jun 11, 2019

  1. refactor(core): revisit the Stack API

    BREAKING CHANGE:
    
    * **core:** `stack.name` renamed to `stack.stackName`
    * **core:** `stack.stackName` will return the concrete stack name. Use `Aws.stackName` to indicate { Ref: "AWS::StackName" }.
    * **core:** `stack.account` and `stack.region` will return the concrete account/region only if they are explicitly specified when the stack is defined (under the `env` prop). Otherwise, they will return a token that resolves to the AWS::AccountId and AWS::Region intrinsic references. Use `Context.getDefaultAccount()` and `Context.getDefaultRegion()` to obtain the defaults passed through the toolkit in case those are needed. Use `Token.isUnresolved(v)` to check if you have a concrete or intrinsic.
    * **core:** `stack.logicalId` has been removed. Use `stack.getLogicalId()`
    * **core:** `stack.env` has been removed, use `stack.account`, `stack.region` and `stack.environment` instead
    * **core:** `stack.accountId` renamed to `stack.account` (to allow treating account more abstractly)
    * **core:** `AvailabilityZoneProvider` can now be accessed through `Context.getAvailabilityZones()`
    * **core:** `SSMParameterProvider` can now be accessed through `Context.getSsmParameter()`
    * **core:** `parseArn` is now `Arn.parse`
    * **core:** `arnFromComponents` is now `arn.format`
    * **core:** `node.lock` and `node.unlock` are now private
    * **core:** `stack.requireRegion` and `requireAccountId` have been removed. Use `Token.unresolved(stack.region)` instead
    * **core:** `stack.parentApp` have been removed. Use `App.isApp(stack.node.root)` instead.
    * **core:** `stack.missingContext` is now private
    * **core:** `stack.renameLogical` have been renamed to `stack.renameLogicalId`
    * **core:** `IAddressingScheme`, `HashedAddressingScheme` and `LogicalIDs` are now internal. Override `Stack.allocateLogicalId` to customize how logical IDs are allocated to resources.
    Elad Ben-Israel committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    35b6c6b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b638b8a View commit details
    Browse the repository at this point in the history
  3. fix build break

    Elad Ben-Israel committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    6df79b7 View commit details
    Browse the repository at this point in the history
  4. more fixes

    Elad Ben-Israel committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    7b324b2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2beb9d1 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2019

  1. fix test

    Elad Ben-Israel committed Jun 12, 2019
    Configuration menu
    Copy the full SHA
    270c332 View commit details
    Browse the repository at this point in the history