Hi Community, We have adopted Pulumi with lots of ...
# general
l
Hi Community, We have adopted Pulumi with lots of hope to have 100% fully Infra as code. I am pushing my company to adopt Pulumi but facing small problems here or here. Even after posting on slack, I am not getting solution. Please suggest me what to do. Example - https://github.com/pulumi/pulumi-aws/issues/848 Kindly let me know How to fix this error !!
a
I think you probably want to read https://www.pulumi.com/docs/intro/concepts/programming-model, especially the section "Outputs and Inputs"
l
I have solved OutPut<string> error, Now I am getting following error.
Copy code
error: Running program '/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi' failed with an unhandled exception:
    Error: invocation of aws:route53/getZone:getZone returned an error: invoking aws:route53/getZone:getZone: no matching Route53Zone found
        at /home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/@pulumi/pulumi/runtime/invoke.js:172:33
        at Object.onReceiveStatus (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:1210:9)
        at InterceptingListener._callNext (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:568:42)
        at InterceptingListener.onReceiveStatus (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:618:8)
        at callback (/home/narendra/Coding/platform/syngenta-platform-infra-using-pulumi/node_modules/grpc/src/client_interceptors.js:847:24)
a
This sounds like an AWS error being surfaced
l
Copy code
invoking aws:route53/getZone:getZone: no matching Route53Zone found
I am trying to get ZoneId of ELB url.
This record I created manually and working. Trying to replicate same with Pulumi.
Trying to get
*Alias Hosted Zone ID:* Z35SXDOTRQ7X7K
w
I replied on the issue - the error seems expected given the code - I can't tell what exactly you are trying to do here - but . the code seems to be working as expected.
l
@white-balloon-205 - replied @lukehoban - How to get it then. I don't want to hardcode 
Z35SXDOTRQ7X7K
 in my code. There must be a way to get ZoneId of 
<http://us-east-1.elb.amazonaws.com|us-east-1.elb.amazonaws.com>.
w
It looks like this is what
aws.elb.getHostedZoneId()
is for:
Copy code
import * as aws from "@pulumi/aws";

export const elbHostedZoneId = aws.elb.getHostedZoneId().id;
Copy code
Outputs:
    elbHostedZoneId: "Z35SXDOTRQ7X7K"
❤️ 2
👍 1
✔️ 1