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_logicapp_app_standard: could not determine storage endpoint suffix for environment "Public" #20531

Closed
1 task done
mudman2k opened this issue Feb 17, 2023 · 7 comments · Fixed by #20536 or #20539
Closed
1 task done

Comments

@mudman2k
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

Terraform v1.3.9

AzureRM Provider Version

3.44.0

Affected Resource(s)/Data Source(s)

azurerm_logicapp_app_standard

Terraform Configuration Files

provider "azuread" {}

### configure the azure provider ###
provider "azurerm" {
  features {}
}

terraform {
  backend "azurerm" {
  }
}

### Use this data source to access the configuration of the AzureRM provider  ###
data "azurerm_client_config" "current" {}

### Reading the existing  Resource group ###
data "azurerm_resource_group" "rg" {
  name = var.resource_group_name
}

### Acquiring Subnet info for Logic App Vnet Interration
data "azurerm_subnet" "pcs_stage_vnet_integration" {
  name                 = var.iaas-subnet
  virtual_network_name = var.iaas-vnet
  resource_group_name  = var.iaas-vnet-rg
}

#Storage account 
data "azurerm_storage_account" "blobstorage-fileshare" {
   name                = var.fileshare_storageaccount_name
   resource_group_name = var.resource_group_name_fileshare
  }

resource "azurerm_storage_account" "function_app_storageaccount" {
  name                     = var.function_app_storageaccount_name
  resource_group_name      = data.azurerm_resource_group.rg.name
  location                 = data.azurerm_resource_group.rg.location
  account_tier             = "Standard"
  allow_nested_items_to_be_public = false
  account_replication_type = "LRS"
}

resource "azurerm_storage_account" "logicapp_standard_storageaccount" {
  name                     = var.logicapp_standard_storageaccount_name
  resource_group_name      = data.azurerm_resource_group.rg.name
  location                 = data.azurerm_resource_group.rg.location
  account_tier             = "Standard"
  allow_nested_items_to_be_public = false
  account_replication_type = "LRS"
}

resource "azurerm_service_plan" "function_app_plan" {
  name                = var.function_app_plan_name
  location            = data.azurerm_resource_group.rg.location
  resource_group_name = data.azurerm_resource_group.rg.name
  os_type             = "Windows"
  sku_name            = "Y1"
  tags                = merge(lookup(data.azurerm_resource_group.rg, "tags", {}), var.custom_tags)
}

resource "azurerm_app_service_plan" "appsrvplan" {
  name                = var.logicapp_standard_plan_name
  location            = data.azurerm_resource_group.rg.location
  resource_group_name = data.azurerm_resource_group.rg.name
  kind                = var.logicapp_standard_plan_kind
  reserved            = var.logicapp_standard_plan_reserved
  tags                = merge(lookup(data.azurerm_resource_group.rg, "tags", {}), var.custom_tags)

  sku {
    tier = var.logicapp_standard_plan_tier
    size = var.logicapp_standard_plan_size
  }
}

resource "azurerm_function_app" "function_app" {
    name                       = var.function-app_name
    location                   = data.azurerm_resource_group.rg.location
    resource_group_name        = data.azurerm_resource_group.rg.name
    app_service_plan_id        = azurerm_service_plan.function_app_plan.id
    storage_account_name       = azurerm_storage_account.function_app_storageaccount.name
    storage_account_access_key = azurerm_storage_account.function_app_storageaccount.primary_access_key
    https_only                 = true
    version                    = "~4"
    app_settings               = {
        AzureFileShareConnectionString  = data.azurerm_storage_account.blobstorage-fileshare.primary_connection_string
        FUNCTIONS_WORKER_RUNTIME        = "dotnet"
        }
  }

resource "azurerm_logic_app_standard" "logicapp_standard" {
  name                       = var.logicapp_standard_name
  location                   = data.azurerm_resource_group.rg.location
  resource_group_name        = data.azurerm_resource_group.rg.name
  app_service_plan_id        = azurerm_app_service_plan.appsrvplan.id
  storage_account_name       = azurerm_storage_account.logicapp_standard_storageaccount.name
  storage_account_access_key = azurerm_storage_account.logicapp_standard_storageaccount.primary_access_key
  https_only                 = true
  version                    = "~4"
  tags                       = merge(lookup(data.azurerm_resource_group.rg, "tags", {}), var.custom_tags)
  lifecycle {
    ignore_changes = [tags,virtual_network_subnet_id]
  }

  identity {
    type = var.identity_type
  }

  app_settings = {
    FUNCTIONS_WORKER_RUNTIME        = "dotnet"
    #FUNCTIONS_EXTENSION_VERSION     = "4.14.0.19631"
    AzureBlob_connectionString      = data.azurerm_storage_account.blobstorage-fileshare.primary_connection_string
    azureFunctionOperation_functionAppKey = ""
    WEBSITE_NODE_DEFAULT_VERSION    = "~12"
    WEBSITE_RUN_FROM_PACKAGE        = "1"
    holiday_url                     = "http://${var.tf_ip_address_vmss}:8082"
    vm_url                          = "http://${var.batchvm}:8080"
    Job_Name                        = "PCS103"
    central_timezone                = "Central Standard Time"

    
  }
  site_config {
    
    always_on                        = false
    dotnet_framework_version         = "v4.0"
    elastic_instance_minimum         = 1
    ftps_state                       = "Disabled"
    http2_enabled                    = false
    min_tls_version                  = "1.2"
    linux_fx_version                 = ""
    pre_warmed_instance_count        = 1
    runtime_scale_monitoring_enabled = false
    use_32_bit_worker_process        = true
    vnet_route_all_enabled           = false
    websockets_enabled               = false
    
  }
}

#### Vnet-Integration to PCS nonprod Subnet
resource "azurerm_app_service_virtual_network_swift_connection" "logicapp-vnet" {
 app_service_id = azurerm_logic_app_standard.logicapp_standard.id
 subnet_id      = data.azurerm_subnet.pcs_stage_vnet_integration.id
}

Debug Output/Panic Output

Error: -17T12:26:11.362Z [ERROR] provider.terraform-provider-azurerm_v3.44.0_x5: Response contains error diagnostic: tf_req_id=b3638dee-c8ff-da29-2292-cce2e4f13434 tf_resource_type=azurerm_logic_app_standard tf_rpc=ApplyResourceChange @module=sdk.proto diagnostic_severity=ERROR tf_proto_version=5.3 diagnostic_summary="could not determine storage endpoint suffix for environment "Public"" tf_provider_addr=provider @caller=github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/diag/diagnostics.go:55 diagnostic_detail= timestamp=2023-02-17T12:26:11.362Z
Error: -17T12:26:11.362Z [ERROR] vertex "azurerm_logic_app_standard.logicapp_standard" error: could not determine storage endpoint suffix for environment "Public"

Expected Behaviour

Logic App should be created

Actual Behaviour

Logic App does not create and throws error:

Error: could not determine storage endpoint suffix for environment "Public"

│ with azurerm_logic_app_standard.logicapp_standard,
│ on main.tf line 90, in resource "azurerm_logic_app_standard" "logicapp_standard":
│ 90: resource "azurerm_logic_app_standard" "logicapp_standard" {

Steps to Reproduce

terraform apply

Important Factoids

No response

References

No response

@mudman2k mudman2k added the bug label Feb 17, 2023
@github-actions github-actions bot removed the bug label Feb 17, 2023
@mudman2k
Copy link
Author

image

@mudman2k
Copy link
Author

Hey @tombuildsstuff, 1st, thanks for responding.

2nd, what am I missing to make the change and resolve the issue?

@mudman2k
Copy link
Author

@tombuildsstuff Ah, you are actively trying to resolve my issue in the backend. Thank you so much. This literally just starting happening with our logic app builds.

@tombuildsstuff
Copy link
Contributor

hey @mudman2k

Thanks for opening this issue.

As you've spotted, I've been taking a look into this regression and have opened #20539 to fix this (which has since been merged), which'll will ship in a patch release (v3.44.1) - apologies for any inconvenience caused, but you should be able to pin to last weeks release (v3.43.0) in the interim.

Thanks!

@mudman2k
Copy link
Author

Thanks @tombuildsstuff The Change worked. I am grateful.

@github-actions
Copy link

This functionality has been released in v3.44.1 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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 Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.