orange-airport-64592
04/21/2023, 3:10 AMaws.apigateway.get_resource
, I want to know how to wait for a resource to be created before obtaining its attribute using Pulumi. Here is my code.
rest_api = aws.apigateway.RestApi(
resource_name="login",
name="login",
body=ApiFile("login.yaml").body,
)
# This may be failed , I think is caused by the resource had not been created
resource = aws.apigateway.get_resource(
rest_api_id=rest_api.id,
path="/login",
)
brave-planet-10645
04/21/2023, 9:18 AMorange-airport-64592
04/23/2023, 2:57 AMbillowy-army-68599
04/23/2023, 2:40 PMget_resource
? it returns the same properties as the creation of the resourcerhythmic-secretary-1287
04/23/2023, 11:54 PMinitialize a database
described here https://www.pulumi.com/blog/deploying-mysql-schemas-using-dynamic-providers/orange-airport-64592
04/24/2023, 9:05 AMapigateway
API
using an openapi
file, as shown in my previous code. so I cannot access api.resource
from the returned API object because it was not created using the method aws.apigateway.resource()
.
Next, I need to create an integration for a specific resource, like this:
aws.apigateway.integration(
rest_api=rest_api, resource=HERE_I_NEED_A_RESOURCE_OBJECT,
xxx,
)
apigateway.get_resource_output
instead of apigateway.get_resource
, but this docs don’t make this clear.
rest_api = aws.apigateway.RestApi(
resource_name="login",
name="login",
body=ApiFile("login.yaml").body,
)
resource = aws.apigateway.get_resource_output(
rest_api_id=rest_api.id,
path="/login",
)