-
Notifications
You must be signed in to change notification settings - Fork 24
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 in validation logic that is checking supported service credential role values #817
Comments
WIP:
Following code changes to the proposed role name
|
When using a space ( + crn = "crn:v1:bluemix:public:iam::::serviceRole:Object Writer") it clearly reports "│ CreateSecretWithContext failed: Request validation error: doesn't match schema due to: Error at "/source_service/role/crn": string doesn't match the regular expression "^crn:v0-9{8}$"" And reports where the problem is '/source_service/role/crn'. When not using a space (crn:v1:bluemix:public:iam::::serviceRole:ObjectWriter) A generic error is reported. "│ CreateSecretWithContext failed: Bad request error. [secrets-manager.13037E]" No idea if it passed the CRN check and failed for some other reason or the CRN matches the pattern, but is wrong. |
The thread leads to secrets manager secret module at https://github.com/terraform-ibm-modules/terraform-ibm-secrets-manager-secret/blob/main/main.tf#L111 where the role is constructed as: crn:v1:bluemix:public:iam::::serviceRole:ObjectWriter whilst the documentation in IAM (https://cloud.ibm.com/iam/roles) CRN: crn:v1:bluemix:public:cloud-object-storage::::serviceRole:ObjectWriter crn:v1:bluemix:public:cloud-object-storage::::serviceRole:ObjectWriter If this is the case, I am not sure that any of our service related roles would work via this module. |
As per internal discussions, the action items are:
|
A consumer has reported when trying to create a service credential using the role "Object Writer" it fails...
Input:
Fails with this:
The problem is the CRN that is generated has a space in it, and so fails regex check:
ACTIONS:
ObjectWriter
instead ofObject Writer
. Same fix needed for all roles that have a space in it.resource_keys
: https://github.com/terraform-ibm-modules/terraform-ibm-cos/tree/main/solutions/instance/DA-types.md#resource-keysservice_credential_secrets
: https://github.com/terraform-ibm-modules/terraform-ibm-cos/tree/main/solutions/instance/DA-types.md#service-credential-secretsThe text was updated successfully, but these errors were encountered: