When creating a `new gcp.cloudrun.DomainMapping`, ...
# google-cloud
When creating a
new gcp.cloudrun.DomainMapping
, how do I use the output's resource records to create a new
new gcp.dns.RecordSet
? I tried this, but won't work:
Copy code
const mapping = new gcp.cloudrun.DomainMapping(...)
new gcp.dns.RecordSet(
      name: 'xxx.',
      managedZone: zone.name,
      type: 'A',
      ttl: 3600,
      rrdatas: mapping.status.resourceRecords,
      dependsOn: [zone, mapping],
      deleteBeforeReplace: true,
The issue is: error TS2322: Type 'Output<DomainMappingStatusResourceRecord[]>' is not assignable to type 'Input<Input<string>[]>'.
Should be something like
mapping.status.resourceRecords.apply(rs => rs && rs.map(r => r.rrdata))
I responded at SO
Ah thanks! I'll try it and respond back at SO.