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

The parsed Resource ID was missing a value for the segment at position 6 β”‚ (which should be the literal value "virtualNetworks") #23455

Open
1 task done
hjivani opened this issue Oct 5, 2023 · 0 comments

Comments

@hjivani
Copy link

hjivani commented Oct 5, 2023

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 and review the contribution guide to help.

Terraform Version

1.6.0

AzureRM Provider Version

3.73.0

Affected Resource(s)/Data Source(s)

azurerm_machine_learning_compute_instance

Terraform Configuration Files

# Machine Learning Compute Instances

machine_learning_compute_instances = {

  mlci-cg-scus-ai-poc-dev = {

    name                          = "mlci-cg-scus-ai-poc-dev"

    location                      = "southcentralus"

    machine_learning_workspace_id = "/subscriptions/<ID>/resourceGroups/rgCGscus-AI-POC-Workload/providers/Microsoft.MachineLearningServices/workspaces/MLW-CG-SCUS-AI-POC-DEV"

    virtual_machine_size          = "STANDARD_E4DS_V4"

    local_auth_enabled            = false

    subnet_resource_id = "/subscriptions/<ID>/resourceGroups/commonHoboRG143/providers/Microsoft.Network/virtualNetworks/e8d14060-0cc3-4bdb-adc8-2e863a0655e6-main/subnets/mlci-cg-scus-ai-poc-dev"

    identity = {

      principal_id = "<ID>"

      tenant_id    = "<ID>"

      type         = "SystemAssigned"

    }

  }

}

Debug Output/Panic Output

β•·
β”‚ Error: parsing "/subscriptions/<ID>/resourceGroups/commonHoboRG143/providers/Microsoft.Network/VirtualNetworks/<ID>/subnets/mlci-cg-scus-ai-poc-dev": parsing segment "virtualNetworks": parsing the Subnet ID: the segment at position 6 didn't match
β”‚
β”‚ Expected a Subnet ID that matched:
β”‚
β”‚ > /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworksValue/subnets/subnetValue    
β”‚
β”‚ However this value was provided:
β”‚
β”‚ > /subscriptions/<ID>/resourceGroups/commonHoboRG143/providers/Microsoft.Network/VirtualNetworks/<ID>/subnets/mlci-cg-scus-ai-poc-dev
β”‚
β”‚ The parsed Resource ID was missing a value for the segment at position 6
β”‚ (which should be the literal value "virtualNetworks").
β”‚
β”‚
β”‚
β”‚   with module.azurerm_machine_learning_compute_instance.module.azurerm_machine_learning_compute_instance["mlci-cg-scus-ai-poc-dev"].azurerm_machine_learning_compute_instance.this, 
β”‚   on ..\..\..\Modules\Base\terraform-azurerm_machine_learning_compute_instance\main.tf line 39, in resource "azurerm_machine_learning_compute_instance" "this":
β”‚   39:   subnet_resource_id     = try(var.subnet_resource_id, null)
β”‚

Expected Behaviour

The provider should accept virtualNetwork on the generated resource id.

Actual Behaviour

Terraform used the selected providers to generate the following execution plan. Resource   
actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.azurerm_machine_learning_compute_instance.module.azurerm_machine_learning_compute_instance["mlci-cg-scus-ai-poc-dev"].azurerm_machine_learning_compute_instance.this must be replaced
-/+ resource "azurerm_machine_learning_compute_instance" "this" {
      ~ id                            = "/subscriptions/<ID>/resourceGroups/rgCGscus-AI-POC-Workload/providers/Microsoft.MachineLearningServices/workspaces/MLW-CG-SCUS-AI-POC-DEV/computes/mlci-cg-scus-ai-poc-dev" -> (known after apply)      
        name                          = "mlci-cg-scus-ai-poc-dev"
      - subnet_resource_id            = "/subscriptions/<ID>/resourceGroups/commonHoboRG143/providers/Microsoft.Network/VirtualNetworks/<ID>/subnets/mlci-cg-scus-ai-poc-dev" -> null # forces replacement  
      - tags                          = {} -> null
        # (5 unchanged attributes hidden)

      ~ identity {
          - identity_ids = [] -> null
          ~ principal_id = "<ID>" -> (known after apply)   
          ~ tenant_id    = "<ID>" -> (known after apply)   
            # (1 unchanged attribute hidden)
        }
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@hjivani hjivani changed the title The parsed Resource ID was missing a value for the segment at position 6 β”‚ (which should be the literal value "virtualNetworks") #33982 The parsed Resource ID was missing a value for the segment at position 6 β”‚ (which should be the literal value "virtualNetworks") Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant