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

import keyword is not interpolated in leaf parameters file #147

Closed
vchepkov opened this issue Aug 29, 2019 · 4 comments · Fixed by #335
Closed

import keyword is not interpolated in leaf parameters file #147

vchepkov opened this issue Aug 29, 2019 · 4 comments · Fixed by #335
Assignees
Labels
bug Something isn't working
Milestone

Comments

@vchepkov
Copy link

import keyword is not interpolated and passed verbatim to pipeline if it is used in the leaf/final parameter file. i.e. if import keyword is used in AccountName_us-east-1.json, it is passed to pipeline, as-is, without interpolation. If it's used in global_us-east-1.json, for example, it is interpolated and merged into AccountName_us-east-1.json properly.

@bundyfx bundyfx added the bug Something isn't working label Sep 13, 2019
@vchepkov
Copy link
Author

Have you had a chance to look into this? That's really makes it difficult to deploy imported values into different accounts. Thanks

@malikhijazi
Copy link

+1

@mirceaadam
Copy link

mirceaadam commented Feb 22, 2021

Hi,

+1

Using a potential workaround with a separate folder like "stage" with separate buildspec.yml and only one params/global.yml solves the issue but it's hard to work with and requires also updates in deployment_map.yml .

version: 0.2

env:
  variables:
    INFRASTRUCTURE_ROOT_DIR: 'stage'

phases:
  install:
    runtime-versions:
      python: 3.7
      nodejs: 10
  pre_build:
    commands:
      - cp -v ./template* $INFRASTRUCTURE_ROOT_DIR
      - cp -Rv ./src $INFRASTRUCTURE_ROOT_DIR      
      - cd $INFRASTRUCTURE_ROOT_DIR
      - aws s3 cp s3://$S3_BUCKET_NAME/adf-build/ adf-build/ --recursive --quiet
      - pip install -r adf-build/requirements.txt -q
      - python adf-build/generate_params.py
      - bash adf-build/helpers/package_transform.sh
      - cd ..
      - cp -v template_eu-north-1.yml $INFRASTRUCTURE_ROOT_DIR/template_eu-north-1.yml
artifacts: 
  # files: '**/*'
  files: 
    - '$INFRASTRUCTURE_ROOT_DIR/*'
    - '$INFRASTRUCTURE_ROOT_DIR/params/*.json'
    - '$INFRASTRUCTURE_ROOT_DIR/params/*.yml'
    - '$INFRASTRUCTURE_ROOT_DIR/src/*'

Thank you

@sbkok
Copy link
Collaborator

sbkok commented Feb 24, 2021

Thanks for reporting and raising how this impacted.
Apologies that we didn't fix this issue earlier.

I've been looking into it and found the root cause.
I will open a PR shortly to get it fixed in the next minor release.

@sbkok sbkok self-assigned this Feb 24, 2021
@sbkok sbkok added this to the v3.1.1 milestone Feb 24, 2021
sbkok added a commit to sbkok/aws-deployment-framework that referenced this issue Feb 24, 2021
**Why?**

As reported by issue awslabs#147, the leaf
parameter files that specify the parameters/tags for the
account region environment did not work.

**What?**

The account_region parameter was not processed properly.
sbkok added a commit that referenced this issue Mar 3, 2021
**Why?**

As reported by issue #147, the leaf
parameter files that specify the parameters/tags for the
account region environment did not work.

**What?**

The account_region parameter was not processed properly.
sbkok added a commit to sbkok/aws-deployment-framework that referenced this issue Mar 3, 2021
**Fixes 🐞**

* Fixes `timeout` and `environment_variables` to be used when defined in
  the default CodeBuild Deployment provider properties awslabs#307, closes awslabs#306.
* Fixes intrinsic functions for account_region param files awslabs#333, closes awslabs#147.
* Fixes use of deployment from source directly when build stage is
  disabled awslabs#334, closes awslabs#236 and closes awslabs#318.
@sbkok sbkok mentioned this issue Mar 3, 2021
@sbkok sbkok closed this as completed in #335 Mar 3, 2021
sbkok added a commit that referenced this issue Mar 3, 2021
**Fixes 🐞**

* Fixes `timeout` and `environment_variables` to be used when defined in
  the default CodeBuild Deployment provider properties #307, closes #306.
* Fixes intrinsic functions for account_region param files #333, closes #147.
* Fixes use of deployment from source directly when build stage is
  disabled #334, closes #236 and closes #318.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants