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

service/automation : Status=404 Code="ParentResourceNotFound" Message="Can not perform requested operation on nested resource #7809

Closed
az-cloud opened this issue Jul 20, 2020 · 2 comments · Fixed by #7824

Comments

@az-cloud
Copy link

az-cloud commented Jul 20, 2020

Hi Team,

while creating runbook getting the below error.

  1. iam importing exisintg automation account : postgresqlautomation (created using runasaccount)
  2. while supplying automation_account_name parameter, tried with and without interpolation
  3. tried using supplying publish content and without it
data "azurerm_automation_account" "v100_automation" {
  name                = "postgresqlautomation"
  resource_group_name = "dbautomation"
}

resource "azurerm_automation_runbook" "psql_runbook_scaleup" {
  name                    = var.psql_runbook_scaleup
  location                = var.location
  resource_group_name     = azurerm_resource_group.v100rg.name
  automation_account_name = "${data.azurerm_automation_account.v100_automation.name}"
  log_verbose             = "true"
  log_progress            = "true"
  description             = "postgresql Vcore scaleup runbook"
  runbook_type            = "PowerShellWorkflow"

  publish_content_link {
    uri = ""
  }
}

Error

Error: Error creating/updating Automation Runbook "psqlscaleup" (Account "postgresqlautomation" / Resource Group "v100rg"): automation.RunbookClient#CreateOrUpdate: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ParentResourceNotFound" Message="Can not perform requested operation on nested resource. Parent resource 'postgresqlautomation' not found."

  on main.tf line 20, in resource "azurerm_automation_runbook" "psql_runbook_scaleup":
  20: resource "azurerm_automation_runbook" "psql_runbook_scaleup" {
@katbyte katbyte added the bug label Jul 24, 2020
@katbyte katbyte added this to the v2.21.0 milestone Jul 24, 2020
katbyte pushed a commit that referenced this issue Jul 24, 2020
fixes #7809

--- PASS: TestAccAzureRMAutomationRunbook_PSWithContent (139.64s)
--- PASS: TestAccAzureRMAutomationRunbook_PSWorkflowWithHash (139.87s)
--- PASS: TestAccAzureRMAutomationRunbook_PSWorkflow (140.07s)
--- PASS: TestAccAzureRMAutomationRunbook_PSWorkflowWithoutUri (140.27s)
--- PASS: TestAccAzureRMAutomationRunbook_requiresImport (148.20s)
PASS
@ghost
Copy link

ghost commented Jul 31, 2020

This has been released in version 2.21.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.21.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Aug 23, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Aug 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants