Skip to content

Commit

Permalink
New Service Client: s3outposts
Browse files Browse the repository at this point in the history
Reference: #15412
Reference: #15417

Also prepares the repository for `aws_s3control_*` resources, which will be included with the S3 on Outposts functionality.

Output from acceptance testing:

```
--- PASS: TestAccAWSProvider_Endpoints (5.73s)
```
  • Loading branch information
bflad committed Oct 3, 2020
1 parent 9c4d331 commit b75a517
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .hashibot.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,10 @@ behavior "regexp_issue_labeler_v2" "service_labels" {
],
"service/s3control" = [
"aws_s3_account_",
"aws_s3control_",
],
"service/s3outposts" = [
"aws_s3outposts_",
],
"service/sagemaker" = [
"aws_sagemaker_",
Expand Down Expand Up @@ -1334,7 +1338,14 @@ behavior "pull_request_path_labeler" "service_labels" {
"service/s3control" = [
"aws/internal/service/s3control/**/*",
"**/*_s3_account_*",
"**/s3_account_*"
"**/s3_account_*",
"**/*_s3control_*",
"**/s3control_*"
]
"service/s3outposts" = [
"aws/internal/service/s3outposts/**/*",
"**/*_s3outposts_*",
"**/s3outposts_*"
]
"service/sagemaker" = [
"aws/internal/service/sagemaker/**/*",
Expand Down
3 changes: 3 additions & 0 deletions aws/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ import (
"github.com/aws/aws-sdk-go/service/route53resolver"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3control"
"github.com/aws/aws-sdk-go/service/s3outposts"
"github.com/aws/aws-sdk-go/service/sagemaker"
"github.com/aws/aws-sdk-go/service/secretsmanager"
"github.com/aws/aws-sdk-go/service/securityhub"
Expand Down Expand Up @@ -321,6 +322,7 @@ type AWSClient struct {
s3conn *s3.S3
s3connUriCleaningDisabled *s3.S3
s3controlconn *s3control.S3Control
s3outpostsconn *s3outposts.S3Outposts
sagemakerconn *sagemaker.SageMaker
scconn *servicecatalog.ServiceCatalog
sdconn *servicediscovery.ServiceDiscovery
Expand Down Expand Up @@ -549,6 +551,7 @@ func (c *Config) Client() (interface{}, error) {
route53domainsconn: route53domains.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["route53domains"])})),
route53resolverconn: route53resolver.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["route53resolver"])})),
s3controlconn: s3control.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["s3control"])})),
s3outpostsconn: s3outposts.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["s3outposts"])})),
sagemakerconn: sagemaker.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["sagemaker"])})),
scconn: servicecatalog.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["servicecatalog"])})),
sdconn: servicediscovery.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["servicediscovery"])})),
Expand Down
1 change: 1 addition & 0 deletions aws/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,7 @@ func init() {
"route53resolver",
"s3",
"s3control",
"s3outposts",
"sagemaker",
"sdb",
"secretsmanager",
Expand Down
1 change: 1 addition & 0 deletions infrastructure/repository/labels-service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ variable "service_labels" {
"route53resolver",
"s3",
"s3control",
"s3outposts",
"sagemaker",
"savingsplans",
"secretsmanager",
Expand Down
2 changes: 2 additions & 0 deletions website/allowed-subcategories.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ Route53 Domains
Route53 Resolver
Route53
S3
S3 Control
S3 Outposts
SES
SNS
SQS
Expand Down
1 change: 1 addition & 0 deletions website/docs/guides/custom-service-endpoints.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ The Terraform AWS Provider allows the following endpoints to be customized:
<li><code>route53resolver</code></li>
<li><code>s3</code></li>
<li><code>s3control</code></li>
<li><code>s3outposts</code></li>
<li><code>sagemaker</code></li>
<li><code>sdb</code></li>
<li><code>secretsmanager</code></li>
Expand Down

0 comments on commit b75a517

Please sign in to comment.