Skip to content

Commit 75703cb

Browse files
Add environment var (#108)
* Add environment var * Updated README.md Co-authored-by: actions-bot <[email protected]>
1 parent 4df0790 commit 75703cb

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ Available targets:
225225
| enable_stream_logs | Whether to create groups in CloudWatch Logs for proxy and deployment logs, and stream logs from each instance in your environment | bool | `false` | no |
226226
| enhanced_reporting_enabled | Whether to enable "enhanced" health reporting for this environment. If false, "basic" reporting is used. When you set this to false, you must also set `enable_managed_actions` to false | bool | `true` | no |
227227
| env_vars | Map of custom ENV variables to be provided to the application running on Elastic Beanstalk, e.g. env_vars = { DB_USER = 'admin' DB_PASS = 'xxxxxx' } | map(string) | `<map>` | no |
228+
| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | string | `` | no |
228229
| environment_type | Environment type, e.g. 'LoadBalanced' or 'SingleInstance'. If setting to 'SingleInstance', `rolling_update_type` must be set to 'Time', `updating_min_in_service` must be set to 0, and `loadbalancer_subnets` will be unused (it applies to the ELB, which does not exist in SingleInstance environments) | string | `LoadBalanced` | no |
229230
| force_destroy | Force destroy the S3 bucket for load balancer logs | bool | `false` | no |
230231
| health_streaming_delete_on_terminate | Whether to delete the log group when the environment is terminated. If false, the health data is kept RetentionInDays days. | bool | `false` | no |
@@ -343,6 +344,10 @@ We deliver 10x the value for a fraction of the cost of a full-time engineer. Our
343344

344345
Join our [Open Source Community][slack] on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.
345346

347+
## Discourse Forums
348+
349+
Participate in our [Discourse Forums][discourse]. Here you'll find answers to commonly asked questions. Most questions will be related to the enormous number of projects we support on our GitHub. Come here to collaborate on answers, find solutions, and get ideas about the products and services we value. It only takes a minute to get started! Just sign in with SSO using your GitHub account.
350+
346351
## Newsletter
347352

348353
Sign up for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
@@ -470,6 +475,7 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
470475
[testimonial]: https://cpco.io/leave-testimonial?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elastic-beanstalk-environment&utm_content=testimonial
471476
[office_hours]: https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elastic-beanstalk-environment&utm_content=office_hours
472477
[newsletter]: https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elastic-beanstalk-environment&utm_content=newsletter
478+
[discourse]: https://ask.sweetops.com/?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elastic-beanstalk-environment&utm_content=discourse
473479
[email]: https://cpco.io/email?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elastic-beanstalk-environment&utm_content=email
474480
[commercial_support]: https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elastic-beanstalk-environment&utm_content=commercial_support
475481
[we_love_open_source]: https://cpco.io/we-love-open-source?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-elastic-beanstalk-environment&utm_content=we_love_open_source

docs/terraform.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
| enable_stream_logs | Whether to create groups in CloudWatch Logs for proxy and deployment logs, and stream logs from each instance in your environment | bool | `false` | no |
3131
| enhanced_reporting_enabled | Whether to enable "enhanced" health reporting for this environment. If false, "basic" reporting is used. When you set this to false, you must also set `enable_managed_actions` to false | bool | `true` | no |
3232
| env_vars | Map of custom ENV variables to be provided to the application running on Elastic Beanstalk, e.g. env_vars = { DB_USER = 'admin' DB_PASS = 'xxxxxx' } | map(string) | `<map>` | no |
33+
| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | string | `` | no |
3334
| environment_type | Environment type, e.g. 'LoadBalanced' or 'SingleInstance'. If setting to 'SingleInstance', `rolling_update_type` must be set to 'Time', `updating_min_in_service` must be set to 0, and `loadbalancer_subnets` will be unused (it applies to the ELB, which does not exist in SingleInstance environments) | string | `LoadBalanced` | no |
3435
| force_destroy | Force destroy the S3 bucket for load balancer logs | bool | `false` | no |
3536
| health_streaming_delete_on_terminate | Whether to delete the log group when the environment is terminated. If false, the health data is kept RetentionInDays days. | bool | `false` | no |

main.tf

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
module "label" {
2-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.15.0"
3-
namespace = var.namespace
4-
name = var.name
5-
stage = var.stage
6-
delimiter = var.delimiter
7-
attributes = var.attributes
8-
tags = var.tags
2+
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.15.0"
3+
namespace = var.namespace
4+
environment = var.environment
5+
name = var.name
6+
stage = var.stage
7+
delimiter = var.delimiter
8+
attributes = var.attributes
9+
tags = var.tags
910
}
1011

1112
#

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ variable "delimiter" {
2626
description = "Delimiter to be used between `name`, `namespace`, `stage`, etc."
2727
}
2828

29+
variable "environment" {
30+
type = string
31+
default = ""
32+
description = "Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT'"
33+
}
34+
2935
variable "attributes" {
3036
type = list(string)
3137
default = []

0 commit comments

Comments
 (0)