From 0ec2a5cfd3cc0cfc5cfe8a754faadb15e966a49e Mon Sep 17 00:00:00 2001 From: James Bardin Date: Wed, 5 Apr 2017 12:29:25 -0400 Subject: [PATCH] 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. --- builtin/providers/aws/config.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/builtin/providers/aws/config.go b/builtin/providers/aws/config.go index 1cfda12b74..a65bf93e5b 100644 --- a/builtin/providers/aws/config.go +++ b/builtin/providers/aws/config.go @@ -160,6 +160,14 @@ type AWSClient struct { 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 func (c *Config) Client() (interface{}, error) { // Get the auth and region. This can fail if keys/regions were not