Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Commit

Permalink
TER-232: Rename server_url to endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
pdecat authored and Shr3ps committed Mar 5, 2018
1 parent 9352995 commit 832cceb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ TF example:

```
provider "ghost" {
user = "admin"
password = "mypass"
server_url = "https://demo.ghost.morea.fr"
user = "admin"
password = "mypass"
endpoint = "https://demo.ghost.morea.fr"
}
resource "ghost_app" "wordpress" {
Expand Down
6 changes: 3 additions & 3 deletions provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ func Provider() terraform.ResourceProvider {
Required: true,
DefaultFunc: schema.EnvDefaultFunc("GHOST_PASSWORD", nil),
},
"server_url": {
"endpoint": {
Type: schema.TypeString,
Required: true,
DefaultFunc: schema.EnvDefaultFunc("GHOST_SERVER_URL", nil),
DefaultFunc: schema.EnvDefaultFunc("GHOST_ENDPOINT", nil),
},
},

Expand All @@ -37,7 +37,7 @@ func Provider() terraform.ResourceProvider {
}

func providerConfigure(data *schema.ResourceData) (interface{}, error) {
config := Config{User: data.Get("user").(string), Password: data.Get("password").(string), URL: data.Get("server_url").(string)}
config := Config{User: data.Get("user").(string), Password: data.Get("password").(string), URL: data.Get("endpoint").(string)}
log.Println("[INFO] Initializing Ghost client")
return config.Client()
}

0 comments on commit 832cceb

Please sign in to comment.