From c37128ce21e1973da785ea102481c994d541cdcf Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 2 Dec 2020 10:08:13 -0500 Subject: [PATCH] provider: Add ecrpublic Service Client Reference: https://github.com/hashicorp/terraform-provider-aws/blob/master/docs/contributing/contribution-checklists.md#new-service Reference: https://github.com/hashicorp/terraform-provider-aws/issues/16537 Reference: https://github.com/hashicorp/terraform-provider-aws/issues/16538 Reference: https://github.com/hashicorp/terraform-provider-aws/issues/16540 --- .hashibot.hcl | 8 ++++++++ aws/config.go | 3 +++ aws/provider.go | 1 + infrastructure/repository/labels-service.tf | 1 + website/allowed-subcategories.txt | 1 + website/docs/guides/custom-service-endpoints.html.md | 1 + 6 files changed, 15 insertions(+) diff --git a/.hashibot.hcl b/.hashibot.hcl index cc7d1934337..d1bf0656740 100644 --- a/.hashibot.hcl +++ b/.hashibot.hcl @@ -273,6 +273,9 @@ behavior "regexp_issue_labeler_v2" "service_labels" { "service/ecr" = [ "aws_ecr_", ], + "service/ecrpublic" = [ + "aws_ecrpublic_", + ], "service/ecs" = [ "aws_ecs_", ], @@ -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_*", diff --git a/aws/config.go b/aws/config.go index de34dcd6e08..433c2bc8e0b 100644 --- a/aws/config.go +++ b/aws/config.go @@ -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" @@ -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 @@ -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"])})), diff --git a/aws/provider.go b/aws/provider.go index 42486605a7e..062c7ea96d9 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -1167,6 +1167,7 @@ func init() { "dynamodb", "ec2", "ecr", + "ecrpublic", "ecs", "efs", "eks", diff --git a/infrastructure/repository/labels-service.tf b/infrastructure/repository/labels-service.tf index 22903425411..b525fc0fe4a 100644 --- a/infrastructure/repository/labels-service.tf +++ b/infrastructure/repository/labels-service.tf @@ -73,6 +73,7 @@ variable "service_labels" { "ec2-classic", "ec2", "ecr", + "ecrpublic", "ecs", "efs", "eks", diff --git a/website/allowed-subcategories.txt b/website/allowed-subcategories.txt index 9b3f26a6578..e80eb37e243 100644 --- a/website/allowed-subcategories.txt +++ b/website/allowed-subcategories.txt @@ -41,6 +41,7 @@ DynamoDB Accelerator (DAX) DynamoDB EC2 ECR +ECR Public ECS EFS EKS diff --git a/website/docs/guides/custom-service-endpoints.html.md b/website/docs/guides/custom-service-endpoints.html.md index 2161f25d230..6318cc6f40c 100644 --- a/website/docs/guides/custom-service-endpoints.html.md +++ b/website/docs/guides/custom-service-endpoints.html.md @@ -103,6 +103,7 @@ The Terraform AWS Provider allows the following endpoints to be customized:
  • dynamodb
  • ec2
  • ecr
  • +
  • ecrpublic
  • ecs
  • efs
  • eks