add AWSClient methods to get s3 and dyndb conns

Add getters for the AWSClient s3.S3 and dynamodb.DynamoDB clients so the
s3 remote-state backend can use all the same initialization code as the
aws provider.
This commit is contained in:
James Bardin 2017-04-05 12:29:25 -04:00
parent eeddc3f8ea
commit 0ec2a5cfd3
1 changed files with 8 additions and 0 deletions

View File

@ -160,6 +160,14 @@ type AWSClient struct {
wafconn *waf.WAF wafconn *waf.WAF
} }
func (c *AWSClient) S3() *s3.S3 {
return c.s3conn
}
func (c *AWSClient) DynamoDB() *dynamodb.DynamoDB {
return c.dynamodbconn
}
// Client configures and returns a fully initialized AWSClient // Client configures and returns a fully initialized AWSClient
func (c *Config) Client() (interface{}, error) { func (c *Config) Client() (interface{}, error) {
// Get the auth and region. This can fail if keys/regions were not // Get the auth and region. This can fail if keys/regions were not