|
25 | 25 | - `tags` releases: Tags are pinned with versions (use <a href="https://github.com/tomarv2/terraform-aws-cloudwatch-events/tags" alt="GitHub tag"> |
26 | 26 | <img src="https://img.shields.io/github/v/tag/tomarv2/terraform-aws-cloudwatch-events" /></a>). |
27 | 27 |
|
28 | | -**NOTE:** |
29 | | - |
30 | | -- Read more on [tfremote](https://github.com/tomarv2/tfremote) |
31 | 28 |
|
32 | 29 | ## Usage |
33 | 30 |
|
34 | | -Recommended method: |
| 31 | +### Option 1: |
| 32 | + |
| 33 | +``` |
| 34 | +terrafrom init |
| 35 | +terraform plan -var='teamid=tryme' -var='prjid=project1' |
| 36 | +terraform apply -var='teamid=tryme' -var='prjid=project1' |
| 37 | +terraform destroy -var='teamid=tryme' -var='prjid=project1' |
| 38 | +``` |
| 39 | +**Note:** With this option please take care of remote state storage |
| 40 | + |
| 41 | +### Option 2: |
| 42 | + |
| 43 | +#### Recommended method (stores remote state in S3 using `prjid` and `teamid` to create directory structure): |
35 | 44 |
|
36 | 45 | - Create python 3.8+ virtual environment |
37 | 46 | ``` |
@@ -64,20 +73,23 @@ export AWS_SECRET_ACCESS_KEY=<aws_secret_access_key> |
64 | 73 |
|
65 | 74 | - Run and verify the output before deploying: |
66 | 75 | ``` |
67 | | -tf -c=aws plan -var='teamid=foo' -var='prjid=bar'> |
| 76 | +tf -c=aws plan -var='teamid=foo' -var='prjid=bar' |
68 | 77 | ``` |
69 | 78 |
|
70 | 79 | - Run below to deploy: |
71 | 80 | ``` |
72 | | -tf -c=aws apply -var='teamid=foo' -var='prjid=bar'> |
| 81 | +tf -c=aws apply -var='teamid=foo' -var='prjid=bar' |
73 | 82 | ``` |
74 | 83 |
|
75 | 84 | - Run below to destroy: |
76 | 85 | ``` |
77 | | -tf -c=aws destroy -var='teamid=foo' -var='prjid=bar'> |
| 86 | +tf -c=aws destroy -var='teamid=foo' -var='prjid=bar' |
78 | 87 | ``` |
79 | 88 |
|
80 | | -Please refer to examples directory [link](examples) for references. |
| 89 | +**NOTE:** |
| 90 | + |
| 91 | +- Read more on [tfremote](https://github.com/tomarv2/tfremote) |
| 92 | +--- |
81 | 93 |
|
82 | 94 | ## Requirements |
83 | 95 |
|
@@ -120,6 +132,7 @@ No modules. |
120 | 132 | | <a name="input_service_role"></a> [service\_role](#input\_service\_role) | service role to be used by cicd | `string` | `null` | no | |
121 | 133 | | <a name="input_suffix"></a> [suffix](#input\_suffix) | suffix to be added to cloudwatch rule name | `string` | `"rule"` | no | |
122 | 134 | | <a name="input_target_arn"></a> [target\_arn](#input\_target\_arn) | target arn | `string` | n/a | yes | |
| 135 | +| <a name="input_target_name"></a> [target\_name](#input\_target\_name) | Cloudwatch target name | `string` | `null` | no | |
123 | 136 | | <a name="input_teamid"></a> [teamid](#input\_teamid) | (Required) Name of the team/group e.g. devops, dataengineering. Should not be changed after running 'tf apply' | `string` | n/a | yes | |
124 | 137 | | <a name="input_timeout"></a> [timeout](#input\_timeout) | timeout for cloudwatch event | `number` | `60` | no | |
125 | 138 |
|
|
0 commit comments