Skip to content

Commit

Permalink
azurerm_container_app_environment - changing the log_analytics_worksp…
Browse files Browse the repository at this point in the history
…ace_id property no longer creates a new resource (#27794)

* azurerm_container_app_environment - changing the log_analytics_workspace_id property no longer creates a new resource

* update resource name

* fix build
  • Loading branch information
katbyte authored Oct 29, 2024
1 parent 252f82b commit bac650b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
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

0 comments on commit bac650b

Please sign in to comment.