bored-electrician-25503
03/12/2025, 8:05 AMComponent Resources
to create VPC and internet gateways. I need to fetch availability zones for the given region for subnets and the region will be passed as JSON in the API. Here is my code looks like:
class VPC(pulumi.ComponentResource):
def __init__(self, name: str, stack_args: AWSStackBase, opts: pulumi.ResourceOptions=None):
super().__init__("Custom:Component:VPC", name, {}, opts)
self.availability_zones = aws.get_availability_zones(filters[{
"name": "region-name",
"values": [f"{stack_args.region}"]
}])
This is giving this error:
AttributeError: 'NoneType' object has no attribute 'Invoke'
Any help in solving this would be highly appreciated.