Terraform-provider-aws: Support for AWS Storage Gateway

Created on 22 Jun 2017  ·  17Comments  ·  Source: hashicorp/terraform-provider-aws

Hi guys,

Just wondering if there is a eta for support of AWS Storage Gateways and related services?

Thanks

new-resource servicstoragegateway

Most helpful comment

Now that AWS supports SMB as well, am looking for this to be supported.

All 17 comments

Would be great, currently needing to do acrobatics with other scripts to get this all automated and integrating with existing Terraform code.

Can you provide which functionality is highest priority for your use cases? It appears that bootstrapping the acceptance test for activating a gateway might take some effort with properly configuring an EC2 instance, etc.

I could really use it for setting up the file shares more than anything.

I too would like to configure nfs shares from storage gateway.

Any news about it?

If someone could share a working aws_instance resource configuration that uses the Storage Gateway AMI, I think that would be helpful for moving forward since that would likely be the basis for all Storage Gateway acceptance testing.

Please note due to other priorities, the Terraform team at HashiCorp won't be able to work on this in the near future, but we'd be happy to review a pull request if you or someone else has the time and motivation to implement it. Alternatively, if others would also like to see this implemented I'd encourage adding a 👍 upvote reaction to the original issue comment (not to this comment), which we use as one of the inputs to prioritize work for the Terraform team.

I will check with our team for the configuration. I think we ended up delegating to a bash script in terraform for now that passes in the parameters. At this point we connect to the On-Premise VMware appliance instead of using an EC2 instance and it is pretty much a manual process to activate it.

But when an application team requests file shares, that's where we use the automated scripts.
Here's the CLI commands we would like to be supported by Terraform:

Now that AWS supports SMB as well, am looking for this to be supported.

In order to properly test this within the provider, we need to create an EC2 gateway instance to fetch the activation key since most other API operations require an activated gateway ID.

I have submitted a data source to handle this, that automates making the HTTP call to the gateway server IP: aws_storagegateway_gateway_activation_key

With that groundwork for testing in place, we should be able to implement the other Storage Gateway API calls as resources within Terraform afterwards.

It turns out the above data source was invalid after the gateway is activated. This functionality has instead been rolled into first resource, aws_storagegateway_gateway, which has been released with version 1.28.0 of the AWS provider. The other resources can start to trickle in now that we can manage the actual gateways. I am personally planning on implementing NFS/SMB file shares next.

You might be able to use this to automate deployment in the meantime: https://github.com/dstauffacher/nfs_file_gateway

Submitted pull requests:

  • New Resource: aws_storagegateway_nfs_file_share #5255
  • resource/aws_storagegateway_gateway: Add SMB settings arguments #5269
  • New Resource: aws_storagegateway_smb_file_share #5276
  • New Data Source: aws_storagegateway_local_disk #5279
  • New Resource: aws_storagegateway_cache #5282
  • New Resource: aws_storagegateway_upload_buffer #5284
  • New Resource: aws_storagegateway_working_storage #5285

Sorry if this is a silly ask, but has anyone successfully deployed a combination of Storage Gateway and File Shares using Terraform? An example of would be awesome!

Sorry if this is a silly ask, but has anyone successfully deployed a combination of Storage Gateway and File Shares using Terraform? An example of would be awesome!

I have, yes. My example project is here: https://github.com/dstauffacher/terraform_file_gateway
If you scroll up in this thread a bit, you'll see an older link I posted to a project that uses a combo of terraform and AWS CLI commands organized in a bash script. This link is to a terraform-only version of the same project.

Thank you!

Whoops, it looks like I forgot to close out this general Storage Gateway support feature request awhile ago! If you have any further bug reports or feature requests with Storage Gateway, please file new GitHub issues following the issue templates. 👍

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

Was this page helpful?
0 / 5 - 0 ratings