GoogleCloudPlatform / application-integration-management-toolkit

This tool lets you interact with Application Integration, Integration Connectors or Apigee Integration/Connector APIs. The tool lets you manage (create, del, get, list) integrations, connections etc.
Apache License 2.0
22 stars 16 forks source link

CLI does not accept Service Accounts that start with a digit. #257

Closed swilliams11 closed 3 months ago

swilliams11 commented 3 months ago

Describe the bug When I issue the following command.

integrationcli connectors create -n my-connector-tf -f bigquery_app_int_connector.json -p $project -r $region --sa 5555555-compute --wait

I get the following error.

{
  "error": {
    "code": 400,
    "message": "5555555-compute does not match [a-zA-Z][a-zA-Z\\d\\-]*[a-zA-Z\\d].",
    "status": "INVALID_ARGUMENT"
  }
}

ERROR: 2024/06/05 15:56:05 iam.go:269: Bad Request - malformed request syntax: {
  "error": {
    "code": 400,
    "message": "5555555-compute does not match [a-zA-Z][a-zA-Z\\d\\-]*[a-zA-Z\\d].",
    "status": "INVALID_ARGUMENT"
  }
}

Error: Bad Request - malformed request syntax: {
  "error": {
    "code": 400,
    "message": "5555555-compute does not match [a-zA-Z][a-zA-Z\\d\\-]*[a-zA-Z\\d].",
    "status": "INVALID_ARGUMENT"
  }
}

Version Version of the cli being used (run integrationcli --version) integrationcli version 0.76.1 date: 2024-05-24T15:45:32Z [commit: aa937cc]

To Reproduce See command above.

Expected behavior I expect that it accepts my Service Account. I'm using default compute engine service account which starts with a number, but the CLI tool doesn't accept it as a valid SA. Please update it to accept SAs that start with digits.

Screenshots

Additional context

ssvaidyanathan commented 3 months ago

Thats right. "Service account ID must start with a lower case letter, followed by one or more lower case alphanumerical characters that can be separated by hyphens."