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

Cannot save (ERROR: singles[0].role_name is required to be a valid string) #331

Open
iliasmer opened this issue Nov 9, 2023 · 5 comments
Labels

Comments

@iliasmer
Copy link

iliasmer commented Nov 9, 2023

Describe the bug
When I try to save my configurations it is unable to do so, throwing this error: singles[0].role_name is required to be a valid string. This error is at least when using Chrome, I have not tested with other browsers.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Configuration'
  2. Click on 'Save', with or without making changes to the current config
  3. See error

Expected behavior
Save the configuration.

Screenshots
image

Environment

  • OS: [windows]
  • Browser [ chrome]
  • Version [...]

Additional context
Add any other context about the problem here.

@joost-wolfsen-cloudnation

I'm suffering from the same issue with the newest version of the plugin in Chrome on Windows 10 and on Windows 11

@keebrev
Copy link

keebrev commented Nov 9, 2023

Same issue here. MacOS Sonoma 14.1 with Chrome 119.0.6045.105 for ARM64. Plugin version 4.0.2.

@tilfin
Copy link
Member

tilfin commented Nov 9, 2023

AESR has enhanced configuration validation in a recent update.

singles[0].role_name is required to be a valid string.

This error message means that the role_name in the 0th (first) definition of the profile by 'Simple Configuration' is not the correct string. 'Simple Configuration' means a single profile definition not referenced in source_profile.

Perhaps there is a profile definition for the base account that is incorrect with the profile name specified in source_profile.

@tilfin tilfin added the question label Nov 9, 2023
@joost-wolfsen-cloudnation

Thanks, i've redone my profile list and now it is saving again. Weird though that it suddenly became an issue whereas i haven't changed the first 50 rows of my configuration in the past 1,5 years.

@fdamstra
Copy link

fdamstra commented Nov 16, 2023

In #333 , @tilfin said:

It is not possible to share exactly the same settings as ~/.aws/config.

It disappoints me that parity with ~/.aws/config isn't a goal of this extension. I thought it was. Being able to keep the extend roles configuration and my ~/.aws/config configuration in sync was one of the great features of this plugin, and I have been doing it for years. It wasn't until I recently had to make updates to my configuration that it wouldn't save (and in fact was functioning just fine).

But I believe this inconsistency is what we're running into in this thread, too.

The simplest example of a configuration that is valid in ~/.aws/config but not in switch roles is:

[profile mybase]
aws_account_id=987654321987
region=us-east-2

It cannot be saved due to the singles[0].role_name requirement.

Notably, it does save if I add a profile that references it:

[profile mybase]
aws_account_id=987654321987
region=us-east-2

[profile target]
role_arn = arn:aws:iam::987654321987:role/Role1
source_profile = mybase

But for some of my accounts, I don't currently have any roles to assume.

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

No branches or pull requests

5 participants