I want to perform this step via Pulumi:
gcloud compute backend-services create --global $BACKEND_NAME
This is how I am doing it:
backend_service = compute.BackendService(
backend_name,
project=gcp_project,
backends=backends,
enable_cdn=True,
port_name="http",
protocol="HTTP"
)
From the documentation, it mentions that:
This resource is a global backend service,
Does it mean, the code I have shared, creates the backend service for 'global'?
Yes the code you shared creates a backend service for 'global' and you can try to use this typscript as a guide
As a reference, you can check this documentation. or for this reference.