https://pulumi.com logo
#golang
Title
# golang
b

bumpy-bear-61087

02/29/2024, 9:33 PM
Hi, so I'm trying to create some basic GCP resources, but e.g. creating a Router results in a 404 always for a new resource, which feels odd;
Copy code
router, err := compute.NewRouter(ctx,
		fmt.Sprintf("gke-%s-network-router", clusterName),
		&compute.RouterArgs{
			Project:     pulumi.String(projId),
			Description: pulumi.String("Router for the GKE network subnet"),
			Name:        pulumi.String(fmt.Sprintf("gke-%s-network-router", clusterName)),
			Network:     network.ID(),
			Region:      pulumi.String(region),
		},
	)
	if err != nil {
		return err
	}
And the error log:
Copy code
<p>The requested URL <code>/compute/beta/projects/xxx-pulumi-test/regions/region/routers/projects/xxx-pulumi-test/regions/europe-west1/routers/gke-dev-cluster-network-router?alt=json</code> was not found on this server.  <ins>That's all we know.</ins>
s

straight-beach-79533

03/01/2024, 11:48 AM
Wild guess:
Copy code
Name:        pulumi.String(fmt.Sprintf("gke-%s-network-router", clusterName)),
What happens if yod don't override the Name ?