Unable to create `gcp` `dns` `recordset`. ``` impo...
# general
c
Unable to create
gcp
dns
recordset
.
Copy code
import * as gcp from '@pulumi/gcp';

const prod = new gcp.dns.ManagedZone('prod', {
  dnsName: 'naveen.xyz.io.'
});
new gcp.dns.RecordSet('naveen', {
  managedZone: prod.name,
  rrdatas: ['8.8.8.8'],
  ttl: 300,
  type: 'A'
});
Copy code
gcp:dns:RecordSet (naveen):
    error: Plan apply failed: Error creating DNS RecordSet: googleapi: Error 400: Invalid value for 'entity.change.additions[0].name': 'naveen-ff1a1c6', invalid
Looks like the issue with the name is the issue and something similar https://github.com/terraform-providers/terraform-provider-google/issues/634
@microscopic-florist-22719 this is also related to the other one where we are unable to create the static IP. Now that I have hardcoded the static IP. I am still unable to create DNS Recordset.
Both the static ip and unable to create recordset are blockers from delivering what we have promised.
Would appreciate any update on this because this is critical for us
g
Hi Naveen, I'm looking into this now.
It looks like the
name
argument of
gcp.dns.RecordSet
must be the FQDN - e.g.
<http://naveen.naveen.xyz.io|naveen.naveen.xyz.io>
based on the values in your code.
this runs successfully...
Copy code
import * as pulumi from '@pulumi/pulumi';
import * as gcp from '@pulumi/gcp';

const prod = new gcp.dns.ManagedZone('prod', {
    dnsName: 'naveen.xyz.io.'
});

new gcp.dns.RecordSet('naveen', {
    name: pulumi.interpolate `naveen.${prod.dnsName}`,
    managedZone: prod.name,
    rrdatas: ['8.8.8.8'],
    ttl: 300,
    type: 'A'
});
c
@gentle-diamond-70147 Thanks, that worked. Appreciate the help!