Skip to content

Commit

Permalink
Merge pull request #2 from clouddrove/CD-103
Browse files Browse the repository at this point in the history
change lambda code to modified it
  • Loading branch information
anmolnagpal committed Apr 15, 2020
2 parents c0b81ef + 61537f2 commit d4d2ff7
Show file tree
Hide file tree
Showing 281 changed files with 75 additions and 41,755 deletions.
35 changes: 22 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<hr>


We eat, drink, sleep and most importantly love **DevOps**. We are working towards stratergies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.
We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.

This module is basically combination of [Terraform open source](https://www.terraform.io/) and includes automatation tests and examples. It also helps to create and improve your infrastructure with minimalistic code instead of maintaining the whole infrastructure code yourself.

Expand Down Expand Up @@ -74,15 +74,14 @@ This module has a few dependencies:
Here is an example of how you can use this module in your inventory structure:
```hcl
module "cloudtrail-slack-notification" {
source = "git::https://github.com/clouddrove/terraform-aws-cloudtrail-slack-notification.git?ref=tags/0.12.0"
source = "git::https://github.com/clouddrove/terraform-aws-cloudtrail-slack-notification.git?ref=tags/0.12.2"
name = "cloudtrail-slack-notification"
application = "clouddrove"
environment = "test"
label_order = ["environment", "name", "application"]
enabled = true
bucket_arn = "arn:aws:s3:::security-bucket-log-clouddrove"
bucket_name = "security-bucket-log-clouddrove"
filename = "./../cloudtrail_logs"
variables = {
"SLACK_HOOK_URL" = "https://hooks.slack.com/services/TEE0GF0QZ/DFGHJHGFDFGHJ/YL5MzhCSJFHHUdfgh2Hs1qiMXVH",
"SLACK_CHANNEL" = "testing",
Expand All @@ -101,21 +100,31 @@ module "cloudtrail-slack-notification" {

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| application | Lambda Application (e.g. `cd` or `clouddrove`). | string | `` | no |
| bucket_arn | S3 Bucket ARN. | string | `` | no |
| bucket_name | S3 Bucket Name. | string | `` | no |
| enabled | Whether to create lambda function. | bool | `false` | no |
| environment | Lambda Environment (e.g. `prod`, `dev`, `staging`). | string | `` | no |
| filename | The path to the function's deployment package within the local filesystem. If defined, The s3_-prefixed options cannot be used. | string | `` | no |
| label_order | Label order, e.g. `name`,`application`. | list | `<list>` | no |
| name | Lambda Name (e.g. `app` or `cluster`). | string | `` | no |
| application | Lambda Application \(e.g. `cd` or `clouddrove`\). | string | `""` | no |
| bucket\_arn | S3 Bucket ARN. | string | `""` | no |
| bucket\_name | S3 Bucket Name. | string | `""` | no |
| enabled | Whether to create lambda function. | bool | `"false"` | no |
| environment | Lambda Environment \(e.g. `prod`, `dev`, `staging`\). | string | `""` | no |
| label\_order | Label order, e.g. `name`,`application`. | list | `<list>` | no |
| name | Lambda Name \(e.g. `app` or `cluster`\). | string | `""` | no |
| variables | A map that defines environment variables for the Lambda function. | map | `<map>` | no |

## Outputs

| Name | Description |
|------|-------------|
| cloudtrail-slack-arn | The Amazon Resource Name (ARN) identifying your cloudtrail logs Lambda Function. |
| cloudtrail-slack-arn | The Amazon Resource Name \(ARN\) identifying your cloudtrail logs Lambda Function. |




## Testing
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.

You need to run the following command in the testing folder:
```hcl
go test -run Test
```



Expand All @@ -137,4 +146,4 @@ At [CloudDrove][website], we offer expert guidance, implementation support and s
[linkedin]: https://cpco.io/linkedin
[twitter]: https://twitter.com/clouddrove/
[email]: https://clouddrove.com/contact-us.html
[terraform_modules]: https://github.com/clouddrove?utf8=%E2%9C%93&q=terraform-&type=&language=
[terraform_modules]: https://github.com/clouddrove?utf8=%E2%9C%93&q=terraform-&type=&language=
3 changes: 1 addition & 2 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,14 @@ usage : |-
Here is an example of how you can use this module in your inventory structure:
```hcl
module "cloudtrail-slack-notification" {
source = "git::https://github.com/clouddrove/terraform-aws-cloudtrail-slack-notification.git?ref=tags/0.12.0"
source = "git::https://github.com/clouddrove/terraform-aws-cloudtrail-slack-notification.git?ref=tags/0.12.2"
name = "cloudtrail-slack-notification"
application = "clouddrove"
environment = "test"
label_order = ["environment", "name", "application"]
enabled = true
bucket_arn = "arn:aws:s3:::security-bucket-log-clouddrove"
bucket_name = "security-bucket-log-clouddrove"
filename = "./../cloudtrail_logs"
variables = {
"SLACK_HOOK_URL" = "https://hooks.slack.com/services/TEE0GF0QZ/DFGHJHGFDFGHJ/YL5MzhCSJFHHUdfgh2Hs1qiMXVH",
"SLACK_CHANNEL" = "testing",
Expand Down
1 change: 0 additions & 1 deletion _example/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module "cloudtrail-slack-notification" {
enabled = true
bucket_arn = "arn:aws:s3:::security-bucket-log-cd"
bucket_name = "security-bucket-log-cd"
filename = "./../cloudtrail_slack_notification"
variables = {
SLACK_WEBHOOK = "https://hooks.slack.com/services/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"
SLACK_CHANNEL = "testing"
Expand Down

This file was deleted.

This file was deleted.

74 changes: 0 additions & 74 deletions cloudtrail_slack_notification/certifi-2019.9.11.dist-info/METADATA

This file was deleted.

14 changes: 0 additions & 14 deletions cloudtrail_slack_notification/certifi-2019.9.11.dist-info/RECORD

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions cloudtrail_slack_notification/certifi/__init__.py

This file was deleted.

2 changes: 0 additions & 2 deletions cloudtrail_slack_notification/certifi/__main__.py

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit d4d2ff7

Please sign in to comment.