sparse-intern-71089
02/27/2023, 1:03 PMechoing-dinner-19531
02/27/2023, 3:13 PMCustomResource
, they are specific to providers. "gpcmyaccountCluster" tells the engine this is a resource from the "gcp" provider called "myaccount:Cluster". The gcp provider doesn't define that resource so you get an unrecognized resource type error.hallowed-room-5599
02/27/2023, 3:16 PMgcloud
. So what is the suggested approach? I'm on a GKE trial period so can't be waiting for Pulumi to maybe or maybe not implement the missing gcloud flagechoing-dinner-19531
02/27/2023, 3:16 PMhallowed-room-5599
02/27/2023, 4:34 PMcluster.name
below without adding GkeClusterArgs and a bunch of unnecessary boilerplate?
class GkeClusterProvider(ResourceProvider):
def create(self, inputs):
cluster_name = inputs["name"] + "-" + str(uuid.uuid4())[:8]
return CreateResult(id_=cluster_name, outs={
"name": cluster_name,
})
class GkeCluster(Resource):
name: pulumi.Output[str]
def __init__(self, name, props=None, opts=None):
props = props or {}
super().__init__(GkeClusterProvider(), name, {}, opts)
cluster = GkeCluster("cluster-staging")
pulumi.export("myresource", cluster.name)
echoing-dinner-19531
02/27/2023, 5:46 PM