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

Add Resource Explorer service client #28084

Merged
merged 18 commits into from
Nov 30, 2022
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
3 changes: 3 additions & 0 deletions .changelog/28084.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:note
provider: With AWS's retirement of EC2-Classic the `skip_get_ec2_platforms` attribute has been deprecated and will be removed in a future version
```
15 changes: 15 additions & 0 deletions .ci/.semgrep-service-name0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3144,3 +3144,18 @@ rules:
- pattern-not-regex: "^TestAccConnect"
- pattern-regex: ^TestAcc.*
severity: WARNING
- id: connect-in-const-name
languages:
- go
message: Do not use "Connect" in const name inside connect package
paths:
include:
- internal/service/connect
patterns:
- pattern: const $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)Connect"
- pattern-not-regex: .*uickConnect.*
severity: WARNING
45 changes: 30 additions & 15 deletions .ci/.semgrep-service-name1.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
# Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT.
rules:
- id: connect-in-const-name
languages:
- go
message: Do not use "Connect" in const name inside connect package
paths:
include:
- internal/service/connect
patterns:
- pattern: const $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)Connect"
- pattern-not-regex: .*uickConnect.*
severity: WARNING
- id: connect-in-var-name
languages:
- go
Expand Down Expand Up @@ -3131,3 +3116,33 @@ rules:
patterns:
- pattern-regex: "(?i)Inspector"
severity: WARNING
- id: inspector2-in-func-name
languages:
- go
message: Do not use "Inspector2" in func name inside inspector2 package
paths:
include:
- internal/service/inspector2
patterns:
- pattern: func $NAME( ... ) { ... }
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)Inspector2"
- pattern-not-regex: ^TestAcc.*
severity: WARNING
- id: inspector2-in-test-name
languages:
- go
message: Include "Inspector2" in test name
paths:
include:
- internal/service/inspector2/*_test.go
patterns:
- pattern: func $NAME( ... ) { ... }
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-not-regex: "^TestAccInspector2"
- pattern-regex: ^TestAcc.*
severity: WARNING
73 changes: 43 additions & 30 deletions .ci/.semgrep-service-name2.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,5 @@
# Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT.
rules:
- id: inspector2-in-func-name
languages:
- go
message: Do not use "Inspector2" in func name inside inspector2 package
paths:
include:
- internal/service/inspector2
patterns:
- pattern: func $NAME( ... ) { ... }
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)Inspector2"
- pattern-not-regex: ^TestAcc.*
severity: WARNING
- id: inspector2-in-test-name
languages:
- go
message: Include "Inspector2" in test name
paths:
include:
- internal/service/inspector2/*_test.go
patterns:
- pattern: func $NAME( ... ) { ... }
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-not-regex: "^TestAccInspector2"
- pattern-regex: ^TestAcc.*
severity: WARNING
- id: inspector2-in-const-name
languages:
- go
Expand Down Expand Up @@ -3128,3 +3098,46 @@ rules:
- pattern-regex: "(?i)Redshift"
- pattern-not-regex: ^TestAcc.*
severity: WARNING
- id: redshift-in-test-name
languages:
- go
message: Include "Redshift" in test name
paths:
include:
- internal/service/redshift/*_test.go
patterns:
- pattern: func $NAME( ... ) { ... }
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-not-regex: "^TestAccRedshift"
- pattern-regex: ^TestAcc.*
severity: WARNING
- id: redshift-in-const-name
languages:
- go
message: Do not use "Redshift" in const name inside redshift package
paths:
include:
- internal/service/redshift
patterns:
- pattern: const $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)Redshift"
severity: WARNING
- id: redshift-in-var-name
languages:
- go
message: Do not use "Redshift" in var name inside redshift package
paths:
include:
- internal/service/redshift
patterns:
- pattern: var $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)Redshift"
severity: WARNING
101 changes: 58 additions & 43 deletions .ci/.semgrep-service-name3.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,5 @@
# Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT.
rules:
- id: redshift-in-test-name
languages:
- go
message: Include "Redshift" in test name
paths:
include:
- internal/service/redshift/*_test.go
patterns:
- pattern: func $NAME( ... ) { ... }
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-not-regex: "^TestAccRedshift"
- pattern-regex: ^TestAcc.*
severity: WARNING
- id: redshift-in-const-name
languages:
- go
message: Do not use "Redshift" in const name inside redshift package
paths:
include:
- internal/service/redshift
patterns:
- pattern: const $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)Redshift"
severity: WARNING
- id: redshift-in-var-name
languages:
- go
message: Do not use "Redshift" in var name inside redshift package
paths:
include:
- internal/service/redshift
patterns:
- pattern: var $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)Redshift"
severity: WARNING
- id: redshiftdata-in-func-name
languages:
- go
Expand Down Expand Up @@ -202,6 +159,64 @@ rules:
patterns:
- pattern-regex: "(?i)RedshiftServerless"
severity: WARNING
- id: resourceexplorer2-in-func-name
languages:
- go
message: Do not use "ResourceExplorer2" in func name inside resourceexplorer2 package
paths:
include:
- internal/service/resourceexplorer2
patterns:
- pattern: func $NAME( ... ) { ... }
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)ResourceExplorer2"
- pattern-not-regex: ^TestAcc.*
severity: WARNING
- id: resourceexplorer2-in-test-name
languages:
- go
message: Include "ResourceExplorer2" in test name
paths:
include:
- internal/service/resourceexplorer2/*_test.go
patterns:
- pattern: func $NAME( ... ) { ... }
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-not-regex: "^TestAccResourceExplorer2"
- pattern-regex: ^TestAcc.*
severity: WARNING
- id: resourceexplorer2-in-const-name
languages:
- go
message: Do not use "ResourceExplorer2" in const name inside resourceexplorer2 package
paths:
include:
- internal/service/resourceexplorer2
patterns:
- pattern: const $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)ResourceExplorer2"
severity: WARNING
- id: resourceexplorer2-in-var-name
languages:
- go
message: Do not use "ResourceExplorer2" in var name inside resourceexplorer2 package
paths:
include:
- internal/service/resourceexplorer2
patterns:
- pattern: var $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)ResourceExplorer2"
severity: WARNING
- id: resourcegroups-in-func-name
languages:
- go
Expand Down
2 changes: 2 additions & 0 deletions .github/labeler-issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,8 @@ service/rekognition:
- '((\*|-)\s*`?|(data|resource)\s+"?)aws_rekognition_'
service/resiliencehub:
- '((\*|-)\s*`?|(data|resource)\s+"?)aws_resiliencehub_'
service/resourceexplorer2:
- '((\*|-)\s*`?|(data|resource)\s+"?)aws_resourceexplorer2_'
service/resourcegroups:
- '((\*|-)\s*`?|(data|resource)\s+"?)aws_resourcegroups_'
service/resourcegroupstaggingapi:
Expand Down
3 changes: 3 additions & 0 deletions .github/labeler-pr-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,9 @@ service/rekognition:
service/resiliencehub:
- 'internal/service/resiliencehub/**/*'
- 'website/**/resiliencehub_*'
service/resourceexplorer2:
- 'internal/service/resourceexplorer2/**/*'
- 'website/**/resourceexplorer2_*'
service/resourcegroups:
- 'internal/service/resourcegroups/**/*'
- 'website/**/resourcegroups_*'
Expand Down
1 change: 1 addition & 0 deletions .teamcity/components/generated/services_all.kt
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ val services = mapOf(
"redshift" to ServiceSpec("Redshift", vpcLock = true),
"redshiftdata" to ServiceSpec("Redshift Data"),
"redshiftserverless" to ServiceSpec("Redshift Serverless"),
"resourceexplorer2" to ServiceSpec("Resource Explorer"),
"resourcegroups" to ServiceSpec("Resource Groups"),
"resourcegroupstaggingapi" to ServiceSpec("Resource Groups Tagging"),
"rolesanywhere" to ServiceSpec("Roles Anywhere"),
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/kendra v1.36.0
github.com/aws/aws-sdk-go-v2/service/medialive v1.24.2
github.com/aws/aws-sdk-go-v2/service/rds v1.31.0
github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.0.2
github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.0.12
github.com/aws/aws-sdk-go-v2/service/route53domains v1.12.19
github.com/aws/aws-sdk-go-v2/service/s3control v1.26.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ github.com/aws/aws-sdk-go-v2/service/medialive v1.24.2 h1:qQGI444VIllp+BlfPUAEO7
github.com/aws/aws-sdk-go-v2/service/medialive v1.24.2/go.mod h1:ToDxovZoXnH2AbxzTQ26ySXjpmME5gGa7aiH2rnAVv8=
github.com/aws/aws-sdk-go-v2/service/rds v1.31.0 h1:lx8pflhN7oogISvAorwqPGFHN7eiVlGEwk21ThYcyoA=
github.com/aws/aws-sdk-go-v2/service/rds v1.31.0/go.mod h1:wPFe1Cj3nZWmNWKKdkXw961l1dJheTZQ5JjPImqbMuI=
github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.0.2 h1:IirJpFu/wVrDitXuapCp+JqU+tSen1WwtJMvtrVzzyI=
github.com/aws/aws-sdk-go-v2/service/resourceexplorer2 v1.0.2/go.mod h1:24lb9a+B8Ckl81TXecnjnKmgAMOW0Dgn7yLTNDejOgw=
github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.0.12 h1:lP9dP8V4ow1YKEZt/zcPfHu2/lAWGmW1pIzgt2iPGRY=
github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.0.12/go.mod h1:pj8fwktY8PHz60AlgCg/Mwb3nG7JDomW/4eeeud+66w=
github.com/aws/aws-sdk-go-v2/service/route53domains v1.12.19 h1:UNe7/1LUyQ9udyVIdAg++HfuqnBgm3Or8f2nFCfSl0U=
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 @@ -239,6 +239,7 @@ variable "service_labels" {
"redshiftserverless",
"rekognition",
"resiliencehub",
"resourceexplorer2",
"resourcegroups",
"resourcegroupstaggingapi",
"robomaker",
Expand Down
16 changes: 0 additions & 16 deletions internal/conns/awsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ package conns

import (
"fmt"

"github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs"
"github.com/aws/aws-sdk-go-v2/service/rds"
"github.com/aws/aws-sdk-go-v2/service/ssm"
)

// PartitionHostname returns a hostname with the provider domain suffix for the partition
Expand All @@ -21,15 +17,3 @@ func (client *AWSClient) PartitionHostname(prefix string) string {
func (client *AWSClient) RegionalHostname(prefix string) string {
return fmt.Sprintf("%s.%s.%s", prefix, client.Region, client.DNSSuffix)
}

func (client *AWSClient) LogsClient() *cloudwatchlogs.Client {
return client.logsClient.Client()
}

func (client *AWSClient) RDSClient() *rds.Client {
return client.rdsClient.Client()
}

func (client *AWSClient) SSMClient() *ssm.Client {
return client.ssmClient.Client()
}
Loading