Terraform sumologic provider generates "Error 401 Full authentication is required" when trying to create Collector
I have created a Terraform sumologic provider and when I attempt to create a sumologic collector I get:
Error: collector with name my-collector not found: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 401 Full authentication is required to access this resource</title>
</head>
<body><h2>HTTP ERROR 401 Full authentication is required to access this resource</h2>
<table>
<tr><th>URI:</th><td>/api/v1/collectors/name/my-collector</td></tr>
<tr><th>STATUS:</th><td>401</td></tr>
<tr><th>MESSAGE:</th><td>Full authentication is required to access this resource</td></tr>
<tr><th>SERVLET:</th><td>rest</td></tr>
</table>
The provider is set as per TF documentation:
I have come across this... but not sure it is relevant or how to update the provider environment correctly.
Can anyone shed some light on what I'm doing wrong here or have an example using the sumologic provider to create a collector and http source?
Thanks
Mike.
-
There are a few things that could lead to authentication issues that you will want to check.
1.) The user who generated the AccessKey/ID has the permissions to Manage Collectors
2.) The proper deployment for your account is set in the "environment" variable. (us1, us2, au, eu, etc...) us2 is set as an example in the docs. After you login to your account, you can determine the deployment from the URL in your browser.
Ex. https://service.<deployment>.sumologic.com
Note: if you do not see a <deployment> in your URL your account will be in the "us1" deployment.
3.) The accessKey/ID have been entered correctly. (verify you have set your TF environment variables for these)
Please sign in to leave a comment.
Comments
3 comments