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

azurerm_hpc_cache - support for the directory_active_directory, directory_flat_file, directory_ldap blocks #11332

Merged
merged 11 commits into from Apr 27, 2021

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented Apr 15, 2021

This PR add directory settings supports to azurerm_hpc_cache, so that the HPC Cache can use an outside source to authenticate users for accessing back-end storage.

Reference: https://docs.microsoft.com/en-us/azure/hpc-cache/directory-services

Test Result

LDAP and Flat File

💢 TF_ACC=1 go test ./azurerm/internal/services/hpccache -v -run="TestAccHPCCache_directory" -timeout=2h
2021/04/14 22:53:18 [DEBUG] not using binary driver name, it's no longer needed
2021/04/14 22:53:18 [DEBUG] not using binary driver name, it's no longer needed
=== RUN   TestAccHPCCache_directoryAD
    hpc_cache_resource_test.go:246: Skip since env var "ARM_TEST_HPC_AD_SUBNET_ID" is not set
--- SKIP: TestAccHPCCache_directoryAD (0.00s)
=== RUN   TestAccHPCCache_directoryLDAP
=== PAUSE TestAccHPCCache_directoryLDAP
=== RUN   TestAccHPCCache_directoryFlatFile
=== PAUSE TestAccHPCCache_directoryFlatFile
=== CONT  TestAccHPCCache_directoryLDAP
=== CONT  TestAccHPCCache_directoryFlatFile
--- PASS: TestAccHPCCache_directoryFlatFile (3017.04s)
--- PASS: TestAccHPCCache_directoryLDAP (3120.73s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hpccache    3120.887s

AD

Note that the AD testing is skipped by default, unless the required environments are provided. This is because it is very complicated to setup an AD server automatically, instead we setup it prior to test and pass in the required settings via env var to the testing so that the HPC Cache can be created and connect to that AD server.

💤 TF_ACC=1 go test ./azurerm/internal/services/hpccache -v -run="TestAccHPCCache_directoryAD" -timeout=2h
2021/04/15 09:24:39 [DEBUG] not using binary driver name, it's no longer needed
2021/04/15 09:24:39 [DEBUG] not using binary driver name, it's no longer needed
=== RUN   TestAccHPCCache_directoryAD
=== PAUSE TestAccHPCCache_directoryAD
=== CONT  TestAccHPCCache_directoryAD
--- PASS: TestAccHPCCache_directoryAD (2041.53s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hpccache    2041.668s

```
💤 TF_ACC=1 go test ./azurerm/internal/services/hpccache -v -run="TestAccHPCCache_directory" -timeout=2h
2021/04/13 21:58:10 [DEBUG] not using binary driver name, it's no longer needed
2021/04/13 21:58:10 [DEBUG] not using binary driver name, it's no longer needed
=== RUN   TestAccHPCCache_directoryLDAP
=== PAUSE TestAccHPCCache_directoryLDAP
=== RUN   TestAccHPCCache_directoryFlatFile
=== PAUSE TestAccHPCCache_directoryFlatFile
=== CONT  TestAccHPCCache_directoryLDAP
=== CONT  TestAccHPCCache_directoryFlatFile
--- PASS: TestAccHPCCache_directoryLDAP (1935.47s)
--- PASS: TestAccHPCCache_directoryFlatFile (3257.25s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hpccache    (cached)
```
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.

Thanks @magodo - given this an initial review with comments left inline

website/docs/r/hpc_cache.html.markdown Outdated Show resolved Hide resolved
website/docs/r/hpc_cache.html.markdown Outdated Show resolved Hide resolved
website/docs/r/hpc_cache.html.markdown Outdated Show resolved Hide resolved
website/docs/r/hpc_cache.html.markdown Outdated Show resolved Hide resolved
website/docs/r/hpc_cache.html.markdown Outdated Show resolved Hide resolved
website/docs/r/hpc_cache.html.markdown Outdated Show resolved Hide resolved
website/docs/r/hpc_cache.html.markdown Outdated Show resolved Hide resolved
website/docs/r/hpc_cache.html.markdown Outdated Show resolved Hide resolved
@magodo
Copy link
Collaborator Author

magodo commented Apr 19, 2021

@katbyte Thank you for the review! I've modified the property names per your request. Please take another look!

@magodo magodo requested a review from katbyte April 20, 2021 09:18
@katbyte katbyte added this to the v2.57.0 milestone Apr 27, 2021
@katbyte katbyte changed the title azurerm_hpc_cache - support for kinds of directory settings azurerm_hpc_cache - support for the directory_active_directory, directory_flat_file, directory_ldap blocks Apr 27, 2021
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.

Thanks @magodo - this LGTM 🚀

@katbyte katbyte merged commit d39e44e into hashicorp:master Apr 27, 2021
katbyte added a commit that referenced this pull request Apr 27, 2021
@ghost
Copy link

ghost commented Apr 30, 2021

This has been released in version 2.57.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 = "~> 2.57.0"
}
# ... other configuration ...

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2021
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