https://pulumi.com logo
#general
Title
# general
l

late-printer-99022

01/16/2020, 4:16 AM
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

ambitious-ram-5811

01/16/2020, 4:27 AM
I think you probably want to read https://www.pulumi.com/docs/intro/concepts/programming-model, especially the section "Outputs and Inputs"
l

late-printer-99022

01/16/2020, 5:09 AM
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

ambitious-ram-5811

01/16/2020, 5:28 AM
This sounds like an AWS error being surfaced
l

late-printer-99022

01/16/2020, 5:29 AM
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

white-balloon-205

01/16/2020, 5:53 AM
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

late-printer-99022

01/16/2020, 6:15 AM
@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

white-balloon-205

01/16/2020, 6:39 AM
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