handsome-rocket-92204
05/20/2019, 6:47 PMimport pulumi
from pulumi_aws import apigateway
async def get_vpclink():
result = await apigateway.get_vpc_link(name="test-link")
return result.id
rest_api = apigateway.RestApi('test-api-jenkins')
api_method = apigateway.Method('post', authorization='NONE', http_method='POST', resource_id=rest_api.root_resource_id, rest_api=rest_api.id)
integration = apigateway.Integration('post', connection_id=get_vpclink(), connection_type='VPC_LINK', http_method='POST', resource_id=rest_api.root_resource_id, rest_api=rest_api.id, type='HTTP_PROXY', uri='<https://test-api-jenkins.example.com/generic-webhook-trigger/invoke>')
pulumi.export('REST API ID', rest_api.id)
and I'm getting the RuntimeError: cannot reuse already awaited coroutine