gentle-diamond-70147
05/09/2019, 3:52 PMpulumi up
does not do a refresh from your cloud. That's what --refresh
or pulumi refresh
is for.gentle-diamond-70147
05/09/2019, 3:54 PMgentle-diamond-70147
05/09/2019, 3:55 PMlittle-river-49422
05/09/2019, 4:04 PMlittle-river-49422
05/09/2019, 4:05 PMgentle-diamond-70147
05/09/2019, 4:21 PMpulumi up --refresh
. It essentially does the same as pulumi refresh
and then pulumi up
when run separately. It does the refresh and then diff against the updated state and still prompts you before continuing.little-river-49422
05/09/2019, 5:03 PMworried-engineer-33884
05/09/2019, 7:16 PMstraight-napkin-70642
05/09/2019, 7:28 PMbig-glass-16858
05/10/2019, 1:49 PMbig-glass-16858
05/10/2019, 1:51 PMRuntimeError: asyncio.run() cannot be called from a running event loop
if anyone can point me to the right docs or code, that would be nice ๐straight-napkin-70642
05/13/2019, 7:16 PM# Example DNS record using Route53.
# Route53 is not specifically required; any DNS host can be used.
resource "aws_route53_record" "example" {
name = "${aws_api_gateway_domain_name.example.domain_name}"
type = "A"
zone_id = "${aws_route53_zone.example.id}"
alias {
evaluate_target_health = true
name = "${aws_api_gateway_domain_name.example.cloudfront_domain_name}"
zone_id = "${aws_api_gateway_domain_name.example.cloudfront_zone_id}"
}
}
Example from https://www.terraform.io/docs/providers/aws/r/api_gateway_domain_name.htmllittle-river-49422
05/15/2019, 9:09 AMcolossal-room-15708
05/16/2019, 8:35 PMboundless-room-36997
05/17/2019, 11:26 PMworried-engineer-33884
05/20/2019, 5:34 PMmy_resource.some_output.apply(lambda val: print(val))
, I get back another output that I believe has a future wrapped up in it that will execute my lambda. When does that actually get awaited?handsome-rocket-92204
05/20/2019, 5:42 PMlittle-river-49422
05/20/2019, 6:05 PMasync def get_aks_credentials():
result = await get_kubernetes_cluster(name=gen_name('aks'),
resource_group_name=gen_name('rg')
)
return result.kube_config_raw
and then I'm just calling get_aks_credentials()
in my codelittle-river-49422
05/20/2019, 6:05 PMhandsome-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
little-river-49422
05/20/2019, 8:05 PMhandsome-rocket-92204
05/20/2019, 8:09 PMlittle-river-49422
05/20/2019, 8:13 PMhandsome-rocket-92204
05/21/2019, 1:40 PMRuntimeError: Cannot run the event loop while another loop is running
handsome-rocket-92204
05/21/2019, 3:22 PMimport asyncio
import pulumi
from pulumi_aws import apigateway
async def get_vpclink(name):
result = await apigateway.get_vpc_link(name=name)
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=asyncio.ensure_future(get_vpclink('test-jenkins')),
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)
little-river-49422
05/21/2019, 4:27 PMhandsome-rocket-92204
05/21/2019, 5:23 PMhandsome-rocket-92204
05/21/2019, 5:27 PMhandsome-rocket-92204
05/21/2019, 6:03 PMhandsome-rocket-92204
05/21/2019, 6:18 PM