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_network_connection_monitor - update validation for target_resource_type and target_resource_id #25745

Merged
merged 7 commits into from
Apr 26, 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 @@ -12,6 +12,7 @@ import (
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machines"
"github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/connectionmonitors"
"github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkwatchers"
"github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces"
Expand Down Expand Up @@ -175,13 +176,15 @@ func resourceNetworkConnectionMonitorSchema() map[string]*pluginsdk.Schema {
workspaces.ValidateWorkspaceID,
commonids.ValidateSubnetID,
commonids.ValidateVirtualNetworkID,
machines.ValidateMachineID,
),
},

"target_resource_type": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{
string(connectionmonitors.EndpointTypeAzureArcVM),
jackofallops marked this conversation as resolved.
Show resolved Hide resolved
string(connectionmonitors.EndpointTypeAzureSubnet),
string(connectionmonitors.EndpointTypeAzureVM),
string(connectionmonitors.EndpointTypeAzureVNet),
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/network_connection_monitor.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ A `endpoint` block supports the following:

* `filter` - (Optional) A `filter` block as defined below.

* `target_resource_type` - (Optional) The endpoint type of the Network Connection Monitor. Possible values are `AzureSubnet`, `AzureVM`, `AzureVNet`, `ExternalAddress`, `MMAWorkspaceMachine` and `MMAWorkspaceNetwork`.
* `target_resource_type` - (Optional) The endpoint type of the Network Connection Monitor. Possible values are `AzureArcVM`, `AzureSubnet`, `AzureVM`, `AzureVNet`, `ExternalAddress`, `MMAWorkspaceMachine` and `MMAWorkspaceNetwork`.

---

Expand Down
Loading