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

damp-room-71337

08/22/2019, 5:35 PM
I’m struggling with using
Outputs
in template strings - whatever I do here returns a
Calling [toString] on an [Output<T>]...
error - what am I missing?
Copy code
// Route53 zone
const clusterApexZone = new aws.route53.Zone("apex", {
  name: `${pulumi.getStack()}.<http://synchronicity-dc.uk|synchronicity-dc.uk>`
});

// Route53 Zone update policy
const eksWorkerRoute53ReadWritePolicy = new aws.iam.Policy(
  "eks-worker-r53-rw",
  {
    description:
      "Allows EKS workers to read/write records in a specific R53 zone",
    policy: pulumi.interpolate `{
      Version: "2012-10-17",
      Statement: [
        {
          Action: ["route53:ChangeResourceRecordSets"],
          Effect: "Allow",
          Resource: "arn:aws:route53:::hostedzone/${clusterApexZone.zoneId}"
        }
      ]
    }`
  }, { dependsOn: clusterApexZone }
);