The error I get when running this complains at the...
# python
c
The error I get when running this complains at the beginning of the
get_next_subnet_prefix
function on the first line. The error output I get is:
Copy code
Diagnostics:
  pulumi:pulumi:Stack (CS-DEL-SS-dev):
    error: Program failed with an unhandled exception:
    Traceback (most recent call last):
      File "/home/cs_admin/repos/pulumi-cs-builds/CS-DEL-SS/./__main__.py", line 42, in get_next_subnet_prefix
        existing_subnets = myvnet.subnets.apply(
    AttributeError: 'list' object has no attribute 'apply'
a
The subnets attribute is a Sequence[SubnetResponse] (list) so you cannot do an
apply()
directly on that. Here's a solution that will achieve what you're after.
c
Thank you for a response! I will compare this to what was provided by PulumiAI and learn from there.