{"id":20475887,"url":"https://github.com/aws-ia/terraform-awscc-dropshare","last_synced_at":"2025-04-13T12:34:38.660Z","repository":{"id":42708929,"uuid":"459516829","full_name":"aws-ia/terraform-awscc-dropshare","owner":"aws-ia","description":"Terraform Module to create resources for a Dropshare Connection with AWS S3 and AWS CloudFront.","archived":false,"fork":false,"pushed_at":"2022-03-27T19:34:41.000Z","size":668,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-27T03:35:17.120Z","etag":null,"topics":["aws-acm","aws-cloudfront","aws-iam","aws-s3","dropshare","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/aws-ia/dropshare/awscc","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws-ia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null}},"created_at":"2022-02-15T09:46:50.000Z","updated_at":"2025-02-17T03:06:16.000Z","dependencies_parsed_at":"2022-09-08T07:10:48.359Z","dependency_job_id":null,"html_url":"https://github.com/aws-ia/terraform-awscc-dropshare","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-ia%2Fterraform-awscc-dropshare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-ia%2Fterraform-awscc-dropshare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-ia%2Fterraform-awscc-dropshare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-ia%2Fterraform-awscc-dropshare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws-ia","download_url":"https://codeload.github.com/aws-ia/terraform-awscc-dropshare/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248714728,"owners_count":21149955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-acm","aws-cloudfront","aws-iam","aws-s3","dropshare","terraform","terraform-module"],"created_at":"2024-11-15T15:17:31.891Z","updated_at":"2025-04-13T12:34:38.631Z","avatar_url":"https://github.com/aws-ia.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dropshare Connection - AWS S3\n\n\u003e Terraform Module to create resources for a Dropshare Connection with AWS S3 and AWS CloudFront.\n\n## Table of Contents\n\n- [Dropshare Connection: AWS S3](#dropshare-connection-aws-s3)\n  - [Table of Contents](#table-of-contents)\n  - [Overview](#overview)\n  - [Usage](#usage)\n    - [Dropshare](#dropshare)\n    - [Inputs](#inputs)\n    - [Outputs](#outputs)\n  - [Notes](#notes)\n  - [Author Information](#author-information)\n  - [License](#license)\n\n## Overview\n\nThis [Terraform Module](https://learn.hashicorp.com/tutorials/terraform/module) creates the required resources to create an [S3 Connection](https://dropshare.zendesk.com/hc/en-us/articles/201139232-How-to-set-up-Amazon-S3-or-S3-API-compatible-connections) for [Dropshare](https://dropshare.app).\n\n![Resource Overview for Module](files/diagram.png \"Resource Overview for Module\")\n\n```mermaid\n  graph TD;\n    dns_a[DNS Record, type A] --\u003e tls;\n    dns_aaaa[DNS Record, type AAAA] --\u003e tls;\n    tls[TLS Certificate] --\u003e cloudfront;\n\n    cloudfront[CloudFront Distribution];\n\n    bucket[S3 Bucket] --\u003e cloudfront;\n\n    user[IAM User] --\u003e bucket;\n```\n\n## Usage\n\nThis section contains the input and output values of this module as well as information on how to configure [Dropshare](https://dropshare.app/).\n\n### Dropshare\n\nTo configure Dropshare, start from `basic` example available in [./examples/basic](https://github.com/ksatirli/terraform-awscc-dropshare/blob/main/examples/basic).\n\nModify the input values `bucket_name`, `keybase_user`, `routed53_zone_id` and `route53_record_subdomain` to reflect your infrastructure.\n\nNext, carry out a [Terraform run](https://www.terraform.io/cli/run), executing the `terraform plan`, and `terraform apply`.\n\nWhen the [apply](https://www.terraform.io/cli/run#applying) process finishes, Terraform will present the required [outputs](https://www.terraform.io/language/values/outputs) to configure Dropshare:\n\n```shell\nOutputs:\n\naccess_key_id              = \"AKIAIOSFODNN7EXAMPLE\"\nbucket_name                = \"aws-ia-dropshare\"\ndomain_alias               = \"aws-ia-dropshare.svcs.dev\"\nregion                     = \"us-west-1\"\nsecret_key                 = \"wcB...A==\"\nsecret_key_decrypt_command = \"terraform output -raw secret_key | base64 --decode | keybase pgp decrypt\"\n```\n\n\u003e Note that the `secret_key` output is the _encrypted_ value of the AWS IAM Secret Access Key. To decrypt it, run the decryption command presented in the `secret_key_decrypt_command` output.\n\nUsing the outputs, you can configure a Dropshare Connection for AWS S3:\n\n![Dropshare Configuration](files/dropshare_configuration.png)\n\nFor additional examples, see the [/examples](https://github.com/aws-ia/terraform-awscc-dropshare/blob/main/examples/) directory.\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n### Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| keybase\\_user | KeyBase username for use in the `encrypted_secret` output attribute. | `string` | n/a | yes |\n| route53\\_record\\_subdomain | Subdomain Record to create in the Route53 Hosted Zone. | `string` | n/a | yes |\n| routed53\\_zone\\_id | ID of the Route53 Hosted Zone. | `string` | n/a | yes |\n| bucket\\_index\\_file | Path to template file to use as Index for Bucket. | `string` | `\"files/index.html\"` | no |\n| bucket\\_name | Name of the S3 Bucket. When left empty, a random name will be generated. | `string` | `\"\"` | no |\n| bucket\\_robotstxt\\_file | Path to template file to use as `robots.txt` for Bucket. | `string` | `\"files/robots.txt\"` | no |\n| bucket\\_storage\\_class | The class of storage used to store the object. | `string` | `\"ONEZONE_IA\"` | no |\n| caller\\_ip\\_address | IP Address to constrain IAM Policy to. If left empty, this will be replaced with the caller's public IP address. | `string` | `\"\"` | no |\n| cloudfront\\_cache\\_policy\\_id | ID of AWS-managed Cache Policy. | `string` | `\"658327ea-f89d-4fab-a63d-7e88639e58f6\"` | no |\n| cloudfront\\_comment | Comment to assign to CloudFront resources. | `string` | `\"Terraform-managed Resource for Dropshare Connection\"` | no |\n| cloudfront\\_minimum\\_protocol\\_version | The minimum version of the TLS protocol that you want CloudFront to use for HTTPS connections. | `string` | `\"TLSv1.2_2021\"` | no |\n| cloudfront\\_origin\\_request\\_policy\\_id | ID of AWS-managed Origin Request Policy. | `string` | `\"59781a5b-3903-41f3-afcb-af62929ccde1\"` | no |\n| cloudfront\\_response\\_headers\\_policy\\_id | ID of AWS-managed Response Headers Policy. | `string` | `\"67f7725c-6f97-4210-82d7-5512b31e9d03\"` | no |\n| cloudfront\\_zone\\_id | ID of the CloudFront Route53 Hosted Zone. | `string` | `\"Z2FDTNDATAQYW2\"` | no |\n| create\\_index\\_file | Boolean Toggle to enable creation of Index File (`var.bucket_index_file`) in Bucket. | `bool` | `true` | no |\n| create\\_robotstxt\\_file | Boolean Toggle to enable creation of Robots File (`var.bucket_robotstxt_file`) in Bucket. | `bool` | `true` | no |\n| iam\\_group\\_path | IAM Group Path for Service Accounts. | `string` | `\"/services/\"` | no |\n| iam\\_ip\\_address\\_retrieval\\_service | URL for (Public) IP Address Retrieval Service. | `string` | `\"https://checkip.amazonaws.com/\"` | no |\n| lock\\_policy\\_to\\_ip\\_address | Toggle to enable constraining of IAM Policy to user-provided IP Address. | `bool` | `true` | no |\n\n### Outputs\n\n| Name | Description |\n|------|-------------|\n| access\\_key\\_id | IAM Access Key. |\n| bucket\\_id | S3 Bucket ARN. |\n| bucket\\_name | S3 Bucket Name. |\n| domain\\_alias | Domain Alias for CloudFront Distribution. |\n| region | S3 Bucket Region. |\n| secret\\_key | (encrypted) IAM Secret Key. |\n| secret\\_key\\_decrypt\\_command\\_append | Appended part of Command to decrypt IAM Secret Key. |\n| secret\\_key\\_decrypt\\_command\\_prepend | Prepended part of Command to decrypt IAM Secret Key. |\n\u003c!-- END_TF_DOCS --\u003e\n\n## Notes\n\nThis section contains notes for this module.\n\n### Public IP Retrieval Services\n\nIn [iam.tf](https://github.com/aws-ia/terraform-awscc-dropshare/blob/main/iam.tf), an [HTTP data source](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) is used to retrieve the caller's public IP address. This IP address is then used as a constraint for the module-created IAM policy.\n\nAllowing a remote service to provide a string for constraining IAM Access to a specific source IP provides a limited, but non-zero security concern.\n\nShould you wish to provide a different IP retrieval service, you can update the `iam_ip_address_retrieval_service` variable with the URL to a service you trust. See [variables.tf](https://github.com/aws-ia/terraform-awscc-dropshare/blob/main/variables.tf) and [iam.tf](https://github.com/aws-ia/terraform-awscc-dropshare/blob/main/iam.tf) for more information.\n\nThe [HTTP data source](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) may display a warning if the underlying retrieval services not expose a Content-Type that is compatible with the data source.\n\n### Code Linting\n\nThis repository makes use of [GitHub Actions](https://github.com/aws-ia/terraform-awscc-dropshare/tree/main/.github/workflows) to provide support for a variety of linting tools.\n\nTo use [Snyk IaC](https://snyk.io/product/infrastructure-as-code-security/) scanning, a GitHub Actions Secret named `SNYK_TOKEN` must be [created](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository).\n\n## Author Information\n\nThis repository is maintained by the contributors listed on [GitHub](https://github.com/aws-ia/terraform-awscc-dropshare/graphs/contributors).\n\n## License\n\nLicensed under the Apache License, Version 2.0 (the \"License\").\n\nYou may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an _\"AS IS\"_ basis, without WARRANTIES or conditions of any kind, either express or implied.\n\nSee the License for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-ia%2Fterraform-awscc-dropshare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws-ia%2Fterraform-awscc-dropshare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-ia%2Fterraform-awscc-dropshare/lists"}