https://pulumi.com logo
#general
Title
# general
i

icy-engineer-10830

09/26/2019, 2:57 PM
this is given as an example for a GCP `InstanceTemplate`:
Copy code
* const instanceTemplate = new gcp.compute.InstanceTemplate("instanceTemplate", {
 *     // boot disk
 *     disks: [{}],
 *     machineType: "n1-standard-1",
 *     namePrefix: "instance-template-",
 *     // networking
 *     networkInterfaces: [{}],
 *     region: "us-central1",
 * });
but fails on creation with:
Copy code
Diagnostics:
  gcp:compute:InstanceTemplate (instanceTemplate):
    error: gcp:compute/instanceTemplate:InstanceTemplate resource 'instanceTemplate' has a problem: "name": conflicts with name_prefix
g

gentle-diamond-70147

09/26/2019, 3:02 PM
Did you copy/paste that exactly? I don't see
name
defined there.
i

icy-engineer-10830

09/26/2019, 3:03 PM
@gentle-diamond-70147 yes, the name property is set via the first argument "instanceTemplate" and can't be omitted
g

gentle-diamond-70147

09/26/2019, 3:04 PM
There's also a separate
name
property that lets you override the auto-naming functionality. I wasn't sure if you set that too. Sounds like a bug. Can you open an issue at https://github.com/pulumi/pulumi-gcp/issues ?
w

white-balloon-205

09/26/2019, 3:05 PM
https://github.com/pulumi/pulumi-aws/issues/143 is related - but that was fixed a year ago. I wonder if there is some remaining symptom here.
i

icy-engineer-10830

09/26/2019, 3:08 PM
@gentle-diamond-70147 I can open an issue
👍 1
@gentle-diamond-70147 https://github.com/pulumi/pulumi-gcp/issues/227, let me know if there's any additional info I can get for you regarding the issue