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

Refactoring the Examples folder #3046

Merged
merged 56 commits into from
Mar 17, 2019
Merged

Refactoring the Examples folder #3046

merged 56 commits into from
Mar 17, 2019

Conversation

tombuildsstuff
Copy link
Contributor

This PR refactors the Examples folder in several ways:

  • Examples are now grouped by Resource Type
  • Examples now follow a convention where only the bare minimum of variables are used (generally prefix and location; although alt_location, kubernetes_client_id and kubernetes_client_secret are also used)
  • (Almost) all examples can now be run as Acceptance Tests using this framework (a few which haven't been refactored have a .skip-test file, which means these won't be tested)
  • Removes some examples which no longer make sense (e.g. the Wordpress example's been replaced by a PHP App Service, since this is what the Azure Docs suggest)

Given this is refactoring the folder fairly substantially, I'd suggest it'd probably easiest to view the result in the examples folder in the GitHub UI: https://github.com/terraform-providers/terraform-provider-azurerm/tree/f/examples/examples

It's also possible to run the Acceptance Test for the Examples like so (although getting each example passing is a separate job):

$ TF_EXAMPLE_TEST=1 ARM_TENANT_ID=00000000-0000-0000-0000-000000000000 ARM_SUBSCRIPTION_ID=00000000-0000-0000-0000-000000000000 ARM_ENVIRONMENT=public ARM_LOCATION=westeurope ARM_CLIENT_ID=00000000-0000-0000-0000-000000000000 ARM_CLIENT_SECRET=00000000-0000-0000-0000-000000000000 go test -v ./examples/

@tombuildsstuff tombuildsstuff merged commit 3659795 into master Mar 17, 2019
@tombuildsstuff tombuildsstuff deleted the f/examples branch March 17, 2019 17:55
@ghost
Copy link

ghost commented Apr 17, 2019

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 Apr 17, 2019
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.

None yet

2 participants