Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors creating NsRecord. #243

Closed
oliverholliday opened this issue May 13, 2019 · 2 comments · Fixed by #361
Closed

Errors creating NsRecord. #243

oliverholliday opened this issue May 13, 2019 · 2 comments · Fixed by #361
Assignees

Comments

@oliverholliday
Copy link

When trying to create an NsRecord entry for a DNS Zone in an existing Zone I hit some snags.

// set up
const rootZone = await azure.dns.getZone({
    name: "dev1.test.com",
    resourceGroupName: "Infrastructure"
});

const dnsZone = new azure.dns.Zone("z1-dev1-dns-zone", {
    name: "z1.dev1.test.com",
    resourceGroupName: rootZone.resourceGroupName,
});

The following (and variations) didn't work. Note that I'm using the records field not record yet I receive a verification error for record.

The type definition for NsRecordArgs.records is this, but it doesn't seem to be correct (object expected):

readonly records?: pulumi.Input<pulumi.Input<string>[]>;
// this failed with errors and a deprecation warning:
//    verification warning: "record": [DEPRECATED] This field has been replaced by `records`
//    error [snip] has a problem: record.0: expected object, got string
//    error [snip] has a problem: record.1: expected object, got string
//    error [snip] has a problem: record.2: expected object, got string
//    error [snip] has a problem: record.3: expected object, got string
new azure.dns.NsRecord("z1-dev1-ns-record", {
    name: "z1",
    resourceGroupName: rootZone.resourceGroupName,
    zoneName: rootZone.name,
    records: dnsZone.nameServers,
    ttl: 3600
});

This did work, but it is cumbersome and marked as deprecated:

// this did work but get the deprecation warning : 
// verification warning: "record": [DEPRECATED] This field has been replaced by `records`
new azure.dns.NsRecord("z1-dev1-ns-record", {
    name: "z1",
    resourceGroupName: rootZone.resourceGroupName,
    zoneName: rootZone.name,
    record: pulumi.output(dnsZone.nameServers).apply(x => x.map(y => ({ nsdname: y }))),
    ttl: 3600
});
@mikhailshilkov
Copy link
Member

This issue seems nasty to me: it looks like we pass the value of records to record field at some point. Should we prioritize it? @jen20 @lukehoban

@lukehoban lukehoban assigned mikhailshilkov and unassigned jen20 Sep 9, 2019
@lukehoban
Copy link
Contributor

Should we prioritize it?

Yes - let's make sure we are mapping these fields correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants