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

Support "terraform import" for AD connection #89

Open
mykkry3412 opened this issue Jul 13, 2023 · 2 comments
Open

Support "terraform import" for AD connection #89

mykkry3412 opened this issue Jul 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@mykkry3412
Copy link

I'm encountering exactly the same issue as was described in this thread #88 , in a such contrast that I' trying to import to TF state netapp_gcp_active_directory resource.

Provider version: 23.4.0

Performed steps:

  1. Create the resource in the TF configuration:
resource "netapp-gcp_active_directory" "gcp-active-directory" {
}
  1. Get the UUID of the AD connection to import (e.g. in UI)
  2. Run the import
    terraform import netapp-gcp_active_directory.gcp-active-directory 0921556d-1748-bf4f-5d49-92b7ef40964b

Issue after running terraform import command:

Error: <html><body><h1>403 Forbidden</h1>
│ Request forbidden by administrative rules.
│ </body></html>

Any further plans to add support for this in later provider releases?

@okrause
Copy link
Contributor

okrause commented Jul 13, 2023

I tested it in my environment and can confirm it isn't working.

@wenjun666 I looked at the code. When doing an TF import, we only have UUID but no region for our GET call. That's the reason for the special code here https://github.com/NetApp/terraform-provider-netapp-gcp/blob/36c032d07dcce43815bc0cdbba5f9ce48db20375/gcp/volume.go#L173C1-L173C1.
It handles the case where we only have an UUID but no region. It searches all regions for the UUID to extract the missing required information like region.

I cannot see such code in here:

func (c *Client) listActiveDirectoryForRegion(request listActiveDirectoryRequest) (listActiveDirectoryResult, error) {

@wenjun666 wenjun666 added the bug Something isn't working label Aug 15, 2023
@sandipk47
Copy link

Any plans to get this fixed I am unable to import active directory connection due to the same issue. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants