Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider: Add ecrpublic Service Client #16541

Merged
merged 1 commit into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .hashibot.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ behavior "regexp_issue_labeler_v2" "service_labels" {
"service/ecr" = [
"aws_ecr_",
],
"service/ecrpublic" = [
"aws_ecrpublic_",
],
"service/ecs" = [
"aws_ecs_",
],
Expand Down Expand Up @@ -991,6 +994,11 @@ behavior "pull_request_path_labeler" "service_labels" {
"**/*_ecr_*",
"**/ecr_*"
]
"service/ecrpublic" = [
"aws/internal/service/ecrpublic/**/*",
"**/*_ecrpublic_*",
"**/ecrpublic_*"
]
"service/ecs" = [
"aws/internal/service/ecs/**/*",
"**/*_ecs_*",
Expand Down
3 changes: 3 additions & 0 deletions aws/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import (
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/ecr"
"github.com/aws/aws-sdk-go/service/ecrpublic"
"github.com/aws/aws-sdk-go/service/ecs"
"github.com/aws/aws-sdk-go/service/efs"
"github.com/aws/aws-sdk-go/service/eks"
Expand Down Expand Up @@ -253,6 +254,7 @@ type AWSClient struct {
dynamodbconn *dynamodb.DynamoDB
ec2conn *ec2.EC2
ecrconn *ecr.ECR
ecrpublicconn *ecrpublic.ECRPublic
ecsconn *ecs.ECS
efsconn *efs.EFS
eksconn *eks.EKS
Expand Down Expand Up @@ -491,6 +493,7 @@ func (c *Config) Client() (interface{}, error) {
dynamodbconn: dynamodb.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["dynamodb"])})),
ec2conn: ec2.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["ec2"])})),
ecrconn: ecr.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["ecr"])})),
ecrpublicconn: ecrpublic.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["ecrpublic"])})),
ecsconn: ecs.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["ecs"])})),
efsconn: efs.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["efs"])})),
eksconn: eks.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["eks"])})),
Expand Down
1 change: 1 addition & 0 deletions aws/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,7 @@ func init() {
"dynamodb",
"ec2",
"ecr",
"ecrpublic",
"ecs",
"efs",
"eks",
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 @@ -73,6 +73,7 @@ variable "service_labels" {
"ec2-classic",
"ec2",
"ecr",
"ecrpublic",
"ecs",
"efs",
"eks",
Expand Down
1 change: 1 addition & 0 deletions website/allowed-subcategories.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ DynamoDB Accelerator (DAX)
DynamoDB
EC2
ECR
ECR Public
ECS
EFS
EKS
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 @@ -103,6 +103,7 @@ The Terraform AWS Provider allows the following endpoints to be customized:
<li><code>dynamodb</code></li>
<li><code>ec2</code></li>
<li><code>ecr</code></li>
<li><code>ecrpublic</code></li>
<li><code>ecs</code></li>
<li><code>efs</code></li>
<li><code>eks</code></li>
Expand Down