mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
added beanstalk resource
This commit is contained in:
parent
2b6ecf412a
commit
d7e2eea8be
3 changed files with 43 additions and 0 deletions
11
terraform/aws/new-beanstalk/main.tf
Normal file
11
terraform/aws/new-beanstalk/main.tf
Normal 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
|
||||
}
|
||||
7
terraform/aws/new-beanstalk/outputs.tf
Normal file
7
terraform/aws/new-beanstalk/outputs.tf
Normal 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}"
|
||||
}
|
||||
25
terraform/aws/new-beanstalk/variables.tf
Normal file
25
terraform/aws/new-beanstalk/variables.tf
Normal 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"
|
||||
}
|
||||
Loading…
Reference in a new issue