HI Stanislav,
Here is my observation:
Case1: When I did not give parent iD:
parented--> i commented and i did not give this then below is the error:
PS I:\Terraform1\hashicorp-certified-terraform-associate-on-azure\test> terraform apply --auto-approve
╷
│ Error: Missing required argument
│
│ on main.tf line 113, in resource "azapi_resource" "symbolicname":
│ 113: resource "azapi_resource" "symbolicname" {
│
│ The argument "parent_id" is required, but no definition was found.
Case2: When I gave parent ID which is subscription id:
│ Error: creating/updating "Resource: (ResourceId "/subscriptions/93048f2d-2d0f-44cc-b12c-4df25a3c5ff5//providers/Microsoft.Maintenance/configurationAssignments/dynamicscope" / Api Version "2023-04-01")": PUT https://management.azure.com/subscriptions/93048f2d-2d0f-44cc-b12c-4df25a3c5ff5//providers/Microsoft.Maintenance/configurationAssignments/dynamicscope
│ --------------------------------------------------------------------------------
│ RESPONSE 400: 400 Bad Request
│ ERROR CODE UNAVAILABLE
│ --------------------------------------------------------------------------------
│ {
│ "Error": {
│ "Code": "BadRequest",
│ "Message": "Invalid scope"
│
Case 3: when I gave only subscription id as below:
│ ERROR CODE: MissingSubscription
│ --------------------------------------------------------------------------------
│ {
│ "error": {
│ "code": "MissingSubscription",
│ "message": "The request did not have a subscription or a valid tenant level resource provider."
│ }
│ }
│ --------------------------------------------------------------------------------
│
│
│ with azapi_resource.symbolicname,
│ on main.tf line 113, in resource "azapi_resource" "symbolicname":
│ 113: resource "azapi_resource" "symbolicname" {
In call above cases I have been using as below for maintenance id and resource id:
maintenanceConfigurationId = "/subscriptions/93048f2d-2d0f-44cc-b12c-4df25a3c5ff5/resourcegroups/rga/providers/microsoft.maintenance/maintenanceconfigurations/mca"
resourceId = "93048f2d-2d0f-44cc-b12c-4df25a3c5ff5"
Now could you please suggest further. what is missing?