splunk / terraform-provider-splunk

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

allow-underscore-in-configs-conf-name #116

Closed PetroPliuta closed 2 years ago

PetroPliuta commented 2 years ago

Without this fix, provider does not allow create configuration with underscore in name Example:

resource "splunk_configs_conf" "db_connection" {
  name = "db_connections/terraform-connection" ### this is the issue!
  variables = {
    connection_type : "oracle"
    database : "my-db"
    host : "example.com"
    port : 1521
    identity : "terraform-identity"
    timezone : "Israel"
  }
}

terraform apply on master:

│ Error: invalid value for name (A '/' separated string consisting of {conf_file_name}/{stanza_name} ex. props/custom_stanza)
│
│   with splunk_configs_conf.db_connection,
│   on main.tf line 85, in resource "splunk_configs_conf" "db_connection":
│   85: resource "splunk_configs_conf" "db_connection" {
│

terraform apply on this branch: it works, db_connection created

micahkemp-splunk commented 2 years ago

@PetroPliuta Can you add a test case that would fail if this change was not implemented?

PetroPliuta commented 2 years ago

@micahkemp-splunk , I have modified current test. Is this enough?

micahkemp-splunk commented 2 years ago

I opened https://github.com/splunk/terraform-provider-splunk/pull/119 to fix the lint failure. After it's merged, you'll need to rebase this so it can pass all actions.

micahkemp-splunk commented 2 years ago

119 has been merged, please rebase this PR so the linting task can pass.

PetroPliuta commented 2 years ago

@micahkemp-splunk, it was done