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_room #27974

Merged
merged 5 commits into from
Nov 23, 2022
Merged

Conversation

KevinEady
Copy link
Contributor

Description

Add new resource for AWS IVS Chat Room: aws_ivschat_room. This PR is the last in a set to support the full AWS IVS Chat entities:

  1. Logging Configuration
  2. Room

Since this PR addresses the last entity to fully support IVS and IVS Chat, merging this PR will close the issue listed in Relations.

Relations

Closes #17272

References

  1. https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ivschat Room functions and types

Output from Acceptance Testing

$ make testacc TESTS=TestAccIVSChatRoom_ PKG=ivschat
==> Checking that code complies with gofmt requirements...
TF_ACC=1 /Users/eakevinh/go/bin/go1.19.3 test ./internal/service/ivschat/... -v -count 1 -parallel 20 -run='TestAccIVSChatRoom_'  -timeout 180m
=== RUN   TestAccIVSChatRoom_basic
=== PAUSE TestAccIVSChatRoom_basic
=== RUN   TestAccIVSChatRoom_tags
=== PAUSE TestAccIVSChatRoom_tags
=== RUN   TestAccIVSChatRoom_disappears
=== PAUSE TestAccIVSChatRoom_disappears
=== RUN   TestAccIVSChatRoom_update
=== PAUSE TestAccIVSChatRoom_update
=== RUN   TestAccIVSChatRoom_loggingConfiguration
=== PAUSE TestAccIVSChatRoom_loggingConfiguration
=== RUN   TestAccIVSChatRoom_update_remove_messageReviewHandler_uri
=== PAUSE TestAccIVSChatRoom_update_remove_messageReviewHandler_uri
=== CONT  TestAccIVSChatRoom_basic
=== CONT  TestAccIVSChatRoom_update
=== CONT  TestAccIVSChatRoom_update_remove_messageReviewHandler_uri
=== CONT  TestAccIVSChatRoom_tags
=== CONT  TestAccIVSChatRoom_loggingConfiguration
=== CONT  TestAccIVSChatRoom_disappears
--- PASS: TestAccIVSChatRoom_disappears (25.04s)
--- PASS: TestAccIVSChatRoom_basic (33.96s)
--- PASS: TestAccIVSChatRoom_tags (71.94s)
--- PASS: TestAccIVSChatRoom_update_remove_messageReviewHandler_uri (83.95s)
--- PASS: TestAccIVSChatRoom_update (85.03s)
--- PASS: TestAccIVSChatRoom_loggingConfiguration (139.12s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ivschat    142.300s

Output from Example

$ yes yes | terraform apply
data.archive_file.message_review_handler: Reading...
data.archive_file.message_review_handler: Read complete after 0s [id=35e3e4914a1303f43939ed1725c4aca2deecb66e]
data.aws_region.current: Reading...
data.aws_caller_identity.current: Reading...
data.aws_region.current: Read complete after 0s [id=us-west-2]
data.aws_caller_identity.current: Read complete after 0s [id=326937407773]

Terraform used the selected providers to generate the following
execution plan. Resource actions are indicated with the following
symbols:
  + create

Terraform will perform the following actions:

... plan omitted ...

Plan: 6 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + room = (known after apply)

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: 
aws_iam_role.example: Creating...
aws_s3_bucket.example: Creating...
aws_iam_role.example: Creation complete after 1s [id=tf-ivschat-message-handler-role]
aws_lambda_function.example: Creating...
aws_s3_bucket.example: Creation complete after 4s [id=tf-ivschat-logging-bucket-20221123131034713300000001]
aws_ivschat_logging_configuration.example: Creating...
aws_ivschat_logging_configuration.example: Creation complete after 3s [id=arn:aws:ivschat:us-west-2:326937407773:logging-configuration/iDIXUStsr41D]
aws_lambda_function.example: Still creating... [10s elapsed]
aws_lambda_function.example: Still creating... [20s elapsed]
aws_lambda_function.example: Creation complete after 24s [id=tf-ivschat-message-handler]
aws_lambda_permission.example: Creating...
aws_lambda_permission.example: Creation complete after 0s [id=terraform-20221123131059530700000002]
aws_ivschat_room.example: Creating...
aws_ivschat_room.example: Creation complete after 3s [id=arn:aws:ivschat:us-west-2:326937407773:room/zD6Ke7bcR0qd]

Apply complete! Resources: 6 added, 0 changed, 0 destroyed.

Outputs:

room = "arn:aws:ivschat:us-west-2:326937407773:room/zD6Ke7bcR0qd"
$ yes yes | terraform destroy
data.archive_file.message_review_handler: Reading...
data.archive_file.message_review_handler: Read complete after 0s [id=35e3e4914a1303f43939ed1725c4aca2deecb66e]
data.aws_caller_identity.current: Reading...
data.aws_region.current: Reading...
aws_iam_role.example: Refreshing state... [id=tf-ivschat-message-handler-role]
data.aws_region.current: Read complete after 0s [id=us-west-2]
aws_s3_bucket.example: Refreshing state... [id=tf-ivschat-logging-bucket-20221123131034713300000001]
data.aws_caller_identity.current: Read complete after 1s [id=326937407773]
aws_lambda_function.example: Refreshing state... [id=tf-ivschat-message-handler]
aws_lambda_permission.example: Refreshing state... [id=terraform-20221123131059530700000002]
aws_ivschat_logging_configuration.example: Refreshing state... [id=arn:aws:ivschat:us-west-2:326937407773:logging-configuration/iDIXUStsr41D]
aws_ivschat_room.example: Refreshing state... [id=arn:aws:ivschat:us-west-2:326937407773:room/zD6Ke7bcR0qd]

Terraform used the selected providers to generate the following
execution plan. Resource actions are indicated with the following
symbols:
  - destroy

Terraform will perform the following actions:

... plan omitted ...

Plan: 0 to add, 0 to change, 6 to destroy.

Changes to Outputs:
  - room = "arn:aws:ivschat:us-west-2:326937407773:room/zD6Ke7bcR0qd" -> null

Do you really want to destroy all resources?
  Terraform will destroy all your managed infrastructure, as shown above.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: 
aws_ivschat_room.example: Destroying... [id=arn:aws:ivschat:us-west-2:326937407773:room/zD6Ke7bcR0qd]
aws_ivschat_room.example: Destruction complete after 1s
aws_lambda_permission.example: Destroying... [id=terraform-20221123131059530700000002]
aws_ivschat_logging_configuration.example: Destroying... [id=arn:aws:ivschat:us-west-2:326937407773:logging-configuration/iDIXUStsr41D]
aws_lambda_permission.example: Destruction complete after 1s
aws_lambda_function.example: Destroying... [id=tf-ivschat-message-handler]
aws_ivschat_logging_configuration.example: Destruction complete after 1s
aws_s3_bucket.example: Destroying... [id=tf-ivschat-logging-bucket-20221123131034713300000001]
aws_lambda_function.example: Destruction complete after 0s
aws_iam_role.example: Destroying... [id=tf-ivschat-message-handler-role]
aws_iam_role.example: Destruction complete after 1s
aws_s3_bucket.example: Destruction complete after 3s

Destroy complete! Resources: 6 destroyed.

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. labels Nov 23, 2022
@KevinEady KevinEady changed the title F ivschat room new resource: aws_ivschat_room Nov 23, 2022
@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. examples Introduces or discusses updates to examples. provider Pertains to the provider itself, rather than any interaction with AWS. service/ivschat Issues and PRs that pertain to the ivschat service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 23, 2022
@KevinEady KevinEady marked this pull request as ready for review November 23, 2022 14:45
@ewbankkit ewbankkit added new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 23, 2022
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccIVSChat' PKG=ivschat ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ivschat/... -v -count 1 -parallel 2  -run=TestAccIVSChat -timeout 180m
=== RUN   TestAccIVSChatLoggingConfiguration_basic_cloudwatch
=== PAUSE TestAccIVSChatLoggingConfiguration_basic_cloudwatch
=== RUN   TestAccIVSChatLoggingConfiguration_basic_firehose
=== PAUSE TestAccIVSChatLoggingConfiguration_basic_firehose
=== RUN   TestAccIVSChatLoggingConfiguration_basic_s3
=== PAUSE TestAccIVSChatLoggingConfiguration_basic_s3
=== RUN   TestAccIVSChatLoggingConfiguration_update_s3
=== PAUSE TestAccIVSChatLoggingConfiguration_update_s3
=== RUN   TestAccIVSChatLoggingConfiguration_tags
=== PAUSE TestAccIVSChatLoggingConfiguration_tags
=== RUN   TestAccIVSChatLoggingConfiguration_failure_invalidDestination
=== PAUSE TestAccIVSChatLoggingConfiguration_failure_invalidDestination
=== RUN   TestAccIVSChatLoggingConfiguration_disappears
=== PAUSE TestAccIVSChatLoggingConfiguration_disappears
=== RUN   TestAccIVSChatRoom_basic
=== PAUSE TestAccIVSChatRoom_basic
=== RUN   TestAccIVSChatRoom_tags
=== PAUSE TestAccIVSChatRoom_tags
=== RUN   TestAccIVSChatRoom_disappears
=== PAUSE TestAccIVSChatRoom_disappears
=== RUN   TestAccIVSChatRoom_update
=== PAUSE TestAccIVSChatRoom_update
=== RUN   TestAccIVSChatRoom_loggingConfiguration
=== PAUSE TestAccIVSChatRoom_loggingConfiguration
=== RUN   TestAccIVSChatRoom_update_remove_messageReviewHandler_uri
=== PAUSE TestAccIVSChatRoom_update_remove_messageReviewHandler_uri
=== CONT  TestAccIVSChatLoggingConfiguration_basic_cloudwatch
=== CONT  TestAccIVSChatRoom_basic
--- PASS: TestAccIVSChatRoom_basic (28.11s)
=== CONT  TestAccIVSChatLoggingConfiguration_tags
--- PASS: TestAccIVSChatLoggingConfiguration_basic_cloudwatch (29.03s)
=== CONT  TestAccIVSChatLoggingConfiguration_disappears
--- PASS: TestAccIVSChatLoggingConfiguration_disappears (28.12s)
=== CONT  TestAccIVSChatLoggingConfiguration_failure_invalidDestination
--- PASS: TestAccIVSChatLoggingConfiguration_failure_invalidDestination (5.58s)
=== CONT  TestAccIVSChatLoggingConfiguration_basic_s3
--- PASS: TestAccIVSChatLoggingConfiguration_basic_s3 (31.73s)
=== CONT  TestAccIVSChatLoggingConfiguration_update_s3
--- PASS: TestAccIVSChatLoggingConfiguration_tags (72.04s)
=== CONT  TestAccIVSChatLoggingConfiguration_basic_firehose
--- PASS: TestAccIVSChatLoggingConfiguration_update_s3 (54.84s)
=== CONT  TestAccIVSChatRoom_update
--- PASS: TestAccIVSChatRoom_update (68.94s)
=== CONT  TestAccIVSChatRoom_update_remove_messageReviewHandler_uri
--- PASS: TestAccIVSChatRoom_update_remove_messageReviewHandler_uri (68.72s)
=== CONT  TestAccIVSChatRoom_loggingConfiguration
--- PASS: TestAccIVSChatRoom_loggingConfiguration (93.85s)
=== CONT  TestAccIVSChatRoom_disappears
--- PASS: TestAccIVSChatRoom_disappears (15.12s)
=== CONT  TestAccIVSChatRoom_tags
--- PASS: TestAccIVSChatRoom_tags (45.98s)
--- PASS: TestAccIVSChatLoggingConfiguration_basic_firehose (1021.81s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ivschat	1131.617s

@ewbankkit
Copy link
Contributor

@KevinEady Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 751db16 into hashicorp:main Nov 23, 2022
@github-actions github-actions bot added this to the v4.41.0 milestone Nov 23, 2022
@KevinEady KevinEady deleted the f-ivschat-room branch November 24, 2022 11:58
@github-actions
Copy link

This functionality has been released in v4.41.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. examples Introduces or discusses updates to examples. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/ivschat Issues and PRs that pertain to the ivschat service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terraform AWS provider resources for Amazon IVS(Interactive Video Service)
2 participants