Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break out beanstalk settings as its own resource #476

Closed
hashibot opened this issue Jun 13, 2017 · 4 comments
Closed

Break out beanstalk settings as its own resource #476

hashibot opened this issue Jun 13, 2017 · 4 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.

Comments

@hashibot
Copy link

This issue was originally opened by @oillio as hashicorp/terraform#11314. It was migrated here as part of the provider split. The original body of the issue is below.


It is very common to want to add/remove AWS elastic beanstalk settings based on variables.
This is currently not possible until we can use "count" in fields: hashicorp/terraform#7034

An easier to implement solution might be to break out settings into its own resource. As recommended by @cartolari: hashicorp/terraform#7034 (comment)

Something like this:

resource "aws_elastic_beanstalk_environment" "myEnv" {
  ...

  setting {
    namespace = "aws:elasticbeanstalk:application:environment"
    name      = "FOO"
    value     = "BAR"
  }  
}

resource "aws_elastic_beanstalk_environment_setting" "environment_variables" {
  environment_id = "${aws_elastic_beanstalk_environment.myEnv.id}"
  count          = "${length(var.myvars)}"
  namespace = "aws:elasticbeanstalk:application:environment"
  name      = "${lookup(element(var.myvars,count.index),"name")}"
  value     = "${lookup(element(var.myvars,count.index),"value")}"
}

For backwards compatibility, the resource settings could be merged with any field based settings (as shown above)

If this would be an acceptable addition, I would be happy to take a crack at submitting a PR for it.

@hashibot hashibot added the enhancement Requests to existing resources that expand the functionality or scope. label Jun 13, 2017
@mateusduboli
Copy link

This be used like the aws_security_group and aws_security_group_rule in which if you provide a rule inside aws_security_group it need to have the complete definition, and if you don't provide any rules it then keeps all the already configured ones.

@radeksimko radeksimko added the service/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk service. label Jan 25, 2018
@alexjurkiewicz
Copy link
Contributor

This should be obsolete now that you can use dynamic and for_each with sub-blocks.

@github-actions
Copy link

github-actions bot commented Mar 8, 2022

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Mar 8, 2022
@github-actions github-actions bot closed this as completed Apr 8, 2022
@github-actions
Copy link

github-actions bot commented May 9, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

No branches or pull requests

4 participants