Has anyone utilized Terraform to configure the Infrastructure agent/APM agent for EC2 instances? The basic concept that I have in my head is to create an AMI with the agents already preinstalled and then use that image to deploy via Terraform. The one thing I am trying to figure out how to accomplish is filling in different config values in the agent config as well as not enabling the agent on each and every server ( test VS production). I know its possible to do this and will get it done but wanted to see what the community has done before or if anyone has some knowledge to share. Thanks!
Hey @asavage - I’m not sure we (NR) can help with this one! We don’t have an API to provision agents and configure those.
You could absolutely use Terraform provision custom AMIs with the NR agents pre-packaged, but that would use the AWS Provider, not the New Relic provider.
You can use nerdgraph to pull out your account license key, which will you could use to set as an environment variable in your AMI to have your NR agents ready to report immediately.