Skip to content

Commit 893fb59

Browse files
authored
change env variables name to ELASTICSEARCH (#5)
1 parent c42d1ea commit 893fb59

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

provider/provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ func Provider() *schema.Provider {
1414
"url": {
1515
Type: schema.TypeString,
1616
Required: true,
17-
DefaultFunc: schema.EnvDefaultFunc("ELKALIASES_URL", nil),
17+
DefaultFunc: schema.EnvDefaultFunc("ELASTICSEARCH_ENDPOINT", nil),
1818
Description: "The URL for the Elasticsearch instance.",
1919
},
2020
"token": {
2121
Type: schema.TypeString,
2222
Required: true,
2323
Sensitive: true,
24-
DefaultFunc: schema.EnvDefaultFunc("ELKALIASES_TOKEN", nil),
24+
DefaultFunc: schema.EnvDefaultFunc("ELASTICSEARCH_API_KEY", nil),
2525
Description: "The token for API authentication.",
2626
},
2727
},

provider/resource_elkaliases_index_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ func TestAccElkaliasesIndex_invalid(t *testing.T) {
251251
}
252252

253253
func testAccPreCheck(t *testing.T) {
254-
if v := os.Getenv("ELKALIASES_URL"); v == "" {
254+
if v := os.Getenv("ELASTICSEARCH_ENDPOINT"); v == "" {
255255
t.Fatal("ELKALIASES_URL must be set for acceptance tests")
256256
}
257-
if v := os.Getenv("ELKALIASES_TOKEN"); v == "" {
257+
if v := os.Getenv("ELASTICSEARCH_API_KEY"); v == "" {
258258
t.Fatal("ELKALIASES_TOKEN must be set for acceptance tests")
259259
}
260260
}

test/testacc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
docker compose -f test/docker-compose.yml up -d --wait
4-
TF_ACC=1 ELKALIASES_URL=http://localhost:9200 ELKALIASES_TOKEN=empty go test ./provider -v
4+
TF_ACC=1 ELASTICSEARCH_ENDPOINT=http://localhost:9200 ELASTICSEARCH_API_KEY=empty go test ./provider -v
55
ret=$(echo $?)
66
docker compose -f test/docker-compose.yml down
77

0 commit comments

Comments
 (0)