I am using Terraform script to create aws elastic beanstalk environment, I need to launch a shell script on instance launch
I have already tried the following
resource "aws_elastic_beanstalk_environment" "Environment" {
name = "${var.ebs_env_name}"
application = "${var.ebs_app_name}"
---
---
---
setting = {
namespace = "aws:autoscaling:launchconfiguration"
name = "user_data"
value = "${file("user-data.sh")}"
}
}
This is throwing error
Error applying plan:
1 error(s) occurred:
aws_elastic_beanstalk_environment.Environment: ConfigurationValidationException: Configuration validation exception: Invalid option specification (Namespace: 'aws:autoscaling:launchconfiguration', OptionName: 'user_data'): Unknown configuration setting. status code: 400, request id: xxxxx-xxxxxx
Please Help