added beanstalk resource

This commit is contained in:
UdhavPawar 2021-09-16 14:39:34 -07:00
parent 2b6ecf412a
commit d7e2eea8be
3 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,11 @@
resource "aws_elastic_beanstalk_application" "demo_beanstalk_application" {
name = var.demo_beanstalk_application_name
description = var.demo_beanstalk_application_description
}
resource "aws_elastic_beanstalk_environment" "demo_beanstalk_environment" {
name = var.demo_beanstalk_environment_name
application = aws_elastic_beanstalk_application.demo_beanstalk_application.name
// For all supported AWS BeanStalk Platforms / Stacks refer : https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html
solution_stack_name = var.demo_beanstalk_environment_platform
}

View file

@ -0,0 +1,7 @@
output "demo_beanstalk_application_name" {
value = "${aws_elastic_beanstalk_application.demo_beanstalk_application.name}"
}
output "demo_beanstalk_environment_name" {
value = "${aws_elastic_beanstalk_environment.demo_beanstalk_environment.name}"
}

View file

@ -0,0 +1,25 @@
// Define application variables
variable "demo_beanstalk_application_name" {
type = "string"
default = ""
description = "AWS beanstalk application name"
}
variable "demo_beanstalk_application_description" {
type = "string"
default = ""
description = "AWS beanstalk application description"
}
// Define environment variables
variable "demo_beanstalk_environment_name" {
type = "string"
default = ""
description = "AWS beanstalk environment name"
}
variable "demo_beanstalk_environment_platform" {
type = "string"
default = "64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4"
description = "AWS beanstalk environment platform"
}