In the case that a user runs a particular config twice, I've hit this bug (twice now) that it tells me the collocation policy (I think this is for compact) already exists:
╷
│ Error: Error creating ResourcePolicy: googleapi: Error 409: The resource 'projects/llnl-flux/regions/us-central1/resourcePolicies/gffw-compute-a-collocated-policy' already exists, alreadyExists
│
│ with module.cluster.module.compute_nodes["gffw-compute-a"].google_compute_resource_policy.collocated[0],
│ on .terraform/modules/cluster/fluxfw-gcp/tf/modules/compute/main.tf line 45, in resource "google_compute_resource_policy" "collocated":
│ 45: resource "google_compute_resource_policy" "collocated" {
│
╵
I'm not sure if there is a way to say "get or create" but I think we need that here! I did find where they live in the GCP console, but as far as I can tell, there is no DELETE button (and likely it needs to be done with an API). I think the terraform recipe in theory should clean everything up, but if there was ever a blurp it could be left not cleaned up, and then the user gets this bug.
To get around it I'm going to just rename the prefix and get a different policy name, although for the future it would be good to not have to do that! I can imagine my GCP policy page is going to fill up fast :laughing:
In the case that a user runs a particular config twice, I've hit this bug (twice now) that it tells me the collocation policy (I think this is for compact) already exists:
I'm not sure if there is a way to say "get or create" but I think we need that here! I did find where they live in the GCP console, but as far as I can tell, there is no DELETE button (and likely it needs to be done with an API). I think the terraform recipe in theory should clean everything up, but if there was ever a blurp it could be left not cleaned up, and then the user gets this bug.
To get around it I'm going to just rename the prefix and get a different policy name, although for the future it would be good to not have to do that! I can imagine my GCP policy page is going to fill up fast :laughing: