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

data.azurerm_synapse_workspace: Add identity attribute #12098

Merged
merged 1 commit into from
Jun 8, 2021

Conversation

kosinsky
Copy link
Contributor

@kosinsky kosinsky commented Jun 7, 2021

Adding identity attribute to the azurerm_synapse_workspace data source. That's useful when Azure Synapse identity needs permissions for multiple storage accounts managed by different Terraform configurations. Currently, Azure Synapse supports only System Assigned identity which is known only after workspace is created.

Usage sample:

# Get reference to the workspace
data "azurerm_synapse_workspace" "ws" {
  name                = "existing"
  resource_group_name = "example-resource-group"
}

# Allow the workspace read from storage accounts
resource "azurerm_role_assignment" "account_readers" {
  for_each             = data.azurerm_storage_account.data
  scope                = each.value.id
  role_definition_name = "Storage Blob Data Reader"
  principal_id         = data.azurerm_synapse_workspace.ws.identity[0].principal_id
}

@ghost ghost added the size/S label Jun 7, 2021
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mbfrahry mbfrahry changed the title Add identity attribute to the azurerm_synapse_workspace data source data.azurerm_synapse_workspace: Add identity attribute Jun 8, 2021
@mbfrahry mbfrahry added this to the v2.63.0 milestone Jun 8, 2021
@mbfrahry mbfrahry merged commit b185222 into hashicorp:master Jun 8, 2021
mbfrahry added a commit that referenced this pull request Jun 8, 2021
@ghost
Copy link

ghost commented Jun 11, 2021

This has been released in version 2.63.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.63.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 Jul 12, 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.

2 participants