VMware Cloud Community
Schlass
Contributor
Contributor
Jump to solution

vRA 8.2 add dns server to network via REST

Hi,

is there a way to add a dns server config to a nsx-t deployed network via the rest api? I cannot add our DNS servers manually to all networks that we provision, so I want to automate it. But there is no property I can set or see when I get a network via the rest api.

Best regards

0 Kudos
1 Solution

Accepted Solutions
danielgarner64
Contributor
Contributor
Jump to solution

What do you mean add a DNS server?
Do you mean create a DNS server service or do you mean add a dns server to the DHCP configuration?

Either way the NSX-T REST api can definitely do that.
the documentation for the NSX-T rest API can be found at
https://<yourNsxtbaseUrl>/policy/api.html
Alternatively you can locate the NSX-T documentation under the '?' in the top right of NSX-T (mine is version 3.1).

I'd provide you an example of the Rest call but I'm not sure exactly what you mean by "add a DNS server to a network".


If this is referring to the issue you had in your previous post the solution provided there may assist you:

https://communities.vmware.com/t5/vRealize-Automation-Tools/vRA-8-1-set-dns-server-for-nsx-t-deploye...

Also if you can't update all your blueprints or there is too many.
You could write an ABX action that adds the property to all or select networks during deployment.
The property I'm referring to is:
dnsServers: "8.8.8.8"

View solution in original post

2 Replies
danielgarner64
Contributor
Contributor
Jump to solution

What do you mean add a DNS server?
Do you mean create a DNS server service or do you mean add a dns server to the DHCP configuration?

Either way the NSX-T REST api can definitely do that.
the documentation for the NSX-T rest API can be found at
https://<yourNsxtbaseUrl>/policy/api.html
Alternatively you can locate the NSX-T documentation under the '?' in the top right of NSX-T (mine is version 3.1).

I'd provide you an example of the Rest call but I'm not sure exactly what you mean by "add a DNS server to a network".


If this is referring to the issue you had in your previous post the solution provided there may assist you:

https://communities.vmware.com/t5/vRealize-Automation-Tools/vRA-8-1-set-dns-server-for-nsx-t-deploye...

Also if you can't update all your blueprints or there is too many.
You could write an ABX action that adds the property to all or select networks during deployment.
The property I'm referring to is:
dnsServers: "8.8.8.8"

Schlass
Contributor
Contributor
Jump to solution

I want to add my dns in the property of the network within vRA. Exactly what the dnsServers property in the blueprint does. The ABX Action works for me as I didn't know about the dnsServers property. Thank you for the quick reply and solving my issue 🙂

0 Kudos