{"_id":"@aejay/cdktf-resources","_rev":"4-9a72495198fe211c2f7d4cb0dbbbaef7","name":"@aejay/cdktf-resources","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@aejay/cdktf-resources","version":"1.0.0","description":"Terraform CDK resources I find myself needing on projects and would like to reuse.","main":"dist/index.js","type":"module","exports":{".":"./dist/index.js","./BucketDistribution":"./dist/BucketDistribution.js","./DirectoryBucket":"./dist/DirectoryBucket.js","./SinglePageApp":"./dist/SinglePageApp.js"},"types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aejay/aejay-js.git","directory":"packages/cdktf-resources"},"keywords":["config","eslint","eslintconfig","lint"],"author":{"name":"Aejay Goehring"},"license":"MIT","bugs":{"url":"https://github.com/aejay/aejay-js/issues"},"scripts":{"build":"tsc"},"homepage":"https://github.com/aejay/aejay-js/tree/main/packages/cdktf-resources#readme","peerDependencies":{"@cdktf/provider-aws":">= 14","@cdktf/provider-local":">= 6","cdktf":">= 0.16","constructs":">= 10"},"devDependencies":{"typescript":"^5.1.3"},"gitHead":"1fef7210d506770401d39dfe53e97109d7196628","_id":"@aejay/cdktf-resources@1.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-oq4jWCBfrubDDGrhA5nImCWBAZA4T9kWR29aoKzXHOtPPDGzBSgu2Oqwps3OGIH79b3olVqadpVZlAP8r2Xc0A==","shasum":"a32b09973e26547758b081f679e7aea6763f270b","tarball":"https://registry.npmjs.org/@aejay/cdktf-resources/-/cdktf-resources-1.0.0.tgz","fileCount":11,"unpackedSize":36719,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpv9s59fzmQu/ByY3vluwKMRP9gqkPdqxRLzj0vBzcwQIgCdALczSkHtEeJJqX91Cv3SZ3ssCo34bdSL8EUIdc+sI="}]},"_npmUser":{"name":"aejay","email":"aejay.goehring+npm@gmail.com"},"directories":{},"maintainers":[{"name":"aejay","email":"aejay.goehring+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cdktf-resources_1.0.0_1687977663413_0.747528885981962"},"_hasShrinkwrap":false},"1.1.0":{"name":"@aejay/cdktf-resources","version":"1.1.0","description":"Terraform CDK resources I find myself needing on projects and would like to reuse.","main":"dist/index.js","type":"module","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aejay/aejay-js.git","directory":"packages/cdktf-resources"},"keywords":["config","eslint","eslintconfig","lint"],"author":{"name":"Aejay Goehring"},"license":"MIT","bugs":{"url":"https://github.com/aejay/aejay-js/issues"},"scripts":{"build":"tsc"},"homepage":"https://github.com/aejay/aejay-js/tree/main/packages/cdktf-resources#readme","peerDependencies":{"@cdktf/provider-aws":">= 14","@cdktf/provider-local":">= 6","@cdktf/provider-random":">= 8","cdktf":">= 0.16","constructs":">= 10"},"devDependencies":{"typescript":"^5.1.3"},"gitHead":"37e5797987ce84d1da80a2ee5e237d2dd5991013","_id":"@aejay/cdktf-resources@1.1.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-J8ympaw+1xVh7wczX+Uw9kpGXHCB41R14uMrBdJo4eHi7xC0zLs0uRmfbih3gyDcTZdPDNvd6Gd+GOC2tcANjg==","shasum":"283ab29fb7d26b5595e322a325f0015ea60fab7a","tarball":"https://registry.npmjs.org/@aejay/cdktf-resources/-/cdktf-resources-1.1.0.tgz","fileCount":11,"unpackedSize":40972,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLEScZbZcnnZmHuL5hFWPj7FhjAqYtJysEKOXuaJSBsgIgPgoIgXvfIQfr8oT7zbypMUqpJ4ccQLAppVbv+sx1WMY="}]},"_npmUser":{"name":"aejay","email":"aejay.goehring+npm@gmail.com"},"directories":{},"maintainers":[{"name":"aejay","email":"aejay.goehring+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cdktf-resources_1.1.0_1687981286793_0.48428536659137866"},"_hasShrinkwrap":false},"1.2.0":{"name":"@aejay/cdktf-resources","version":"1.2.0","description":"Terraform CDK resources I find myself needing on projects and would like to reuse.","main":"dist/index.js","type":"commonjs","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aejay/aejay-js.git","directory":"packages/cdktf-resources"},"keywords":["config","eslint","eslintconfig","lint"],"author":{"name":"Aejay Goehring"},"license":"MIT","bugs":{"url":"https://github.com/aejay/aejay-js/issues"},"scripts":{"build":"tsc"},"homepage":"https://github.com/aejay/aejay-js/tree/main/packages/cdktf-resources#readme","peerDependencies":{"@cdktf/provider-aws":">= 14","@cdktf/provider-local":">= 6","@cdktf/provider-random":">= 8","cdktf":">= 0.16","constructs":">= 10"},"devDependencies":{"typescript":"^5.1.3"},"gitHead":"f1d590e40320f47a1c7a10a53ecb1f16257d1cbf","_id":"@aejay/cdktf-resources@1.2.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-lsbVpEG+n9+h8LRcABaSL1DhuQgN3955M1hP/UsvNOHzoJvdS6JwAHeha8Mb5RetYQxi0ms3wtC0njVUtjDoVA==","shasum":"e6ace9174dd3d50322caeeaff949e6b247ddec48","tarball":"https://registry.npmjs.org/@aejay/cdktf-resources/-/cdktf-resources-1.2.0.tgz","fileCount":11,"unpackedSize":45035,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWKxwGYaUoZ6EfFXb4h5Xzg3ZkLmWY3xVzR3pwoeMqKAIhALD0TTdi69k79dLEHphHL5QdMiYZZfzVrBGCxgmxto35"}]},"_npmUser":{"name":"aejay","email":"aejay.goehring+npm@gmail.com"},"directories":{},"maintainers":[{"name":"aejay","email":"aejay.goehring+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cdktf-resources_1.2.0_1687983363761_0.7399211177274829"},"_hasShrinkwrap":false},"1.2.1":{"name":"@aejay/cdktf-resources","version":"1.2.1","description":"Terraform CDK resources I find myself needing on projects and would like to reuse.","main":"dist/index.js","type":"commonjs","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aejay/aejay-js.git","directory":"packages/cdktf-resources"},"keywords":["config","eslint","eslintconfig","lint"],"author":{"name":"Aejay Goehring"},"license":"MIT","bugs":{"url":"https://github.com/aejay/aejay-js/issues"},"scripts":{"build":"tsc"},"homepage":"https://github.com/aejay/aejay-js/tree/main/packages/cdktf-resources#readme","peerDependencies":{"@cdktf/provider-aws":">= 14","@cdktf/provider-local":">= 6","@cdktf/provider-random":">= 8","cdktf":">= 0.16","constructs":">= 10"},"devDependencies":{"typescript":"^5.1.3"},"gitHead":"e6ac284620ba38d2867c7f6aad3f82d4e42f063f","_id":"@aejay/cdktf-resources@1.2.1","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-sYcJYf5cbNahtoSP4sk+O34+g93bul6hD1Pnn/hfDM+RqVIFmq2Nzw2CKYYDKcdel6kmSNn/rUU+OJMBmaV8xg==","shasum":"017cdfd935187fe2a9418969f329183b9a5cb245","tarball":"https://registry.npmjs.org/@aejay/cdktf-resources/-/cdktf-resources-1.2.1.tgz","fileCount":11,"unpackedSize":45547,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqH56WioVR3xJIA0JOhKrOetQHpL+tx2FzUCYSdt8+yQIhAPHMmCj3tC1XT133j7vronSGE8f+q4HlXP7dZ7rpdfq/"}]},"_npmUser":{"name":"aejay","email":"aejay.goehring+npm@gmail.com"},"directories":{},"maintainers":[{"name":"aejay","email":"aejay.goehring+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cdktf-resources_1.2.1_1687985385864_0.12314403725094891"},"_hasShrinkwrap":false},"1.3.0":{"name":"@aejay/cdktf-resources","version":"1.3.0","description":"Terraform CDK resources I find myself needing on projects and would like to reuse.","main":"dist/index.js","type":"commonjs","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/aejay/aejay-js.git","directory":"packages/cdktf-resources"},"keywords":["config","eslint","eslintconfig","lint"],"author":{"name":"Aejay Goehring"},"license":"MIT","bugs":{"url":"https://github.com/aejay/aejay-js/issues"},"scripts":{"build":"tsc"},"homepage":"https://github.com/aejay/aejay-js/tree/main/packages/cdktf-resources#readme","peerDependencies":{"@cdktf/provider-aws":">= 14","@cdktf/provider-local":">= 6","@cdktf/provider-random":">= 8","cdktf":">= 0.16","constructs":">= 10"},"devDependencies":{"typescript":"^5.1.3"},"gitHead":"6a85ec1213276e362df74da57496621681095dd5","_id":"@aejay/cdktf-resources@1.3.0","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-VOKZQMbMIXzXNkzVZa4wwoN/4vLLSQzvrRtdPIsJ8+4R0pMMQNXWgaEmpQNKDBgR8YrDIUUPrDH+VbECLNR/iw==","shasum":"fccae5165dcbddacbff9953e110f3301a7225936","tarball":"https://registry.npmjs.org/@aejay/cdktf-resources/-/cdktf-resources-1.3.0.tgz","fileCount":11,"unpackedSize":46431,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClJKBvsisRLFMdr09v/ZXwWb8oTsi5/ApUBiM3gz4bbAIgfSuZ57B+zGohibP5ds75wa/i9AhYNdVoTUWQBVCtm/U="}]},"_npmUser":{"name":"aejay","email":"aejay.goehring+npm@gmail.com"},"directories":{},"maintainers":[{"name":"aejay","email":"aejay.goehring+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cdktf-resources_1.3.0_1688489847007_0.8678162426843394"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-28T18:41:03.308Z","1.0.0":"2023-06-28T18:41:03.588Z","modified":"2023-07-04T16:57:27.320Z","1.1.0":"2023-06-28T19:41:26.950Z","1.2.0":"2023-06-28T20:16:03.929Z","1.2.1":"2023-06-28T20:49:46.058Z","1.3.0":"2023-07-04T16:57:27.213Z"},"maintainers":[{"name":"aejay","email":"aejay.goehring+npm@gmail.com"}],"description":"Terraform CDK resources I find myself needing on projects and would like to reuse.","homepage":"https://github.com/aejay/aejay-js/tree/main/packages/cdktf-resources#readme","keywords":["config","eslint","eslintconfig","lint"],"repository":{"type":"git","url":"git+https://github.com/aejay/aejay-js.git","directory":"packages/cdktf-resources"},"author":{"name":"Aejay Goehring"},"bugs":{"url":"https://github.com/aejay/aejay-js/issues"},"license":"MIT","readme":"# @aejay/cdktf-resources\n\nA set of [Terraform CDK](https://developer.hashicorp.com/terraform/cdktf)\nresources that Aejay uses for his portfolio projects to keep from having to\nrepeat himself too frequently.\n\n## Using these resources\n\nThese resources require installing this package (`@aejay/cdktf-resources`) as a\ndependency, and setting up the proper provider(s), which are documented by\nresource (along with their usage snippet) in the sections below.\n\n### `DirectoryBucket`\n\nRequires:\n\n- A path to where the assets are stored locally.\n- A configured\n  [local provider](https://www.npmjs.com/package/@cdktf/provider-local) for\n  reading the local files to upload them.\n- A configured [AWS provider](https://www.npmjs.com/package/@cdktf/provider-aws)\n  for creating the S3 bucket and its uploaded objects.\n\nThis resource creates an S3 bucket and populates it using the contents of a\nfolder that is local to the executer of the terraform. If files are added,\nremoved, or changed (according to the hashing function) on subsequent runs, this\nshould update the files in S3 accordingly.\n\nThis resource also maintains a map of filetypes common to the web based on file\nextensions, to try to configure their mimetype to serve up correctly, falling\nback to the AWS default if the extension is unknown.\n\n#### Usage\n\n```ts\nclass MyStack extends TerraformStack {\n  constructor(scope: Construct, id: string) {\n    super(scope, id);\n\n    new local.provider.LocalProvider(this, \"local\", {});\n\n    new aws.provider.AwsProvider(this, \"aws\", {\n      // provider config here, like region\n    });\n\n    const localPath = resolve(__dirname, \"./some-local-path/\");\n\n    new DirectoryBucket(this, \"bucket\", {\n      localPath,\n    });\n  }\n}\n```\n\n### `BucketDistribution`\n\nRequires:\n\n- The ID and regional domain name of an S3 bucket (perhaps one created with the\n  [DirectoryBucket](#directorybucket) resource)\n- A list of domains the distribution should be served from\n- The ID of a Route53 zone to create DNS records, one for each of those domains\n- The ARN of an ACM certificate to act as the TLS cert via SNI\n- A configured [AWS provider](https://www.npmjs.com/package/@cdktf/provider-aws)\n  for creating the distribution and its associated Route53 rule(s)\n\nThis resource creates a CloudFront distribution that uses the specified S3\nbucket as the origin, and assigns a Route53 record to direct traffic to that\ndistribution.\n\nThe `viewerRequestFunctionArn` option for this resource allows you to define a\nLambda function to transform requests into the distribution prior to passing\nthem along to the origin S3 bucket. This is leveraged by the\n[SinglePageApp](#singlepageapp) resource to define the SPA behaviors.\n\n#### Usage\n\n```ts\nclass MyStack extends TerraformStack {\n  constructor(scope: Construct, id: string) {\n    super(scope, id);\n\n    new aws.provider.AwsProvider(this, \"aws\", {\n      // provider config here, like region\n    });\n\n    new BucketDistribution(this, \"distribution\", {\n      // Excluded for brevity, but some or all of these values would be pulled from TerraformVariable instances:\n      bucketId: \"\",\n      bucketDomain: \"\",\n\n      certificateArn: \"\",\n      domainAliases: [\"\", \"\"],\n      r53zoneId: \"\",\n    });\n  }\n}\n```\n\n### `SinglePageApp`\n\nRequires:\n\n- A path to where the SPA build assets are stored locally\n- A list of domains the SPA should be served from\n- The ID of a Route53 zone to create DNS records in for each of those domains\n- The ARN of an ACM certificate to act as the TLS cert via SNI\n- Due to using the two resources above, you'll also need:\n  - A configured\n    [local provider](https://www.npmjs.com/package/@cdktf/provider-local) for\n    reading the SPA files to upload them.\n  - A configured\n    [AWS provider](https://www.npmjs.com/package/@cdktf/provider-aws) for\n    creating the resources above as well as the request rewrite function\n\nThis resource leverages both of the resources above to create an S3 bucket that\nis exposed via CloudFront to one or more configured domains through Route53. It\nalso creates a CloudFront Function for rewriting incoming requests to map\nnon-static-asset requests to request the `index.html` file from the S3 origin,\nto have it behave as an SPA.\n\n#### Usage\n\n```ts\nclass MyStack extends TerraformStack {\n  constructor(scope: Construct, id: string) {\n    super(scope, id);\n\n    new local.provider.LocalProvider(this, \"local\", {});\n\n    new aws.provider.AwsProvider(this, \"aws\", {\n      // provider config here, like region\n    });\n\n    const localPath = resolve(__dirname, \"./some-built-spa-path/\");\n\n    new SinglePageApp(this, \"distribution\", {\n      localPath,\n\n      // Excluded for brevity, but some or all of these values would be pulled from TerraformVariable instances:\n      certificateArn: \"\",\n      domainAliases: [\"\", \"\"],\n      r53zoneId: \"\",\n    });\n  }\n}\n```\n","readmeFilename":"README.md"}