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

[BUG] - Unable to remove readOnlyAccessRoleArns from acceleratorMetadata configuration #644

Open
joeldesaulniers opened this issue Nov 14, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@joeldesaulniers
Copy link

Describe the bug
When defining acceleratorMetadata in the global-config.yaml file, the "readOnlyAccessRoleArns" parameter is optional. However, if it's added and then later removed, the codepipeline will fail.

To Reproduce
In global-config.yaml, add the following snippet:

acceleratorMetadata:
enable: true
account: LogArchive
readOnlyAccessRoleArns:
- arn:aws:iam::[account-id]:role/[role]

Run the codepipeline. Then, remove the readOnlyAccessRoleArns parameter and the role that it refers to:

acceleratorMetadata:
enable: true
account: LogArchive

The codepipeline will fail at the Build stage, with the following error:

  • /acceleratorMetadata/readOnlyAccessRoleArns => must be array

Expected behavior
It's expected that if the acceleratorMetadata resource in the global-config.yaml file has readOnlyAccessRoleArns defined, the entire readOnlyAccessRoleArns parameter can be removed successfully without resulting in an error.

Please complete the following information about the solution:

Version: v1.9.2

Region: ca-central-1

Screenshot attached.

Screenshot 2024-11-14 at 1 44 49 PM
@joeldesaulniers joeldesaulniers added the bug Something isn't working label Nov 14, 2024
@richardkeit
Copy link
Contributor

@joeldesaulniers - what happens when you make it an empty array?

The AWS team has created data models for expected data structure, mandatory and optional fields

@richardkeit
Copy link
Contributor

FYI per the schema, it is mandatory

"required": [
"enable",
"account",
"readOnlyAccessRoleArns"

@joeldesaulniers
Copy link
Author

Thank you @richardkeit ! I believe this may be a part of the issue. If the field of readOnlyAccessRoleArns is mandatory, why is it possible to define an acceleratorMetadata resource without it? Perhaps readOnlyAccessRoleArns should be changed to optional? For example, initially my configuration was as follows, which deployed successfully:

acceleratorMetadata:
enable: true
account: LogArchive

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

No branches or pull requests

2 participants