Skip to content

[BUG] [SM] Custom role creation failure on accounts with similar names #962

@cccssk

Description

@cccssk

Bug reports which fail to provide the required information will be closed without action.

Required Basic Info

  • Accelerator Version: 1.5.1-a
  • Install Type: Resource Add
  • Upgrade from version: N/A
  • Which State did the Main State Machine Fail in: Deploy Phase 1

Describe the bug
A custom role is created through the ASEA config.json in account stage. The role is created successfully. The same role is added to an account with the name like stage-03 and when run the state machine fails stating that the role already exists within the account.
No errors were observed when adding this same role to an account with a different name (ie stage to dev) only when the account names were similar (ie stage to stage-03). Also no errors were observed when adding the same role with only a different name to the same stage-03 account.

Failure Info

  • What error messages have you identified, if any:
    Error: There is already a Construct with name 'IAM-Role-RoleName-AccountDev---' in IamAssets [IAM Assets-AccountDev_--]

  • What symptoms have you identified, if any: likely due to the ASEA not using the full account name in the build phase

Required files

Steps To Reproduce

  1. Create a custom IAM role through the ASEA config.json by running the state machine
  2. Add that same role to account that has a similar name (ie stage and stage-03) in the config.json
  3. Rerun the state machine which will fail on deploy phase 1

Expected behavior
The custom role to be created in the specified account

Additional context
Narrow context and likely will not effect many people depending on account and role names

Metadata

Metadata

Assignees

No one assigned

    Labels

    1-CodebaseRelated to the SEA Solution/automation tooling2-Bug/IssueSomething isn't working3-ShippedIn a GA releasev1.5.3In release v1.5.3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions