replace deprecated function call

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
Tim Ramlot 2024-06-13 20:35:39 +02:00
parent 54413af098
commit 8c6168b40a
No known key found for this signature in database
GPG Key ID: 47428728E0C2878D

View File

@ -38,11 +38,6 @@ func makeRoute53Provider(ts *httptest.Server) (*DNSProvider, error) {
cfg, err := config.LoadDefaultConfig(
context.TODO(),
config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider("abc", "123", " ")),
config.WithEndpointResolverWithOptions(aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...interface{}) (aws.Endpoint, error) {
return aws.Endpoint{
URL: ts.URL,
}, nil
})),
config.WithRegion("mock-region"),
config.WithRetryMaxAttempts(1),
config.WithHTTPClient(ts.Client()),
@ -51,6 +46,8 @@ func makeRoute53Provider(ts *httptest.Server) (*DNSProvider, error) {
return nil, err
}
cfg.BaseEndpoint = aws.String(ts.URL)
client := route53.NewFromConfig(cfg)
return &DNSProvider{client: client, dns01Nameservers: util.RecursiveNameservers}, nil
}