AWS Amazon S3 SMB File Share
This page shows how to write Terraform for Amazon S3 SMB File Share and write them securely.
aws_storagegateway_smb_file_share (Terraform)
The SMB File Share in Amazon S3 can be configured in Terraform with the resource name aws_storagegateway_smb_file_share. The following sections describe 1 example of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_storagegateway_smb_file_share" "this" {
audit_destination_arn = var.audit_destination_arn
authentication = var.authentication
case_sensitivity = var.case_sensitivity
default_storage_class = var.default_storage_class
gateway_arn = var.gateway_arn
Parameters
-
access_based_enumerationoptional - bool -
admin_user_listoptional - set of string -
arnoptional computed - string -
audit_destination_arnoptional - string -
authenticationoptional - string -
case_sensitivityoptional - string -
default_storage_classoptional - string -
file_share_nameoptional computed - string -
fileshare_idoptional computed - string -
gateway_arnrequired - string -
guess_mime_type_enabledoptional - bool -
idoptional computed - string -
invalid_user_listoptional - set of string -
kms_encryptedoptional - bool -
kms_key_arnoptional - string -
location_arnrequired - string -
notification_policyoptional - string -
object_acloptional - string -
pathoptional computed - string -
read_onlyoptional - bool -
requester_paysoptional - bool -
role_arnrequired - string -
smb_acl_enabledoptional - bool -
tagsoptional - map from string to string -
valid_user_listoptional - set of string -
cache_attributeslist block-
cache_stale_timeout_in_secondsoptional - number
-
-
timeoutssingle block
Explanation in Terraform Registry
Manages an AWS Storage Gateway SMB File Share.
Tips: Best Practices for The Other AWS Amazon S3 Resources
In addition to the aws_s3_bucket_public_access_block, AWS Amazon S3 has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.
aws_s3_bucket_public_access_block
Ensure S3 bucket-level Public Access Block restricts public bucket policies
It is better to enable S3 bucket-level Public Access Block if you don't need public buckets.
aws_s3_bucket
Ensure S3 bucket access policy is well configured
It is better to configure the S3 bucket access policy properly to limit it unless explicitly required.
CloudFormation Example
CloudFormation code does not have the related resource.
Frequently asked questions
What is AWS Amazon S3 SMB File Share?
AWS Amazon S3 SMB File Share is a resource for Amazon S3 of Amazon Web Service. Settings can be wrote in Terraform.
Where can I find the example code for the AWS Amazon S3 SMB File Share?
For Terraform, the niveklabs/aws source code example is useful. See the Terraform Example section for further details.