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

Adding data source 'azurerm_public_ip_prefix' #4340

Merged
merged 3 commits into from
Sep 22, 2019
Merged

Adding data source 'azurerm_public_ip_prefix' #4340

merged 3 commits into from
Sep 22, 2019

Conversation

midacts
Copy link
Contributor

@midacts midacts commented Sep 17, 2019

This PR is in response to #3748.

I still do not fully understand how everything works (although I would like to learn more), but I think this is all that is required to get this data source added and working.

Acceptance Tests

The test runs successfully.
It creates a public_ip_prefix and also creates a data source of that resource that the test verifies against.
image.

Website Documentation

I am pretty sure I got everything correct (but that is one of the main things I am not 100% sure about).

in the Attributes Reference section, I did not add zones as it is specific region only (that is what the resource object says).

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @midacts

Thanks for this PR :)

Taking a look through this mostly LGTM - if we can fix up the minor comments then this should otherwise be good to merge 👍

Thanks!

azurerm/data_source_public_ip_prefix.go Outdated Show resolved Hide resolved
azurerm/data_source_public_ip_prefix.go Outdated Show resolved Hide resolved
azurerm/data_source_public_ip_prefix.go Outdated Show resolved Hide resolved
azurerm/data_source_public_ip_prefix.go Outdated Show resolved Hide resolved
azurerm/data_source_public_ip_prefix.go Outdated Show resolved Hide resolved
@midacts
Copy link
Contributor Author

midacts commented Sep 19, 2019

Thanks for your review and your suggestions.

I will take a look at those and how they work and commit the changes.

@ghost ghost removed the waiting-response label Sep 19, 2019
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @midacts

Thanks for pushing those changes - taking a look through aside from adding this to the sidebar this otherwise LGTM 👍

Thanks!

website/docs/d/public_ip_prefix.html.markdown Show resolved Hide resolved
@midacts
Copy link
Contributor Author

midacts commented Sep 21, 2019

Good catch. (Thanks for finding these).
Do you know if there is documentation stating what is required for new data sources and resources?
Things like - add to the website markdown, add to the sidebar, make your tests.

Or even tests to verify everything in the repo is compliant with these rules (so it wouldn't have to manually be checked).

@tombuildsstuff
Copy link
Contributor

tombuildsstuff commented Sep 22, 2019

@midacts we've got plans to add some contribution documentation in the near-future (it's being tracked in #2688) - however we've intentionally held off doing this until some code reorg. is done as a part of 2.0 (which we've started working on at the moment) - however once the refactoring is done (and we're able to link to the refactored examples in the codebase) this is something we're definitely interested in adding :)

There is a linter for the other bits - however the Azure Provider diverges from other providers (as an example) as we need to nil-check every field in the response (since Azure may return the representation of a resource at the last time it was modified; rather than how the SDK/API Definition states that it should) - so we need to integrate some Azure specific rules into the Terraform Provider linter the broader Terraform team is working on.

@tombuildsstuff
Copy link
Contributor

tombuildsstuff commented Sep 22, 2019

Test passes:

Screenshot 2019-09-22 at 21 49 45

Thanks again for this @midacts :)

@tombuildsstuff tombuildsstuff merged commit 2d90426 into hashicorp:master Sep 22, 2019
tombuildsstuff added a commit that referenced this pull request Sep 22, 2019
@midacts midacts deleted the data_source_public_ip_prefix branch September 22, 2019 22:32
@midacts
Copy link
Contributor Author

midacts commented Sep 22, 2019

Glad to be able to contribute and learn more about golang, Terraform and the azurerm provider for Terraform.

Thanks for your help.

@ghost
Copy link

ghost commented Oct 4, 2019

This has been released in version 1.35.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.35.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 29, 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 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 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.

2 participants