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

!GetAtt not working in Tags on update-stack task #491

Open
mgorski-mg opened this issue Apr 25, 2023 · 0 comments
Open

!GetAtt not working in Tags on update-stack task #491

mgorski-mg opened this issue Apr 25, 2023 · 0 comments

Comments

@mgorski-mg
Copy link

Subject of the issue

I'm trying to copy the tag from CurrentAccunt to the stack level tag.

organization.yml:

ExampleAccount:
  Type: OC::ORG::Account
  Properties:
    AccountName: Sample
    RootEmail: [email protected]
    Tags:
      environment: prod

tasks.yml:

Parameters:
  EnvParam:
    Type: String

Examplestack:
  Type: update-stacks
  Template: ./sample.yml
  StackName: sample
  DefaultOrganizationBindingRegion: us-east-1
    DefaultOrganizationBinding:
    Account:
      - !Ref ExampleAccount
      - !Ref ExampleAccount2
      - !Ref ExampleAccount3
  Parameters:
    environment: !GetAtt CurrentAccount.Tags.environment
  Tags:
    environment: !GetAtt CurrentAccount.Tags.environment
    environment2: !Ref EnvParam

Instead of performing !GetAtt function, it converts value into JS object.
It works properly for Parameters.
For Tags it seems to work only with Parameters and !Ref function.

Your environment

  • version of org-foramtion: 1.0.9
  • version of node: 18.15.0
  • which OS/distro: Windows 11

Steps to reproduce

Just add Tag like mentioned to update-stack task.

Expected behaviour

Function !GetAtt should be performed and the tag environment should be reused from CurrentAccount.

Actual behaviour

!GetAtt CurrentAccount.Tags.environment is changed to JS object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant