Skip to content

Commit 7522ff3

Browse files
authored
Remove required in provider schema (#27)
1 parent dc8964a commit 7522ff3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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
Schema: map[string]*schema.Schema{
1515
"url": {
1616
Type: schema.TypeString,
17-
Required: true,
17+
Optional: true,
1818
DefaultFunc: schema.EnvDefaultFunc("ELASTICSEARCH_ENDPOINT", nil),
1919
Description: "The URL for the Elasticsearch instance.",
2020
},
2121
"token": {
2222
Type: schema.TypeString,
23-
Required: true,
2423
Sensitive: true,
24+
Optional: true,
2525
DefaultFunc: schema.EnvDefaultFunc("ELASTICSEARCH_API_KEY", nil),
2626
Description: "The token for API authentication.",
2727
},

website/docs/index.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ export ELASTICSEARCH_API_KEY=token
3939

4040
The following arguments are supported:
4141

42-
* `url` - (Required) Url to the ElasticSsearch API
43-
* `token` - (Required) Authentication token to the ElasticSearch API
42+
* `url` - (Option) Url to the Elasticsearch API. Default is `ELASTICSEARCH_ENDPOINT` environment variable.
43+
* `token` - (Option) Authentication token to the ElasticSearch API. Default is `ELASTICSEARCH_API_KEY` environment variable.
4444
* `insecure` - (Optional) Skip server certification verification

0 commit comments

Comments
 (0)