Unable to provision folder in "Admin recommended" section using terraform provider
Hi,
I am trying to provision a folder in the "Admin Recommended" Section of sumologic. I am using content administrator level CLI credentials, but when I provision a folder using this block
resource "sumologic_folder" "terraform_test_folder" {
description = "Folder for terraform provisioned folders"
name = "Managed by Terraform"
parent_id = local.admin_view_folder_ids.admin_root
}
But when I run apply, I am getting a 404 NOT FOUND.
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404 Not Found</h2>
<table>
<tr><th>URI:</th><td>/v2/content/folders</td></tr>
<tr><th>STATUS:</th><td>404</td></tr>
<tr><th>MESSAGE:</th><td>Not Found</td></tr>
<tr><th>SERVLET:</th><td>default</td></tr>
</table>
<script src="/7c802a39adede07fa9309edd0ab49722c395d470aef3f3d493e939b5c2f4dc18/ns.js"></script></body>
</html>
I was able to successfully create the folder in the admin recommended section using the sumologic API using this curl command.
curl -sSu "<access_id>:<access_key>" -X POST "https://api.us2.sumologic.com/api/v2/content/folders" --header "Content-Type: application/json" --header "isAdminMode: true" -d '{"name": "Managed By terraform sample folder", "description": "This is a sample folder.","parentId": "<parent_id>"}'
Does sumologic recommend any patterns when it comes to provisioning resources in the adminMode? I am unable to find any documentation on it.
Please sign in to leave a comment.
Comments
0 comments