future-daybreak-16512
12/07/2021, 9:35 AMerror: Exception calling application: There is no current event loop in thread 'ThreadPoolExecutor-0_0'.
The sample code :
from pprint import pprint
from pulumi_policy import (
ReportViolation,
ResourceValidationArgs,
)
import pulumi
import pulumi_aws as aws
config = pulumi.Config()
def ec2_validator(args: ResourceValidationArgs, report_violation: ReportViolation):
if args.resource_type == "aws:ec2/instance:Instance":
if args.props.get('vpcSecurityGroupIds'):
sg_id = aws.ec2.get_security_groups(tags={
"key": "val",
"key": "val",
})
pprint(vars(sg_id))
Any idea how to fix this error?No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by