Skip to content

Commit aa0f407

Browse files
byt3bl33d3rn3integration
authored andcommitted
Changed environment variables to match TF ACME provider (#16)
* Changed env variables to match acme provider * Bumped version to 1.5.0 in install.sh
1 parent c9a3c1c commit aa0f407

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ bash <(curl -s https://raw.githubusercontent.com/n3integration/terraform-godaddy
2424
In order to leverage the GoDaddy APIs, an [API key](https://developer.godaddy.com/keys/) is required. The key pair can be optionally stored in environment variables.
2525

2626
```bash
27-
export GD_KEY=abc
28-
export GD_SECRET=123
27+
export GODADDY_API_KEY=abc
28+
export GODADDY_API_SECRET=123
2929
```
3030

3131
## Provider
3232

33-
If `key` and `secret` aren't provided under the `godaddy` `provider`, they are expected to be exposed as environment variables: `GD_KEY` and `GD_SECRET`.
33+
If `key` and `secret` aren't provided under the `godaddy` `provider`, they are expected to be exposed as environment variables: `GODADDY_API_KEY` and `GODADDY_API_SECRET`.
3434

3535
```terraform
3636
provider "godaddy" {

client_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
var key, secret, baseURL string
1414

1515
func init() {
16-
key = os.Getenv("GD_KEY")
17-
secret = os.Getenv("GD_SECRET")
16+
key = os.Getenv("GODADDY_API_KEY")
17+
secret = os.Getenv("GODADDY_API_SECRET")
1818
baseURL = "https://api.godaddy.com"
1919
}
2020

install.sh

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

3-
version=1.4.2
3+
version=1.5.0
44

55
os=$(uname -s | tr '[:upper:]' '[:lower:]')
66
mach=$(uname -m)

provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ func Provider() terraform.ResourceProvider {
1212
"key": {
1313
Type: schema.TypeString,
1414
Required: true,
15-
DefaultFunc: schema.EnvDefaultFunc("GD_KEY", nil),
15+
DefaultFunc: schema.EnvDefaultFunc("GODADDY_API_KEY", nil),
1616
Description: "GoDaddy API Key.",
1717
},
1818

1919
"secret": {
2020
Type: schema.TypeString,
2121
Required: true,
22-
DefaultFunc: schema.EnvDefaultFunc("GD_SECRET", nil),
22+
DefaultFunc: schema.EnvDefaultFunc("GODADDY_API_SECRET", nil),
2323
Description: "GoDaddy API Secret.",
2424
},
2525

provider_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ func TestProvider_impl(t *testing.T) {
3030
}
3131

3232
func testAccPreCheck(t *testing.T) {
33-
verifyEnvExists(t, "GD_KEY")
34-
verifyEnvExists(t, "GD_SECRET")
35-
verifyEnvExists(t, "GD_DOMAIN")
33+
verifyEnvExists(t, "GODADDY_API_KEY")
34+
verifyEnvExists(t, "GODADDY_API_SECRET")
35+
verifyEnvExists(t, "GODADDY_DOMAIN")
3636
}
3737

3838
func verifyEnvExists(t *testing.T, key string) {

0 commit comments

Comments
 (0)