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.61k stars 4.65k forks source link

azurerm_container_app: Support for subPath in volumeMounts #23765

Open Trueber opened 1 year ago

Trueber commented 1 year ago

Is there an existing issue for this?

Community Note

Description

Azure Container Apps does support mounting from a subpath in a volume to a container app, but azurerm_container_app does currently not support this.

(From https://learn.microsoft.com/en-us/azure/templates/microsoft.app/containerapps?pivots=deployment-language-arm-template#resource-format-2):

"volumeMounts": [
  {
    "mountPath": "string",
    "subPath": "string",
    "volumeName": "string"
  }
]```
subPath: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).

### New or Affected Resource(s)/Data Source(s)

azurerm_container_app

### Potential Terraform Configuration

```hcl
resource "azurerm_container_app" "my_container_app" {
  ...
  template {
    volume {
      name         = "vol_name"
      storage_name = "storage_name"
      storage_type = "AzureFile"
    }
    container {
      ...
      volume_mounts {
        name     = "vol_name"
        sub_path = "sub-dir-for-this-container"
        path     = "/mnt/mounted"
      }
    }
  }
}

References

No response

rcskosir commented 1 year ago

Thank you for taking the time to open this feature request!

ossonts commented 4 months ago

Are there any plans for this?

ossonts commented 4 months ago

Any updates on this ?

jakacenta commented 3 months ago

Any update?

pawelfraczyk commented 2 weeks ago

Hello, Would really appreciate for merging this small PR