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

fix(core): updates logical id validation regex #26174

Closed
wants to merge 34 commits into from

Commits on Jun 29, 2023

  1. fix logical id validation

    ashwin300a committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    e87a8d5 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2023

  1. Configuration menu
    Copy the full SHA
    1402142 View commit details
    Browse the repository at this point in the history
  2. chore(ecs): remove unnecessary js and d.ts files for integration test (

    …aws#26030)
    
    From aws#24963, unnecessary js and d.ts files which had been built for integration test were pushed. This PR removes these files.
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    tam0ri committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    7036c27 View commit details
    Browse the repository at this point in the history
  3. fix(rds): monitoring role is not created by default when using reader…

    …s and writers (aws#26006)
    
    The [`_createInstances`](https://github.com/aws/aws-cdk/blob/4c9016a264c2fec9c0e0e3fae1d7c4216c964b31/packages/aws-cdk-lib/aws-rds/lib/cluster.ts#L635) function was not providing a default `monitoringRole` value with enabled monitoring.
    This fix creates a default role as done by the [legacy code](https://github.com/aws/aws-cdk/blob/4c9016a264c2fec9c0e0e3fae1d7c4216c964b31/packages/aws-cdk-lib/aws-rds/lib/cluster.ts#L1228).
    
    Closes aws#25941.
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    lpizzinidev committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    9065b25 View commit details
    Browse the repository at this point in the history
  4. fix(ssm): cannot import a ssm parameter with a name containing unreso…

    …lved token (aws#25749)
    
    Previously, when we import a SSM parameter by `ssm.StringParameter.fromStringParameterAttributes`, we use `CfnParameter` to get the value. 
    
    ```json
      "Parameters": {
        "importsqsstringparamParameter": {
          "Type": "AWS::SSM::Parameter::Value<String>",
          "Default": {
            "Fn::ImportValue": "some-exported-value-holding-the-param-name"
          }
        },
    ```
    
    However, `Parameters.<Name>.Default` only allows a concrete string value. If it contains e.g. intrinsic functions, we get an error like this from CFn: `Template format error: Every Default member must be a string.`
    
    This PR changes the behavior of `fromStringParameterAttributes` method. Now it uses `CfnDynamicReference` instead of `CfnParameter` if a parameter name contains unresolved tokens.
    
    Since previously the case when `Token.isUnresolved(attrs.parameterName) == true` just resulted in a deployment error, this is not a breaking change.
    
    Closes aws#17094
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    tmokmss committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    1f1b642 View commit details
    Browse the repository at this point in the history
  5. chore(lambda): Add missing ARNs for cloudwatch lambda insights (aws#2…

    …6153)
    
    ### Describe the feature
    Add Lambda Layer Insights new version to CLOUDWATCH_LAMBDA_INSIGHTS_ARNS (packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts)
    Also fixes missing ARNs for version 1.0.178.0 and others
    
    ### Use Case
    Take advantage of the bug fixes in
    - https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versionsx86-64.html
    - https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versionsARM.html
    
    ### Proposed Solution
    Add missing ARNs and adds latest Lambda Layer Version (1.0.229.0)
    
    Closes aws#26150.
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    orekav committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    a21b099 View commit details
    Browse the repository at this point in the history
  6. feat(iot): add action to start Step Functions State Machine (aws#26059)

    Add new IoT topic rule action to send IoT messages to Step Functions State Machines.
    
    Closes aws#17698.
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    jumic committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    bd86993 View commit details
    Browse the repository at this point in the history
  7. feat: update alpha modules to sdk v3 (aws#25895)

    Updates alpha modules with custom resources to use NodeJS 18 and v3 of the AWS SDK. Since these CRs are pretty self-contained and safe to update, their handler code and runtime versions can be updated without any breakage for users.
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    MrArnoldPalmer committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    0a4140e View commit details
    Browse the repository at this point in the history
  8. chore: add spec2cdk tool (aws#26183)

    Adds the new `spec2cdk` tool.
    This tool is designed to replace the existing `cfn2ts`, but uses `@aws-cdk/aws-service-spec` as a datatsource.
    In a first step we make the tool and available, without using it for the build.
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    mrgrain committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    dcf5352 View commit details
    Browse the repository at this point in the history
  9. fix logical id validation

    ashwin300a committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    20d5771 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ce0b5a7 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2023

  1. test(s3): add test cases for buckets and kms keys (aws#26191)

    This PR adds test cases for S3 buckets using kms keys.
    
    Some existing tests were also modified.
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    go-to-k committed Jul 1, 2023
    Configuration menu
    Copy the full SHA
    c6d27c3 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2023

  1. Configuration menu
    Copy the full SHA
    cf16283 View commit details
    Browse the repository at this point in the history
  2. docs: reduce size of QuickSight generated examples (aws#26201)

    The generated examples for QuickSight are too large.
    
    Bump the `cdk-generate-synthetic-examples` package to merge a fix.
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    rix0rrr committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    141b3df View commit details
    Browse the repository at this point in the history
  3. docs(elasticloadbalancing): update readme on internetFacing (aws#24732)

    This PR adds the documentation in the readme about `internetFacing` on classic load balancer . 
    
    > [CONTRIBUTING GUIDE]: https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md
    > [DESIGN GUIDELINES]: https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md
    
    Closes #<issue number here>.
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    pattasai committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    ae64685 View commit details
    Browse the repository at this point in the history
  4. chore(region-info): register eu-central-2, fix firehose cidr blocks f…

    …or ap-south-2, eu-south-2, me-central-1 (aws#25572)
    
    Checks off some items from aws#24477
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    sumupitchayan committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    978d028 View commit details
    Browse the repository at this point in the history
  5. docs(cloudwatch): document cross-account/cross-region alarm limitatio…

    …ns (aws#26204)
    
    This is in response to an internal ticket where someone indicated that their 2 datapoints cross-account Alarm was not working.
    
    AWS Support responded with the above reasoning.
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    rix0rrr committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    bed1ebe View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fa3caf3 View commit details
    Browse the repository at this point in the history
  7. fix(core): tags disappear if CDK app is bundled+minified (aws#26181)

    Caused by a check for `constructor.name` which `esbuild` may rename. Replace with a checkable symbol.
    
    Closes aws#26169.
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    rix0rrr committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    1f81718 View commit details
    Browse the repository at this point in the history
  8. feat(glue): add ExecutionClass for FLEX (aws#26203)

    This PR adds ExecutionClass for Glue job's L2 construct. This allows you to specify `FLEX` option.
    
    Closes aws#22224
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    go-to-k committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    db923dd View commit details
    Browse the repository at this point in the history
  9. feat(cli-lib): support bootstrap command (aws#26205)

    The first iteration of [@aws-cdk/cli-lib-alpha](https://docs.aws.amazon.com/cdk/api/v2/docs/cli-lib-alpha-readme.html) doesn't support the bootstrap command that is mandatory to deploy a new app via CDK.
    
    This PR introduces the bootstrap command for the CLI.
    
    Related: aws#15851 
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    AntonioAngelino committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    9364e94 View commit details
    Browse the repository at this point in the history
  10. fix(sns-subscriptions): cannot add Lambda Subscription when using a L…

    …ambda Construct from a different Construct Library (aws#26206)
    
    Fix the "is construct" check to ensure one can add a LambdaSubscription to an sns topic using the "addSubscription" method regardless of whether it came from a symlinked construct library or not.
    
    Closes aws#24788.
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    mjeanroy committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    06b33d5 View commit details
    Browse the repository at this point in the history
  11. chore(app-staging-synthesizer): tool to test maximum ecr repository a…

    …llowance (aws#26173)
    
    And that maximum allowance right now is 20 (it's actually 21 but we are rounding down for safety).
    
    ```bash
    repos: 2, size: 24820 bytes
    repos: 3, size: 26189 bytes
    repos: 4, size: 27558 bytes
    repos: 5, size: 28927 bytes
    repos: 6, size: 30296 bytes
    repos: 7, size: 31665 bytes
    repos: 8, size: 33034 bytes
    repos: 9, size: 34403 bytes
    repos: 10, size: 35772 bytes
    repos: 11, size: 37148 bytes
    repos: 12, size: 38524 bytes
    repos: 13, size: 39900 bytes
    repos: 14, size: 41276 bytes
    repos: 15, size: 42652 bytes
    repos: 16, size: 44028 bytes
    repos: 17, size: 45404 bytes
    repos: 18, size: 46780 bytes
    repos: 19, size: 48156 bytes
    repos: 20, size: 49532 bytes
    repos: 21, size: 50908 bytes
    ```
    
    Consistently, each additional repo adds 1369 bytes to the template. Before adding the inline functions, each additional repo was roughly 1200 bytes.
    
    Current rough breakdown of size in the integ test (1 s3 bucket and 2 ecr repos):
    
    25KB
    
    ~ 2KB for node version mapping
    ~ 6KB for auto delete images (4KB is the inline function)
    ~ 6KB for auto delete objects (4KB is the inline function)
    
    Based on these calculations, it is semi reasonable that the repo allowance has gone from 38 to 21. 
    
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    kaizencc committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    f525e5a View commit details
    Browse the repository at this point in the history
  12. feat(codebuild): Support for CodeBuild Image `aws/codebuild/amazonlin…

    …ux2-x86_64-standard:5.0` (aws#26058)
    
    Added support for Amazon Linux 2023 CodeBuild Image:
    
    https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
    
    `aws/codebuild/amazonlinux2-x86_64-standard:5.0`
    
    i.e you can now reference the latest codebuild image via the `codebuild.LinuxBuildImage.AMAZON_LINUX_2_5` enum rather than having to resolve it manually like `LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:5.0')`
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    sktan committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    bc029fe View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2023

  1. chore: disable v1 branch upkeep (aws#26218)

    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    RomainMuller committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    a398632 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    928b64e View commit details
    Browse the repository at this point in the history
  3. fix(cli-lib): bundle bootstrap template (aws#26229)

    Closes aws#26224
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    mrgrain committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    41cb288 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. Configuration menu
    Copy the full SHA
    45e2157 View commit details
    Browse the repository at this point in the history
  2. chore: updates container-definition user jsdoc (aws#26231)

    Update JSDOC for `user` to clarify that this is a `user string` and not restricted to a user name.
    
    Reason for this change: When viewing the documentation from an IDE it is unclear that something other than a user name can be used for example 100:101 ie UID and GID.
    
    I have not fully read the following:
    
    [CONTRIBUTING GUIDE]: https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md
    [DESIGN GUIDELINES]: https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md
    
    This commit/pull request only changes JSDoc.
    
    Closes aws#26230
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    MichaelLeeHobbs committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    3a1837a View commit details
    Browse the repository at this point in the history
  3. feat(ecs): enable alarm-based rollbacks (aws#25840)

    This PR enables the new Deployment Alarms feature in ECS for Service L2s [blog post](https://aws.amazon.com/blogs/containers/automate-rollbacks-for-amazon-ecs-rolling-deployments-with-cloudwatch-alarms/).
    
    This PR contains changes after the first round of revision by the CDK team. 
    
    Continuation of aws#25346
    
    **Why are so many integration tests impacted by this change? There are 2 reasons:**
    1. This PR changes the ECS L2s to set the default configuration for the `CfnService.deploymentConfiguration.alarms` property to:
    ```
    alarmNames: [],
    rollback: false,
    enable: false,
    ```
    This is necessary, because adding deployment alarms, deploying your CFN stack, then removing the deployment alarms from the CFN template, and deploying again WILL NOT remove the deployment alarms from the service. To remove previously configured deployment alarms, you must explicitly use the configuration shown above. Making this update will cause no interruption to existing ECS services, and does not trigger any update to the service itself during the CFN update.
    
    The ECS UpdateService API is stateful, meaning that if a field is not present in the CloudFormation object, it will be ignored in the update. This was originally implemented due to the problems with desiredCount resetting to bad values after autoscaling changed it, but requires us to set an explicit disableDeploymentAlarms() method to cause the service update to behave correctly.
    
    2. Most ECS integ tests have not been executed in a long time. So, many of the changes are bring the snapshots up to date with the latest integ test format, or lambda layers, etc.
    
    
    **Detailed list of changes:**
    - entire alarm based rollback task into single commit
    - resolving merge conflicts
    - integ files modules updated to resolve merge conflicts
    - regarding merge conflicts issue
    - integ files import changes for merge conflicts
    - adding this change for PR not to abondended
    - chore: refactor createAlarm & remove unnecessary unit tests
    - chore: fix api but failing unit tests
    - chore: fix validation
    - chore: readme changes
    - chore: fix integ test, remove unnecessary ec2 test
    - chore: refactor enableAlarms for clarity
    - test: fix integ test, finally
    - docs: update docstrings for new props and methods
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    bvtujo committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    1a44f69 View commit details
    Browse the repository at this point in the history
  4. chore: bump spec2cdk packages to 0.0.1 (aws#26227)

    `0.0.0` is not a valid version according to the scripts in our repo.
    
    ----
    
    *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
    rix0rrr committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    3082601 View commit details
    Browse the repository at this point in the history
  5. fix logical id validation

    ashwin300a authored and ashwin300 committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    9837824 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    251df25 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1b35bfd View commit details
    Browse the repository at this point in the history