mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
ROUTE53: Adopt aws-sdk-go-v2 (#1321)
* Switch to aws-sdk-go-v2 AWS has released v2 of their SDK for Go. See: https://aws.github.io/aws-sdk-go-v2/ One big advantage of this is no longer needing to export the `AWS_SDK_LOAD_CONFIG=1` env var when using named profiles. * Update integration test README * Reenable pager601 and pager1201 integration tests for AWS Route53 * Implement intelligent batching for Route53 record changes The AWS Route53 API for batch record changes limits the request size to the smaller of: - 1000 records. - 32000 characters total for record values. Also UPSERTs count as double (a DELETE and then a CREATE). This commit changes how the record ChangeBatches are created to respect these limits. * Remove old comments Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
@@ -1041,7 +1041,7 @@ func makeTests(t *testing.T) []*TestGroup {
|
||||
//"AZURE_DNS", // Currently failing.
|
||||
"HEXONET",
|
||||
"GCLOUD",
|
||||
//"ROUTE53", // Currently failing. See https://github.com/StackExchange/dnscontrol/issues/908
|
||||
"ROUTE53",
|
||||
),
|
||||
tc("601 records", manyA("rec%04d", "1.2.3.4", 600)...),
|
||||
tc("Update 601 records", manyA("rec%04d", "1.2.3.5", 600)...),
|
||||
@@ -1054,7 +1054,7 @@ func makeTests(t *testing.T) []*TestGroup {
|
||||
//"AZURE_DNS", // Currently failing. See https://github.com/StackExchange/dnscontrol/issues/770
|
||||
"HEXONET",
|
||||
"HOSTINGDE",
|
||||
//"ROUTE53", // Currently failing. See https://github.com/StackExchange/dnscontrol/issues/908
|
||||
"ROUTE53",
|
||||
),
|
||||
tc("1200 records", manyA("rec%04d", "1.2.3.4", 1200)...),
|
||||
tc("Update 1200 records", manyA("rec%04d", "1.2.3.5", 1200)...),
|
||||
|
||||
@@ -12,19 +12,19 @@ For each step, it will run the config once and expect changes. It will run it ag
|
||||
|
||||
## Running a test
|
||||
|
||||
1. Define all environment variables expected for the provider you wish to run. I setup a local `.env` file with the appropriate values and use [zoo](https://github.com/jsonmaur/zoo) to run my commands.
|
||||
2. run `go test -v -provider $NAME` where $NAME is the name of the provider you wish to run.
|
||||
1. Define all environment variables expected for the provider you wish to run. I setup a local `.env` file with the appropriate values and use [zoo](https://github.com/jsonmaur/zoo) to run my commands.
|
||||
2. run `go test -v -provider $NAME` where $NAME is the name of the provider you wish to run.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
$ egrep R53 providers.json
|
||||
"KeyId": "$R53_KEY_ID",
|
||||
"SecretKey": "$R53_KEY",
|
||||
"domain": "$R53_DOMAIN"
|
||||
$ export R53_KEY_ID="redacted"
|
||||
$ export R53_KEY="also redacted"
|
||||
$ export R53_DOMAIN="testdomain.tld"
|
||||
$ egrep ROUTE53 providers.json
|
||||
"KeyId": "$ROUTE53_KEY_ID",
|
||||
"SecretKey": "$ROUTE53_KEY",
|
||||
"domain": "$ROUTE53_DOMAIN"
|
||||
$ export ROUTE53_KEY_ID="redacted"
|
||||
$ export ROUTE53_KEY="also redacted"
|
||||
$ export ROUTE53_DOMAIN="testdomain.tld"
|
||||
$ go test -v -verbose -provider ROUTE53
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user