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_container_app_environment - changing the log_analytics_workspace_id property no longer creates a new resource #27794

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ func (r ContainerAppEnvironmentResource) Arguments() map[string]*pluginsdk.Schem
"log_analytics_workspace_id": {
Type: pluginsdk.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: workspaces.ValidateWorkspaceID,
Description: "The ID for the Log Analytics Workspace to link this Container Apps Managed Environment to.",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,19 @@ provider "azurerm" {

%[1]s

resource "azurerm_log_analytics_workspace" "second" {
name = "acctestLAW-second-%[2]d"
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
sku = "PerGB2018"
retention_in_days = 30
}

resource "azurerm_container_app_environment" "test" {
name = "acctest-CAEnv%[2]d"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
log_analytics_workspace_id = azurerm_log_analytics_workspace.test.id
log_analytics_workspace_id = azurerm_log_analytics_workspace.second.id
infrastructure_subnet_id = azurerm_subnet.control.id

internal_load_balancer_enabled = true
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/container_app_environment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The following arguments are supported:

~> **Note:** can only be set to `true` if `infrastructure_subnet_id` is specified.

* `log_analytics_workspace_id` - (Optional) The ID for the Log Analytics Workspace to link this Container Apps Managed Environment to. Changing this forces a new resource to be created.
* `log_analytics_workspace_id` - (Optional) The ID for the Log Analytics Workspace to link this Container Apps Managed Environment to.

* `workload_profile` - (Optional) The profile of the workload to scope the container app execution. A `workload_profile` block as defined below.

Expand Down
Loading