https://pulumi.com logo
#python
Title
# python
v

victorious-exabyte-70545

01/13/2022, 9:36 PM
Copy code
# Pod access to elasticsearch scaleset
es_vm_scaleset = azure.compute.get_virtual_machine_scale_set(
    resource_group_name=f"{environment}-elasticsearch",
    name=f"{environment}-elasticsearch-scaleset")

azure.authorization.Assignment(
    "PodESScalesetReaderAssignment",
    scope=es_vm_scaleset.id,
    role_definition_name="Reader",
    principal_id=pod_assigned_identity.principal_id,
    opts=ResourceOptions(depends_on=[es_vm_scaleset, pod_assigned_identity])
)
b

billowy-army-68599

01/13/2022, 9:38 PM
there's no urn output from that resource, no. where are you passing the urn?
v

victorious-exabyte-70545

01/13/2022, 9:41 PM
Hmmm. I am not explicitly passing the urn anywhere.
Note that I am newish to pulumi and may be missing something.
b

billowy-army-68599

01/13/2022, 9:43 PM
i think it's the
depends_on
- trye remove the es_vm_scaleset from there
you don't need it
v

victorious-exabyte-70545

01/13/2022, 9:53 PM
That is it! That makes a lot of sense. get_* is not a resource with an urn that pulumi tracks.
Thansk!!!!