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

square-night-79134

06/22/2023, 4:00 PM
Hi I am using following code to getting information for an existing auto pilot cluster, But I guess getClusterArgs is not defined. I am using following import
Copy code
import (
    "<http://github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/container|github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/container>"
    "<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi|github.com/pulumi/pulumi/sdk/v3/go/pulumi>"
)
Copy code
existingCluster, err := container.GetCluster(ctx, &container.GetClusterArgs{
			Location: pulumi.String("your-existing-cluster-location"),
			Name:     pulumi.String("your-existing-cluster-name"),
			Project:  pulumi.String("your-existing-project-id"),
		})
		if err != nil {
			return err
		}