项目作者: tomarv2

项目描述 :
Terraform module for AWS CloudWatch Events
高级语言: HCL
项目地址: git://github.com/tomarv2/terraform-aws-cloudwatch-events.git
创建时间: 2021-02-17T05:39:55Z
项目社区:https://github.com/tomarv2/terraform-aws-cloudwatch-events

开源协议:Apache License 2.0

下载















Terraform module for AWS CloudWatch Events

Versions

Usage

Option 1:

  1. terrafrom init
  2. terraform plan -var='teamid=tryme' -var='prjid=project1'
  3. terraform apply -var='teamid=tryme' -var='prjid=project1'
  4. terraform destroy -var='teamid=tryme' -var='prjid=project1'

Note: With this option please take care of remote state storage

Option 2:

  • Create python 3.8+ virtual environment

    1. python3 -m venv <venv name>
  • Install package:

    1. pip install tfremote --upgrade
  • Set below environment variables:

    1. export TF_AWS_BUCKET=<remote state bucket name>
    2. export TF_AWS_BUCKET_REGION=us-west-2
    3. export TF_AWS_PROFILE=<profile from ~/.ws/credentials>

or

  • Set below environment variables:

    1. export TF_AWS_BUCKET=<remote state bucket name>
    2. export TF_AWS_BUCKET_REGION=us-west-2
    3. export AWS_ACCESS_KEY_ID=<aws_access_key_id>
    4. export AWS_SECRET_ACCESS_KEY=<aws_secret_access_key>
  • Updated examples directory with required values.

  • Run and verify the output before deploying:

    1. tf -c=aws plan -var='teamid=foo' -var='prjid=bar'
  • Run below to deploy:

    1. tf -c=aws apply -var='teamid=foo' -var='prjid=bar'
  • Run below to destroy:

    1. tf -c=aws destroy -var='teamid=foo' -var='prjid=bar'

Note: Read more on tfremote

Requirements

Name Version
terraform >= 1.0.1
aws ~> 4.61

Providers

Name Version
aws ~> 4.61

Modules

No modules.

Resources

Name Type
aws_cloudwatch_event_rule.event_rule resource
aws_cloudwatch_event_target.event_target_input_type resource

Inputs

Name Description Type Default Required
config Cloudwatch event configuration map(any) {} no
extra_tags Additional tags to associate map(string) {} no

Outputs

Name Description
event_rule_arn The cloudwatch event rule ARN
event_target_arn The cloudwatch event target ARN