Skip to content

splunk_lookup_table_file error when reading state on splunk cloud #204

@aplunk-nydig

Description

@aplunk-nydig

Issue

When executing terraform plan with the splunk_lookup_table_file resource I see the following error:

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: 404 Not Found: Path was not found
│ 
│   with splunk_lookup_table_file.lookup_file,
│   on lookups.tf line 13, in resource "splunk_lookup_table_file" "lookup_file:
│   13: resource "splunk_lookup_table_file" "lookup_file" {
│ 

Debugging Steps

When manually visiting the url in the browser I see a similar error:

https://<my splunk instance>/en-US/splunkd/__raw/services/data/lookup_edit?namespace=search&owner=nobody&lookup_file=lookup.csv&lookup_type=csv

Status code: 403 Forbidden
Response Text:  No path was provided

Workaround

However when I execute the following command in the browser the file is downloaded:

https://<my splunk instance>/en-US/splunkd/__raw/services/data/lookup_edit/lookup_as_file?namespace=search&owner=nobody&lookup_file=lookup.csv&lookup_type=csv

Proposed Fix

For some versions of splunk cloud we need to support lookup_edit/lookup_as_file or some other method of downloading the lookup file for the splunk_lookup_table_file read operations.

Environment Information

Splunk cloud version:

Version:
Experience: Victoria

Terraform version:

terraform --version
Terraform v1.9.8
on darwin_arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions