sparse-intern-71089
01/29/2019, 9:08 PMchilly-photographer-60932
01/29/2019, 9:34 PMgentle-diamond-70147
01/29/2019, 9:35 PMgentle-diamond-70147
01/29/2019, 9:38 PM.apply(x=>x) might be the best option or my favorite pulumi.interpolate....chilly-photographer-60932
01/29/2019, 9:44 PMOutput<string> to Input<string>chilly-photographer-60932
01/29/2019, 9:44 PMchilly-photographer-60932
01/29/2019, 9:48 PMexport async function createAliasRecord(
  targetDomain: string,
  loadBalancername: Output<string>
): Promise<aws.route53.Record> {
  const domainParts = getDomainAndSubdomain(targetDomain);
  const hostedZone = await aws.route53.getZone({
    name: domainParts.parentDomain
  });
  return new aws.route53.Record(targetDomain, {
    name: domainParts.subdomain,
    zoneId: hostedZone.zoneId,
    type: "A",
    aliases: [
      {
        name: loadBalancername,
        zoneId: getHostedZoneId().then(s => s.id),
        evaluateTargetHealth: true
      }
    ]
  });
}chilly-photographer-60932
01/29/2019, 9:49 PMloadBalancername to aliases namechilly-photographer-60932
01/29/2019, 9:50 PMname requires Input<string>gorgeous-egg-16927
01/29/2019, 9:59 PMOutput<string> into places requiring an Input<String>chilly-photographer-60932
01/29/2019, 10:00 PMDiagnostics:
  aws:route53:Record (<http://xyz.xyz.io|xyz.xyz.io>):
    error: aws:route53/record:Record resource '<http://xyz.xyz.io|xyz.xyz.io>' has a problem: "alias.0.name": required field is not setchilly-photographer-60932
01/29/2019, 10:01 PMchilly-photographer-60932
01/29/2019, 10:01 PMgorgeous-egg-16927
01/29/2019, 10:01 PMloadBalancername.get()?gentle-diamond-70147
01/29/2019, 10:01 PMcreateAliasRecord(...)?orange-tailor-85423
01/29/2019, 10:02 PMchilly-photographer-60932
01/29/2019, 10:02 PMcreateAliasRecord(<http://config.xyz|config.xyz>, xyz);chilly-photographer-60932
01/29/2019, 10:03 PMget because it errors
error: Error: Cannot call '.get' during update or preview.
    To manipulate the value of this Output, use '.apply' instead.gentle-diamond-70147
01/29/2019, 10:06 PMxyz in createAliasRecord(<http://config.xyz|config.xyz>, xyz); ?gorgeous-egg-16927
01/29/2019, 10:06 PM/**
 * Input is a property input for a resource.  It may be a promptly available T, a promise
 * for one, or the output from a existing Resource.
 */
export declare type Input<T> = T | Promise<T> | Output<T>;gentle-diamond-70147
01/29/2019, 10:07 PMorange-tailor-85423
01/29/2019, 10:07 PMchilly-photographer-60932
01/29/2019, 10:07 PMxyz is Output<String>gentle-diamond-70147
01/29/2019, 10:09 PMconst xyz = loadbalancer.name; is further up in your code?chilly-photographer-60932
01/29/2019, 10:11 PMip instead of name which was causing the issue.chilly-photographer-60932
01/29/2019, 10:11 PM