Skip to content

Commit 3bcc9e9

Browse files
committed
fixing readme
1 parent 6effc48 commit 3bcc9e9

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,22 @@
2525
- `tags` releases: Tags are pinned with versions (use <a href="https://github.com/tomarv2/terraform-aws-cloudwatch-events/tags" alt="GitHub tag">
2626
<img src="https://img.shields.io/github/v/tag/tomarv2/terraform-aws-cloudwatch-events" /></a>).
2727

28-
**NOTE:**
29-
30-
- Read more on [tfremote](https://github.com/tomarv2/tfremote)
3128

3229
## Usage
3330

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):
3544

3645
- Create python 3.8+ virtual environment
3746
```
@@ -64,20 +73,23 @@ export AWS_SECRET_ACCESS_KEY=<aws_secret_access_key>
6473

6574
- Run and verify the output before deploying:
6675
```
67-
tf -c=aws plan -var='teamid=foo' -var='prjid=bar'>
76+
tf -c=aws plan -var='teamid=foo' -var='prjid=bar'
6877
```
6978

7079
- Run below to deploy:
7180
```
72-
tf -c=aws apply -var='teamid=foo' -var='prjid=bar'>
81+
tf -c=aws apply -var='teamid=foo' -var='prjid=bar'
7382
```
7483

7584
- Run below to destroy:
7685
```
77-
tf -c=aws destroy -var='teamid=foo' -var='prjid=bar'>
86+
tf -c=aws destroy -var='teamid=foo' -var='prjid=bar'
7887
```
7988

80-
Please refer to examples directory [link](examples) for references.
89+
**NOTE:**
90+
91+
- Read more on [tfremote](https://github.com/tomarv2/tfremote)
92+
---
8193

8294
## Requirements
8395

@@ -120,6 +132,7 @@ No modules.
120132
| <a name="input_service_role"></a> [service\_role](#input\_service\_role) | service role to be used by cicd | `string` | `null` | no |
121133
| <a name="input_suffix"></a> [suffix](#input\_suffix) | suffix to be added to cloudwatch rule name | `string` | `"rule"` | no |
122134
| <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 |
123136
| <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 |
124137
| <a name="input_timeout"></a> [timeout](#input\_timeout) | timeout for cloudwatch event | `number` | `60` | no |
125138

0 commit comments

Comments
 (0)