hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.53k stars 4.6k forks source link

azurerm_synapse_workspace deployment breaks in government environment #9225

Closed RobertHutchinsAIS closed 1 year ago

RobertHutchinsAIS commented 3 years ago

Community Note

Terraform (and AzureRM Provider) Version

Affected Resource(s)

Terraform v0.13.5

Terraform Configuration Files

provider "azurerm" {
    environment = "usgovernment"
    subscription_id = var.subscription_id
    client_id       = var.client_id
    client_secret   = var.client_secret
    tenant_id       = var.tenant_id
    features {}
}

// Create Resource Group
resource "azurerm_resource_group" "rgroup" {
  name     = var.resource_group_name
  location = var.location
}

// Create Synapse Workspace
resource "azurerm_synapse_workspace" "synapsew" {
  name                                 = var.synapse_workspace_name
  location                             = "usgovarizona"
  //location                             = azurerm_resource_group.rgroup.location
  resource_group_name                  = azurerm_resource_group.rgroup.name
  storage_data_lake_gen2_filesystem_id = azurerm_storage_data_lake_gen2_filesystem.datalakefiles.id
  sql_administrator_login              = var.secret_value_admin_user
  sql_administrator_login_password     = var.secret_value_admin_password
}

Debug Output

Error: creating Synapse Workspace "syntest01" (Resource Group "rg-datateamtest-01"): synapse.WorkspacesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="UnsupportedRegion" Message="Unsupported Synapse region"

  on main.tf line 127, in resource "azurerm_synapse_workspace" "synapsew":
 127: resource "azurerm_synapse_workspace" "synapsew" {

Expected Behavior

Synapse Workspace created in location usgovarizona

Actual Behavior

Synapse Workspace fails to create in location usgovarizona

Steps to Reproduce

  1. terraform apply

Important Factoids

This behavior is happening in a US Gov environment.

References

njuCZ commented 3 years ago

@RobertHutchinsAIS just as the error message says, Synapse service is not supported in "usgovernment" environment. For more information in this environment, you could fire an Azure support ticket

RobertHutchinsAIS commented 3 years ago

@njuCZ I've manually created a Synapse workspace through the portal in a usgovernment environment. It also says here (https://status.azure.com/status) that Synapse service is supported and available in usgovernment. This is why I'm confused as to why it isn't working through Terraform.

njuCZ commented 3 years ago

@RobertHutchinsAIS sorry for late reply. First, the Synapse Analytics service (formerly SQL DW) and Synapse Workspaces are different service. After consulting the service team, they say usgovernment environment is not supported for Synapse Workspaces. So is it Synapse Analytics service (formerly SQL DW) that you created in the portal?

rcskosir commented 1 year ago

Thanks for opening this issue. This was a problem in the 2.x version of the provider which is no longer actively maintained. If this is still an issue with the 3.x version of the provider please do let us know by opening a new issue, thanks!

github-actions[bot] commented 4 months ago

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.