pulumi / pulumi-google-native

Apache License 2.0
71 stars 18 forks source link

google-native:storagetransfer/v1:TransferJob - Error 400 - Invalid project resource name #468

Open stockymcstockface opened 2 years ago

stockymcstockface commented 2 years ago

What happened?

I can't create a TransferJob resource

Steps to reproduce

I try to create a TransferJob resource as such:

    const staging_core_assets_transfer_job = new google_native.storagetransfer.v1.TransferJob("dummy", {
        name: "transferJobs/dummy",
        description: "",
        transferSpec: {
            gcsDataSource: {
                bucketName: backup_core_assets_bucket.name,
                path: "images/"
            },
            gcsDataSink: {
                bucketName: staging_core_assets_bucket.name,
                path: "images/"
            }
        }
    });

Expected Behavior

The resource is created

Actual Behavior

Resource creation fails with following log:

Diagnostics:
    error: update failed

  google-native:storagetransfer/v1:TransferJob (dummy):
    error: error sending request: googleapi: Error 400: Invalid project resource name projects/
    Details:
    [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "description": "Invalid project resource name",
            "field": "name"
          }
        ]
      }
    ]: "https://storagetransfer.googleapis.com/v1/transferJobs" map[description: name:transferJobs/dummy transferSpec:map[gcsDataSink:map[bucketName:staging-core-assets-bucket path:images/] gcsDataSource:map[bucketName:backup-core-assets-bucket path:images/]]]

Versions used

CLI Version 3.28.0 Go Version go1.18 Go Compiler gc

Plugins NAME VERSION cloudflare 4.6.0 gcp 6.20.0 google-native 0.18.1 kubernetes 3.18.2 nodejs unknown

Host OS arch Version Arch x86_64

This project is written in nodejs (/usr/bin/node v17.7.1)

Found no pending operations associated with prod

Backend Name pulumi.com

NAME VERSION @pulumi/kubernetes 3.18.2 @pulumi/pulumi 3.29.1 @types/bcrypt 5.0.0 @types/node 14.18.13 bcrypt 5.0.1 @pulumi/cloudflare 4.6.0 @pulumi/gcp 6.20.0 @pulumi/google-native 0.18.1

Additional context

No response

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).

guineveresaenger commented 2 years ago

Thank you for filing this issue!

paslandau commented 1 year ago

FYI: I just ran into the same error while trying to create a transfer job from the Cloud Console UI. In my case the culprit was that I did not select any project in the project selector.