Pull request 658
Azure Automation Account module for terratest with the following:
(i) terraform example in examples/azure folder (ii) automationaccount.go module in modules/azure folder (iii) unit test in test/azure folder (iv) integration test with example in test/azure folder
NOTE: This PR updates the workflow ci.yml to run tests using the azure +build tag. To validate this PR you must run the ci.yml in this branch as the ci.yml in master will break due to the automation account tests.
This PR adds a new ci workflow ci-automation.yml for the Automation Account tests that uses an azureautomation +build tag. The default ci.yml is updated to run the go linter tests based on the azure build tag:
LINTER:
./bin/golangci-lint run ./test/azure/ --build-tags=azure --timeout 5m0s
TESTS:
go test -tags=azure -v -timeout 90m
The new ci-automation.yml has a build tag of azureuatomation
LINTER:
./bin/golangci-lint run ./test/azure/ --build-tags=azureautomation --timeout 5m0s
TEST:
go test -tags=azureautomation -v -timeout 20m
This example requires a service principal and test certificate in order to run successfully. This is documented in the readme.md for the example:
"In this case for the test example, the test self-signed certificate is base64 encoded and then set on the TF_VAR_automation_run_as_certificate_base64 environment variable. As an alternative, you could read the certificate from Key Vault as described above, which would be the recommended procedure in a production environment."
Fixes #658
[Microsoft CI Bot] TL;DR; success :thumbsup:
You can check the status of the CI Pipeline logs here ; https://github.com/aztfmod/terratest/actions/runs/804759161
[Microsoft CI Bot] TL;DR; success :thumbsup:
You can check the status of the CI Pipeline logs here ; https://github.com/aztfmod/terratest/actions/runs/837150407
[Microsoft CI Bot] TL;DR; success :thumbsup:
You can check the status of the CI Pipeline logs here ; https://github.com/aztfmod/terratest/actions/runs/934339910
[Microsoft CI Bot] TL;DR; success :thumbsup:
You can check the status of the CI Pipeline logs here ; https://github.com/aztfmod/terratest/actions/runs/934393839
CI completed successfully after two additional commits to resolve feedback: https://github.com/aztfmod/terratest/actions/runs/934393839 (running the pipelines in this branch, pull-request-658)
@HadwaAbdelhalem I ran the CI. There are errors for AKS and AvailabilitySet, but not Automation Account: https://github.com/aztfmod/terratest/runs/4051679037?check_suite_focus=true. How should we proceed?
@HadwaAbdelhalem @yorinasub17. Resolved the merge conflict. I think this is ready. Thanks!
@HadwaAbdelhalem @yorinasub17. Just checking if anything else is required? Thanks!
Hi,
looks like goimports should be applied
goimports................................................................Failed
- hook id: goimports
- files were modified by this hook
test/azure/terraform_azure_automationaccount_example_test.go
test/azure/terraform_azure_automationaccount_example_test.go
modules/azure/automationaccount_test.go
modules/azure/resourcegroup.go