best-summer-38252
02/04/2023, 8:07 PMstocky-restaurant-98004
02/06/2023, 4:33 PMstraight-arm-50771
02/08/2023, 7:52 PMlora-iot-provision:
type: gcp:cloudfunctions:Function
properties:
description: "Provisions a wireless device in AWS IoT."
runtime: go119
availableMemoryMb: 256
environmentVariables:
APP_ENV: ${iotEnv}
AWS_REGION: us-east-1
secretEnvironmentVariables:
- key: AWS_ACCESS_KEY_ID
secret: cf_iotAwsAccessKey_${environment}
version: latest
projectId: my-gcp-proj
- key: AWS_SECRET_ACCESS_KEY
secret: cf_iotAwsSecretKey_${environment}
version: latest
projectId: my-gcp-proj
entryPoint: ProvisionDevicePubSub
eventTrigger:
eventType: providers/cloud.pubsub/eventTypes/topic.publish
resource: projects/${pulumi.stack}/topics/lorawan-device-provisioned
project: ${pulumi.stack}
region: us-east1
serviceAccountEmail: ${cloud-functions-sa.email}
sourceRepository:
url: "<https://source.developers.google.com/projects/my-gcp-proj/repos/github_my-mirrored-repo/moveable-aliases/main/paths/lora-iot-provision>"
brainy-caravan-45245
strong-belgium-33104
02/10/2023, 2:38 AM403 access denied
. However, I am the owner of the gcp account and authenticated gcloud auth application-default login
. Is there anything specific I need to do to be able to allow pulumi to provision the projects?kind-island-70054
02/10/2023, 2:33 PMPreviewing update (infra.dev):
Type Name Plan Info
pulumi:pulumi:Stack infrastructure-infra.dev
+ ├─ gcp:compute:RegionNetworkEndpointGroup global-lb-notification-rest-europe-west1 create
+- ├─ gcp:compute:ManagedSslCertificate global-lb replace [diff: ~managed]
+ ├─ gcp:compute:RegionNetworkEndpointGroup global-lb-notification-rest-europe-west4 create
+ ├─ gcp:compute:BackendService global-lb-notification-rest create
~ └─ gcp:compute:URLMap global-lb update [diff: ~hostRules,pathMatchers]
Resources:
+ 3 to create
~ 1 to update
+-1 to replace
5 changes. 34 unchanged
Do you want to perform this update? yes
Updating (infra.dev):
Type Name Status Info
pulumi:pulumi:Stack infrastructure-infra.dev **failed** 1 error
+ ├─ gcp:compute:RegionNetworkEndpointGroup global-lb-notification-rest-europe-west4 created (11s)
+ ├─ gcp:compute:RegionNetworkEndpointGroup global-lb-notification-rest-europe-west1 created (11s)
+- └─ gcp:compute:ManagedSslCertificate global-lb **replacing failed** 1 error
Diagnostics:
pulumi:pulumi:Stack (infrastructure-infra.dev):
error: update failed
gcp:compute:ManagedSslCertificate (global-lb):
error: deleting urn:pulumi:infra.dev::infrastructure::gcp:compute/managedSslCertificate:ManagedSslCertificate::global-lb: 1 error occurred:
* Error when reading or editing ManagedSslCertificate: googleapi: Error 400: The ssl_certificate resource 'projects/dev-julien-****/global/sslCertificates/global-lb' is already being used by 'projects/dev-julien-****/global/targetHttpsProxies/global-lb-35b3f02', resourceInUseByAnotherResource
Outputs:
Here is my pulumi code:
const sslCertificate = new gcp.compute.ManagedSslCertificate(key, {
name: key,
managed: {
domains: domains.map(({ domain }) => domain),
},
});
const targetHttpsProxy = new gcp.compute.TargetHttpsProxy(
key,
{
urlMap: urlMap.id,
sslCertificates: [sslCertificate.name],
});
Is there a way to tell pulumi that it needs to remove dependencies too?delightful-monkey-90700
02/14/2023, 4:45 AMFileAsset
uploads it as a zip file, apparently and FileArchive
provides no mechanism for specifying the kind of archive to produce).melodic-room-61098
02/14/2023, 10:49 AMindex.ts
and ran into an issue: the container image is being build and uploaded in parallel with the service update. This means that the service can only see the older image and won't update. So I have to run pulumi up
2x, which is not ideal. Is there a way to declare this dependency in code?
This is roughly what I have now: https://gist.github.com/thekarel/f8701649097eaf450d96bdf889db6d7c
I've thought of using pulumi up --parallell 1
(might slow things down) or putting the image and service in different folders (makes up
more cumbersome). Any thoughts?refined-pilot-45584
02/14/2023, 10:56 PMdelightful-monkey-90700
02/15/2023, 6:48 PMcloudbuild.v1.Build()
doesn't seem to be finished yet, is there anything equivalent for GCP Classic ?jolly-journalist-76169
02/16/2023, 9:53 AMGoogle Storage
). What am I doing now?
1. I use the module "npm googleapis" where I log in via OAuth2 to GCP
and get the accessToken - I have it stored under the variable.
2. I would like to use my accessToken in Pulumi to hold the state in GS.
I have read about setting the accessToken
(https://www.pulumi.com/registry/packages/gcp/installation-configuration/#configuration-reference; pulumi config set gcp:accessToken
), but all attempts end up forcing me to log into Pulumi Service
- and I would like to avoid that.
Actually, the matter would be solved if someone would show me how to use the pulumi login gs://
command and pass my accessToken in it.
I hope there will be someone here with knowledge!gentle-intern-40981
02/21/2023, 10:07 PMaws-python
project which worked fine but after installing pulumi_gcp
, adding the required config gcp:project
and adding a gcp
resource the pulumi preview fails with:
error: could not validate provider configuration: 1 error occurred:
* Invalid or unknown key
Debug output show:
debug: exception when preparing or executing rpc: Traceback (most recent call last):
File "/home/dissonance/Code/ouroboros/infrastructure/venv/lib/python3.10/site-packages/pulumi/runtime/resource.py", line 916, in do_rpc_call
return monitor.RegisterResource(req)
File "/home/dissonance/Code/ouroboros/infrastructure/venv/lib/python3.10/site-packages/grpc/_channel.py", line 946, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "/home/dissonance/Code/ouroboros/infrastructure/venv/lib/python3.10/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "error reading from server: read tcp 127.0.0.1:52012->127.0.0.1:33739: use of closed network connection"
debug_error_string = "UNKNOWN:Error received from peer ipv4:127.0.0.1:40435 {created_time:"2023-02-21T16:43:34.450732655-05:00", grpc_status:14, grpc_message:"error reading from server: read tcp
127.0.0.1:52012->127.0.0.1:33739: use of closed network connection"}"
If I create a new project using the gcp-python
template this problem does not exist.great-sunset-355
02/22/2023, 10:55 AMignoreChanges: [
"template.template.containers[*].image",
],
Because I also tried ignoreChanges: ["*"]
and it did not work at all.
After some experiments, I noticed this works "template.template.containers[0].image"
delightful-monkey-90700
02/23/2023, 9:38 PMcloudbuild.v1.Build()
fails because the provider is base64 encoding a UUID string:
error: waiting for completion / read state googleapi: Error 404: Requested entity was not found. (URL=<https://cloudbuild.googleapis.com/v1/projects/production/locations/us-west2/builds/NTBhNjY5MjMtZTJmYy00YTE0LWI5ZjQtNmEwZWVkNGIwMWIw>): polling operation status: googleapi: Error 404: Requested entity was not found.
-->
> echo 'NTBhNjY5MjMtZTJmYy00YTE0LWI5ZjQtNmEwZWVkNGIwMWIw' | base64 -d
50a66923-e2fc-4a14-b9f4-6a0eed4b01b0
-->
The real URL should have been <https://cloudbuild.googleapis.com/v1/projects/production/locations/us-west2/builds/50a66923-e2fc-4a14-b9f4-6a0eed4b01b0>
better-pencil-34948
02/24/2023, 5:34 PMpulumi:pulumi:StackReference (<gs://bucket/account>):
error: Preview failed: unknown stack "account"
rich-motorcycle-3089
02/27/2023, 7:10 PMnil
seem to cause Pulumi to ignore the health checks altogether (keep the existing values for the next revision). Attempting to give it empty objects causes Pulumi to overwrite the values, but with default implementations of the health check.
I’m using the Go SDKbest-summer-38252
02/28/2023, 7:18 PMError 400: Role roles/workflow.invoker is not supported for this resource., badRequest
Surely a service account can have a role as per the Pulumi example. The exmaple shows the format of the role being just the role name, roles/iam.serviceAccountUser, which seems consistent with the type info:
_The role that should be applied Only one gcp.organizations.IAMBinding
can be used per role. Note that custom roles must be of the format organizations/{{org_id}}/roles/{{role_id}}
._
Given I am not using custom roles, is roles/workflow.invoker
the correct format?clean-winter-59829
03/01/2023, 5:56 AMstocky-restaurant-98004
03/01/2023, 6:29 PMpurple-electrician-80135
03/02/2023, 12:54 AMpython inline source runtime error: 'Cluster' object is not callable
From this code:
def create_gks_autopilot_cluster(project_id, name, region, network_id, subnet_id):
gke_min_version = "1.25.6-gke.200"
default = gcp.serviceaccount.Account("default",
account_id="service-account-id",
display_name="Service Account")
# Define the GKE Autopilot cluster
gke_cluster = gcp.container.Cluster(name,
enable_autopilot=True,
ip_allocation_policy=container.ClusterIpAllocationPolicyArgs(
cluster_secondary_range_name="pods",
services_secondary_range_name="services",
),
location=region,
min_master_version=gke_min_version,
network=network_id,
release_channel={"channel": "STABLE"},
subnetwork=subnet_id,
project=project_id,)
return gke_cluster
Is there anything obvious I should be doing differently? .. this is running in a Jupyter notebook .. which has made configs unavailable (probably due being unable to find the .yaml file) but otherwise seems to work.many-knife-65312
03/03/2023, 11:41 PMmany-knife-65312
03/03/2023, 11:42 PM.get()
function to check for existing gcp resources, but i'm struggling with the unique provider ID, does anyone have docs or tips for using .get()
?gorgeous-architect-28903
03/09/2023, 12:14 PMCannot specify both name and name_prefix for a node_pool
— I’m definitely not setting a name. It happens even if I set Name
to nil
explicitly.limited-wolf-14679
03/09/2023, 11:51 PM# new kubeflow
kubeflow = gcp.container.Registry("kubeflow")
deployment = Deployment(
"kubeflow-deployment",
spec=DeploymentSpecArgs(
replicas=1,
selector=LabelSelectorArgs(
match_labels={
"app": "kubeflow",
},
),
template=PodTemplateSpecArgs(
metadata=ObjectMetaArgs(
labels={
"app": "kubeflow",
},
),
spec=PodSpecArgs(
containers=[
ContainerArgs(
name="kubeflow",
image="kubeflow",
env=[
EnvVarArgs(
name="NAMESPACE",
value="kubeflow",
),
],
command=["/bin/bash"],
args=[
"-c",
"/opt/deploy.sh",
]
)
]
)
)
),
metadata=ObjectMetaArgs(
labels={
"app": "kubeflow",
}
)
)
pulumi.export("name", deployment.metadata["name"])
# Allocate an IP to the Deployment.
app_name = "kubeflow"
app_labels = { "app": app_name }
frontend = Service(
app_name,
metadata={
"labels": deployment.spec["template"]["metadata"]["labels"],
},
spec={
"type": "LoadBalancer",
"ports": [{ "port": 80, "target_port": 80, "protocol": "TCP" }],
"selector": app_labels,
})
# When "done", this will print the public IP.
result = None
ingress = frontend.status.apply(lambda v: v["load_balancer"]["ingress"][0] if "load_balancer" in v else None)
if ingress is not None:
result = ingress.apply(lambda v: v["ip"] if "ip" in v else v["hostname"])
pulumi.export("ip", result)
I am getting the following error:
* the Kubernetes API server reported that "default/kubeflow-deployment-d5cb3c03" failed to fully initialize or become live: 'kubeflow-deployment-d5cb3c03' timed out waiting to be Ready
* [MinimumReplicasUnavailable] Deployment does not have minimum availability.
* [ProgressDeadlineExceeded] ReplicaSet "kubeflow-deployment-d5cb3c03-769cdfbd67" has timed out progressing.
* Minimum number of live Pods was not attained
* [Pod kubeflow-deployment-d5cb3c03-769cdfbd67-4lsjp]: containers with unready status: [kubeflow] -- [ImagePullBackOff] Back-off pulling image "kubeflow"victorious-florist-84818
03/14/2023, 9:49 AMbillions-hydrogen-34268
03/15/2023, 5:43 PMchilly-garage-80867
03/15/2023, 8:00 PMchilly-garage-80867
03/15/2023, 8:00 PMError 400: Max pods constraint on node pools for Autopilot clusters should be 32.
adorable-activity-71456
03/15/2023, 10:39 PMError 409: The operation was aborted.
after the pulumi up runs for about 20 minutes.stocky-restaurant-98004
03/16/2023, 6:23 PM