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

Terraform module requires setting tags to avoid error #12

Open
orangejulius opened this issue Nov 23, 2019 · 0 comments
Open

Terraform module requires setting tags to avoid error #12

orangejulius opened this issue Nov 23, 2019 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@orangejulius
Copy link
Member

orangejulius commented Nov 23, 2019

We just discovered an issue with this Terraform module, fortunately there's a workaround.

An error like the following will be seen when creating the aws_launch_template when running terraform apply if there are no tags specified in the module configuration:

* module.elasticsearch-prod-a.aws_launch_template.elasticsearch: 1 error occurred:
* aws_launch_template.elasticsearch: InvalidRequest: The request received was invalid.
status code: 400, request id: ...

The issue is fixed by ensuring you define some custom tags when using the module.

module "elasticsearch-dev" {
  # .... the rest of the module configuration

  # define any set of tags such as the following
  tags {
    env = "dev"
  }
}

Under the hood, we need to determine a way to pass a default set of (empty) tags to the Launch Configuration without causing an error, so that we can fix this issue.

tag_specifications {
resource_type = "instance"
tags = "${var.tags}"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant