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

DNS Zone data source can be retrieved by name only. #1180

Merged
merged 7 commits into from
May 19, 2018

Conversation

genevieve
Copy link

  • Use resource group name if provided, otherwise, use findZone.
  • findZone will get the resource groups in your subscription and then
    check the zones in each resource group till it finds the first with
    a matching dns zone name.
  • Could not use the zones client ListComplete api call because
    a Zone does not have any properties related to the Resource Group
    it is a part of. We have to loop over the list of resource groups
    and then their zones so that we can have both the zone and the resource
    group name to return and set on the data source.
  • Docs update.

Fixes #1178.

Genevieve LEsperance added 4 commits April 27, 2018 15:38
- Use resource group name if provided, otherwise, use findZone.
- findZone will get the resource groups in your subscription and then
check the zones in each resource group till it finds the first with
a matching dns zone name.
- Could not use the zones client ListComplete api call because
a Zone does not have any properties related to the Resource Group
it is a part of. We have to loop over the list of resource groups
and then their zones so that we can have both the zone and the resource
group name to return and set on the data source.

Fixes hashicorp#1178.
of retrieving the dns zone (given just a name and no rg name).
- Instead, it sets the id of the data source to an empty string and
returns.
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @genevieve,

Thank you for opening this PR, LGTM aside from one minor nit that I am just going to update myself (wrapping an error)

Also thank you for formatting the other tests! Its appreciated 🙂

@katbyte katbyte force-pushed the dnsdata branch 2 times, most recently from 7ab6577 to 9fab94e Compare May 19, 2018 07:07
@katbyte
Copy link
Collaborator

katbyte commented May 19, 2018

On further inspection wrapping wasn't needed. Merged master and tests pass:
screen shot 2018-05-19 at 00 25 58

@katbyte katbyte merged commit 503001f into hashicorp:master May 19, 2018
katbyte added a commit that referenced this pull request May 19, 2018
@genevieve genevieve deleted the dnsdata branch May 19, 2018 18:37
@katbyte katbyte added this to the 1.6.0 milestone May 25, 2018
@katbyte
Copy link
Collaborator

katbyte commented May 25, 2018

Hey @genevieve ,

Just wanted to let you know we have released v1.6.0 of the provider allowing dns zones to be looked up by name only 🙂

@ghost
Copy link

ghost commented Mar 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using Data DNS Zone to find a zone without knowing it's resource group.
3 participants