Write a terraform module that creates an S3 bucket and a KMS key used to encrypt the contents of the s3 bucket. When running the module, the following inputs are mandatory:
- bucket-name (used to name the s3 bucket created by this module)
- region (the aws region in which to create the resources) The module should create by default the following 2 resources:
- a KMS key that the bucket will use for AWS-KMS encryption (by default the bucket created by this module must use Server-Side Encryption with AWS KMS-Managed Keys, also known as SSE-KMS); the creation of this KMS key must be triggerable (but enabled by default when running the module without passing the input which disables the creation of the key)
- the s3 bucket with the following configuration: