pulumi / pulumi-gcp

A Google Cloud Platform (GCP) Pulumi resource package, providing multi-language access to GCP
Apache License 2.0
184 stars 53 forks source link

RegionNetworkEndpointGroup: Invalid value for field 'resource.creationTimestamp' #804

Open Narrayahodeir opened 2 years ago

Narrayahodeir commented 2 years ago

What happened?

I want to create a serverless NEG with the compute.RegionNetworkEndpointGroup resource (NodeJS SDK) and get the following error:

"Error creating RegionNetworkEndpointGroup: googleapi: Error 400: Invalid value for field 'resource.creationTimestamp': ''. Must be a match of regex '(?:[0-9a-z][0-9a-z-]{0,48})'., invalid"

The creation timestamp looks empty and isn't valid.

Steps to reproduce

The following resource is being used:

const networkEndpointGroup = new gcp.compute.RegionNetworkEndpointGroup(
  'network-endpoint-group',
  {
    name: `${prefix}-neg`,
    region: gcpRegion,
    networkEndpointType: 'SERVERLESS',
    serverlessDeployment: {
      platform: 'apigateway.googleapis.com',
      resource: apiGateway.id,
    },
  }
);

Expected Behavior

I expect a valid creationTimestamp and the resource being created successfully.

Actual Behavior

After issuing pulumi up this error appears:

"Error creating RegionNetworkEndpointGroup: googleapi: Error 400: Invalid value for field 'resource.creationTimestamp': ''. Must be a match of regex '(?:[0-9a-z][0-9a-z-]{0,48})'., invalid"

And the resource isn't being created.

Versions used

CLI
Version 3.30.0 Go Version go1.18.1

Plugins NAME VERSION nodejs 16.14.0

Host
OS darwin Version 12.3.1 Arch x86_64

Name @pulumi/google-native 0.18.1 @pulumi/gcp 6.21.0

Additional context

If I change resource: apiGateway.id, to urlMask: '<gateway>' the resource is being created. But I need the resource property.

With the "gcloud beta SDK" the resource can be created with the required properties (with resource instead urlmask).

The same behaviour is experienced with the google-native provider version 0.18.1.

Contributing

Vote on this issue by adding a πŸ‘ reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

knowhoper commented 2 years ago

πŸ‘

guineveresaenger commented 2 years ago

Thank you for filing this issue!

mylesdavittcarma commented 2 years ago

πŸ‘

shaariqch commented 2 years ago

πŸ‘

knowhoper commented 2 years ago

Is there any update on this issue? @Narrayahodeir

Narrayahodeir commented 2 years ago

Is there any update on this issue? @Narrayahodeir

Not from my site. It seems to be an upstream issue and needs to be addressed there.

Mankee commented 1 year ago

πŸ‘