splunk / terraform-provider-splunk

Terraform Provider for Splunk
Mozilla Public License 2.0
103 stars 75 forks source link

Using auth_tokento authenticate leads to 'Error: call not properly authenticated' #102

Open kiamco opened 2 years ago

kiamco commented 2 years ago

I have double-checked my token and it is valid. The error seems to be intermittent sometimes it works sometimes it doesn't

my terraform version Terraform v0.13.6

here is what's in my provider.tf file

provider "splunk" {
  url                  = "<companyname>.splunkcloud.com:8089"
  auth_token           = var.token
  insecure_skip_verify = true
}

terraform {
  required_providers {
    splunk = {
      source = "splunk/splunk"
      version = "1.4.10"
    }
  }
}

When running terraform plan I have tried the following, 1.) export TF_VAR_token = mytoken 2.) terraform apply -var-file="secrets.tfvars"

here is the output when running terraform apply

splunk_saved_searches.testing_terraform_alert: Creating...

Error: call not properly authenticated

  on ops_alerts.tf line 1, in resource "splunk_saved_searches" "testing_terraform_alert":
   1: resource "splunk_saved_searches" "testing_terraform_alert" {