Skip to content

Creating and Updating vm with label fails #276

@ahtasham637

Description

@ahtasham637

Trying to create VM with labels having value 'test-by-Ahtasham' fails

Error while creating new Vm BadRequestError: Invalid value for field 'resource.labels': ''. Label value 'test-by-Ahtasham' violates format constraints. The value can only contain lowercase letters, numeric characters, underscores and dashes. The value can be at most 63 characters long. International characters are allowed.

The value of label is:

labels: {
        'my_vm_name': 'test-by-Ahtasham',
      }

Version: 3.5.2

Is this a client library issue or a product issue? Library issue
Did someone already solve this? No
Environment details
OS: Mac
Node.js version: 18
npm version: 8.1.0
google-gax version: 3.5.2

Steps to reproduce

npm install @google-cloud/compute
Creating a VM with labels using @google-cloud/compute

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions