Hello, trying to run an upgrade. I'm getting this ...
# package-authoring
b
Hello, trying to run an upgrade. I'm getting this error
error: Resource crowdstrike_sensor_update_policy_host_group_attachment has a problem: an "id" input attribute is not allowed. To map this resource specify SchemaInfo.Name and ResourceInfo.ComputeID
What needs to be done here? I found this documentation https://github.com/pulumi/pulumi-terraform-bridge/blob/master/docs/guides/resource-ids.md, but it doesn't provide guidance on this specific issue. I believe the issue is arising because the id is not a computed value in terraform, but rather one that needs to be supplied by the user. What is the recommended work around?
a
Hi @brash-school-3769, we've missed in the documentation but the correct thing to do is use ComputeID with the DelegateIDField helper from the TF bridge: https://pkg.go.dev/github.com/pulumi/pulumi-terraform-bridge/v3@v3.106.1-0.20250416142950-9ff35dbdae81/pkg/tfbridge#DelegateIDField
Something like:
Copy code
"crowdstrike_sensor_update_policy_host_group_attachment": {
				ComputeID: tfbridge.DelegateIDField(resource.PropertyKey("id"),
					"crowdstrike", "<https://github.com/crowdstrike/pulumi-crowdstrike>"),
			},
In your resources.go file
LMK if you have more issues here
Ah, my bad, you probably want to first rename the
id
field though so that it is still usable on the Pulumi side:
Copy code
"crowdstrike_sensor_update_policy_host_group_attachment": {
				Fields: map[string]*info.Schema{
					"id": {
						Name: "idProperty",
					},
				},
				ComputeID: tfbridge.DelegateIDField(resource.PropertyKey("idProperty"),
					"crowdstrike", "<https://github.com/crowdstrike/pulumi-crowdstrike>"),
			},
Something like this should work
Also raised a PR to update the docs: https://github.com/pulumi/pulumi-terraform-bridge/pull/3017 Thanks for pointing it out!
b
Awesome! Thank you very much. Worked perfectly!