You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
newrelic_api_access_key.newrelic_aws_access_key: Creating...
╷
│ Error: json: cannot unmarshal object into Go struct field .data.apiAccessCreateKeys.errors of type apiaccess.APIAccessKeyErrorInterface
│
│ with newrelic_api_access_key.newrelic_aws_access_key,
│ on cloud-integrations-aws.tf line 100, in resource "newrelic_api_access_key" "newrelic_aws_access_key":
│ 100: resource "newrelic_api_access_key" "newrelic_aws_access_key" {
│
Expected behaviour
Error message telling me I don't have the right permissions
API Traffic
Request
{
"query": "mutation($keys: ApiAccessCreateInput!) {\n\t\t\tapiAccessCreateKeys(keys: $keys) {createdKeys {\n\t\tid\n\t\tkey\n\t\tname\n\t\tnotes\n\t\ttype\n\t\t... on ApiAccessIngestKey {\n\t\t\tid\n\t\t\tname\n\t\t\taccountId\n\t\t\tingestType\n\t\t\tkey\n\t\t\tnotes\n\t\t\ttype\n\t\t}\n\t\t... on ApiAccessUserKey {\n\t\t\tid\n\t\t\tname\n\t\t\taccountId\n\t\t\tkey\n\t\t\tnotes\n\t\t\ttype\n\t\t\tuserId\n\t\t}\n\t\t... on ApiAccessKey {\n\t\t\tid\n\t\t\tname\n\t\t\tkey\n\t\t\tnotes\n\t\t\ttype\n\t\t}}errors {\n\t\t message\n\t\t type\n\t\t... on ApiAccessIngestKeyError {\n\t\t\tid\n\t\t\tingestErrorType: errorType\n\t\t\taccountId\n\t\t\tingestType\n\t\t\tmessage\n\t\t\ttype\n\t\t }\n\t\t... on ApiAccessKeyError {\n\t\t\tmessage\n\t\t\ttype\n\t\t }\n\t\t... on ApiAccessUserKeyError {\n\t\t\tid\n\t\t\taccountId\n\t\t\tuserErrorType: errorType\n\t\t\tmessage\n\t\t\ttype\n\t\t\tuserId\n\t\t }\n\t\t}\n\t\n\t\t}}",
"variables": {
"keys": {
"ingest": [{
"accountId": 1234567,
"ingestType": "LICENSE",
"name": "Ingest License key for Production",
"notes": "AWS Cloud Integrations Firehost Key"
}]
}
}
}
Response
{
"data": {
"apiAccessCreateKeys": {
"createdKeys": null,
"errors": [{
"accountId": 1234567,
"id": null,
"ingestErrorType": "FORBIDDEN",
"ingestType": "LICENSE",
"message": "You do not have permission to create this key.",
"type": "INGEST"
}]
}
}
}
The text was updated successfully, but these errors were encountered:
kidk
changed the title
Unmarshal when using newrelic_api_access_key but not having right permissions
Unmarshal error when using newrelic_api_access_key but not having right permissions to create key
Feb 27, 2023
HCL
Output
Expected behaviour
Error message telling me I don't have the right permissions
API Traffic
Request
Response
The text was updated successfully, but these errors were encountered: