Skip to content

Commit d055268

Browse files
authored
Add note on using terraform plan as module
1 parent 461fc54 commit d055268

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@ Once the `config.json` has been updated, the lambda function can be manually ins
3030

3131
The repo also has terraform plans to setup the lambda function - including the necessary IAM roles and lambda schedule (once an hour by default). A normal `terraform plan` and `terraform apply` should fully setup the lambda function. Requires terraform 0.7.8+.
3232

33+
#### Using as a module
34+
35+
The terraform plans can also be used as a module within your existing terraform project. Add as a module with something like below:
36+
37+
```hcl
38+
module "aws-maintenance-lambda" {
39+
source = "github.com/indix/aws-maintenance-lambda//terraform"
40+
41+
lambda_prepared_source_dir = "${path.root}/aws-maintenance-lambda-temp/source"
42+
lambda_archive_path = "${path.root}/aws-maintenance-lambda-temp/dist/aws_maintenance_lambda.zip"
43+
config_json = "${path.root}/files/aws-maintenance-lambda-config.json"
44+
}
45+
```
46+
3347
## License
3448

3549
This is an open source project licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).

0 commit comments

Comments
 (0)