terraform.aws-baseline-infra/modules/ManagementGovernance/CwAgentInstallUsingSsm
2024-09-10 10:11:50 +08:00
..
main.tf NEW: cloudwatch agent install and configuration for Linux instances 2024-09-10 10:11:50 +08:00
README.md NEW: cloudwatch agent install and configuration for Linux instances 2024-09-10 10:11:50 +08:00
versions.tf NEW: cloudwatch agent install and configuration for Linux instances 2024-09-10 10:11:50 +08:00

This module installs Cloudwatch agent via SSM State Manager. It creates an association and install the agent to all instances every 1 day.

Then a default cloudwatch agent config is generated using amazon-cloudwatch-agent-config-wizard, saved on /opt/aws/amazon-cloudwatch-agent/bin/config.json, supplemented with additional collections, and uploaded on SSM parameter store as AmazonCloudWatch-linux.

Note that for cloudwatch agent to fully function, the instance needs an instance profile with the following managed policies attached:

  • CloudWatchAgentServerPolicy
  • AmazonSSMManagedInstanceCore

Requirements

Name Version
terraform >= 1.3.0
aws >= 5.0

Providers

Name Version
aws >= 5.0

Modules

No modules.

Resources

Name Type
aws_ssm_association.ConfigCwAgent resource
aws_ssm_association.InstallCwAgent resource
aws_ssm_parameter.CwAgentConfigLinux resource

Inputs

No inputs.

Outputs

No outputs.


Authorship

This module was developed by UPDATE_THIS.