mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-09-20 23:06:23 +08:00
Update route53Provider.go (#401)
This commit is contained in:
parent
61281d7046
commit
e616cd7979
|
@ -33,7 +33,7 @@ func newRoute53Dsp(conf map[string]string, metadata json.RawMessage) (providers.
|
||||||
}
|
}
|
||||||
|
|
||||||
func newRoute53(m map[string]string, metadata json.RawMessage) (*route53Provider, error) {
|
func newRoute53(m map[string]string, metadata json.RawMessage) (*route53Provider, error) {
|
||||||
keyID, secretKey := m["KeyId"], m["SecretKey"]
|
keyID, secretKey, tokenID := m["KeyId"], m["SecretKey"], m["Token"]
|
||||||
|
|
||||||
// Route53 uses a global endpoint and route53domains
|
// Route53 uses a global endpoint and route53domains
|
||||||
// currently only has a single regional endpoint in us-east-1
|
// currently only has a single regional endpoint in us-east-1
|
||||||
|
@ -42,8 +42,9 @@ func newRoute53(m map[string]string, metadata json.RawMessage) (*route53Provider
|
||||||
Region: aws.String("us-east-1"),
|
Region: aws.String("us-east-1"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Token is optional and left empty unless required
|
||||||
if keyID != "" || secretKey != "" {
|
if keyID != "" || secretKey != "" {
|
||||||
config.Credentials = credentials.NewStaticCredentials(keyID, secretKey, "")
|
config.Credentials = credentials.NewStaticCredentials(keyID, secretKey, tokenID)
|
||||||
}
|
}
|
||||||
sess := session.New(config)
|
sess := session.New(config)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue