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_machine_learning_datastore_datalake_gen2 store the wrong storage_container_id causing resource to be replaced #21049

Closed
1 task done
gdippolito opened this issue Mar 20, 2023 · 2 comments · Fixed by #23140

Comments

@gdippolito
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.3.7

AzureRM Provider Version

3.48.0

Affected Resource(s)/Data Source(s)

azurerm_machine_learning_datastore_datalake_gen2

Terraform Configuration Files

resource "azurerm_machine_learning_datastore_datalake_gen2" "datastore" {
  name                 = "adls_datastore"
  workspace_id         = azurerm_machine_learning_workspace.workspaces.id
  storage_container_id = data.storage_external_to_resource_group.container_id
}

Debug Output/Panic Output

# azurerm_machine_learning_datastore_datalake_gen2.dataset must be replaced
-/+ resource "azurerm_machine_learning_datastore_datalake_gen2" "dataset" {
      + authority_url         = (known after apply)
      ~ id                    = "/subscriptions/xxxxxxxx/resourceGroups/rg-dev-xxxxxxxx/providers/Microsoft.MachineLearningServices/workspaces/ws-dev-yyyyyyyyy/dataStores/dataset" -> (known after apply)
      ~ is_default            = false -> (known after apply)
        name                  = "dataset"
      ~ storage_container_id  = "/subscriptions/xxxxxxxxx/resourceGroups/rg-dev-xxxxxxxx/providers/Microsoft.Storage/storageAccounts/xxxxxxxxx/blobServices/default/containers/dataset" -> "/subscriptions/xxxxxxxx/resourceGroups/rg-dev-yyyyyyyy/providers/Microsoft.Storage/storageAccounts/yyyyyyyyy/blobServices/default/containers/dataset" # forces replacement
      - tags                  = {} -> null
        # (2 unchanged attributes hidden)
    }


### Expected Behaviour

the correct storage container id is saved in the state

### Actual Behaviour

The wrong storage container id (it contains the resource group identifier of the resoruce group where AzureML is deployed). 

### Steps to Reproduce

_No response_

### Important Factoids

_No response_

### References

_No response_
@gdippolito gdippolito added the bug label Mar 20, 2023
@github-actions github-actions bot removed the bug label Mar 20, 2023
@xuzhang3
Copy link
Contributor

@gdippolito I cannot reproduce this error. workspace and storage container can be in the same resource or not. The key info used in the storage container ID is the storage account name and the container name.

Copy link

github-actions bot commented May 7, 2024

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 have found a problem that seems similar to this, 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 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants