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

new resource: aws_ivschat_logging_configuration #27924

Merged
merged 8 commits into from
Nov 22, 2022
Merged
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/27924.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
aws_ivschat_logging_configuration
```
15 changes: 15 additions & 0 deletions .ci/.semgrep-service-name0.yml
Original file line number Diff line number Diff line change
@@ -3129,3 +3129,18 @@ rules:
- pattern-not-regex: .*uickConnect.*
- pattern-not-regex: ^TestAcc.*
severity: WARNING
- id: connect-in-test-name
languages:
- go
message: Include "Connect" in test name
paths:
include:
- internal/service/connect/*_test.go
patterns:
- pattern: func $NAME( ... ) { ... }
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-not-regex: "^TestAccConnect"
- pattern-regex: ^TestAcc.*
severity: WARNING
43 changes: 28 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-test-name
languages:
- go
message: Include "Connect" in test name
paths:
include:
- internal/service/connect/*_test.go
patterns:
- pattern: func $NAME( ... ) { ... }
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-not-regex: "^TestAccConnect"
- pattern-regex: ^TestAcc.*
severity: WARNING
- id: connect-in-const-name
languages:
- go
@@ -3118,3 +3103,31 @@ rules:
- pattern-not-regex: "^TestAccInspector"
- pattern-regex: ^TestAcc.*
severity: WARNING
- id: inspector-in-const-name
languages:
- go
message: Do not use "Inspector" in const name inside inspector package
paths:
include:
- internal/service/inspector
patterns:
- pattern: const $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)Inspector"
severity: WARNING
- id: inspector-in-var-name
languages:
- go
message: Do not use "Inspector" in var name inside inspector package
paths:
include:
- internal/service/inspector
patterns:
- pattern: var $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)Inspector"
severity: WARNING
101 changes: 58 additions & 43 deletions .ci/.semgrep-service-name2.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
# Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT.
rules:
- id: inspector-in-const-name
languages:
- go
message: Do not use "Inspector" in const name inside inspector package
paths:
include:
- internal/service/inspector
patterns:
- pattern: const $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)Inspector"
severity: WARNING
- id: inspector-in-var-name
languages:
- go
message: Do not use "Inspector" in var name inside inspector package
paths:
include:
- internal/service/inspector
patterns:
- pattern: var $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)Inspector"
severity: WARNING
- id: inspector2-in-func-name
languages:
- go
@@ -376,6 +348,64 @@ rules:
patterns:
- pattern-regex: "(?i)IVS"
severity: WARNING
- id: ivschat-in-func-name
languages:
- go
message: Do not use "IVSChat" in func name inside ivschat package
paths:
include:
- internal/service/ivschat
patterns:
- pattern: func $NAME( ... ) { ... }
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)IVSChat"
- pattern-not-regex: ^TestAcc.*
severity: WARNING
- id: ivschat-in-test-name
languages:
- go
message: Include "IVSChat" in test name
paths:
include:
- internal/service/ivschat/*_test.go
patterns:
- pattern: func $NAME( ... ) { ... }
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-not-regex: "^TestAccIVSChat"
- pattern-regex: ^TestAcc.*
severity: WARNING
- id: ivschat-in-const-name
languages:
- go
message: Do not use "IVSChat" in const name inside ivschat package
paths:
include:
- internal/service/ivschat
patterns:
- pattern: const $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)IVSChat"
severity: WARNING
- id: ivschat-in-var-name
languages:
- go
message: Do not use "IVSChat" in var name inside ivschat package
paths:
include:
- internal/service/ivschat
patterns:
- pattern: var $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)IVSChat"
severity: WARNING
- id: kafka-in-func-name
languages:
- go
@@ -3098,18 +3128,3 @@ 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
15 changes: 15 additions & 0 deletions .ci/.semgrep-service-name3.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# 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
1 change: 1 addition & 0 deletions .teamcity/components/generated/services_all.kt
Original file line number Diff line number Diff line change
@@ -98,6 +98,7 @@ val services = mapOf(
"iotanalytics" to ServiceSpec("IoT Analytics"),
"iotevents" to ServiceSpec("IoT Events"),
"ivs" to ServiceSpec("IVS (Interactive Video)"),
"ivschat" to ServiceSpec("IVS (Interactive Video) Chat"),
"kafka" to ServiceSpec("Managed Streaming for Kafka", vpcLock = true),
"kafkaconnect" to ServiceSpec("Managed Streaming for Kafka Connect"),
"keyspaces" to ServiceSpec("Keyspaces (for Apache Cassandra)"),
3 changes: 3 additions & 0 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
@@ -110,6 +110,7 @@ import (
"github.com/hashicorp/terraform-provider-aws/internal/service/inspector2"
"github.com/hashicorp/terraform-provider-aws/internal/service/iot"
"github.com/hashicorp/terraform-provider-aws/internal/service/ivs"
"github.com/hashicorp/terraform-provider-aws/internal/service/ivschat"
"github.com/hashicorp/terraform-provider-aws/internal/service/kafka"
"github.com/hashicorp/terraform-provider-aws/internal/service/kafkaconnect"
"github.com/hashicorp/terraform-provider-aws/internal/service/kendra"
@@ -1672,6 +1673,8 @@ func New(_ context.Context) (*schema.Provider, error) {
"aws_ivs_playback_key_pair": ivs.ResourcePlaybackKeyPair(),
"aws_ivs_recording_configuration": ivs.ResourceRecordingConfiguration(),

"aws_ivschat_logging_configuration": ivschat.ResourceLoggingConfiguration(),

"aws_msk_cluster": kafka.ResourceCluster(),
"aws_msk_configuration": kafka.ResourceConfiguration(),
"aws_msk_scram_secret_association": kafka.ResourceScramSecretAssociation(),
36 changes: 36 additions & 0 deletions internal/service/ivschat/find.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package ivschat

import (
"context"
"errors"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/ivschat"
"github.com/aws/aws-sdk-go-v2/service/ivschat/types"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-provider-aws/internal/tfresource"
)

func findLoggingConfigurationByID(ctx context.Context, conn *ivschat.Client, id string) (*ivschat.GetLoggingConfigurationOutput, error) {
in := &ivschat.GetLoggingConfigurationInput{
Identifier: aws.String(id),
}
out, err := conn.GetLoggingConfiguration(ctx, in)
if err != nil {
var nfe *types.ResourceNotFoundException
if errors.As(err, &nfe) {
return nil, &resource.NotFoundError{
LastError: err,
LastRequest: in,
}
}

return nil, err
}

if out == nil {
return nil, tfresource.NewEmptyResultError(in)
}

return out, nil
}
4 changes: 4 additions & 0 deletions internal/service/ivschat/generate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//go:generate go run ../../generate/tags/main.go -AWSSDKVersion=2 -ListTags -ServiceTagsMap -UpdateTags -KVTValues -SkipTypesImp
// ONLY generate directives and package declaration! Do not add anything else to this file.

package ivschat
Loading