Loading...
Loading...
<!-- Hi there, Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html. If your issue relates to a specific Terraform provider, please open it in the provider's own repository. The index of providers is at https://github.com/terraform-providers. To fix problems, we need clear reproduction cases - we need to be able to see it happen locally. A reproduction case is ideally something a Terraform Core engineer can git-clone or copy-paste and run immediately, without inventing any details or context. * A short example can be directly copy-pasteable; longer examples should be in separate git repositories, especially if multiple files are needed * Please include all needed context. For example, if you figured out that an expression can cause a crash, put the expression in a variable definition or a resource * Set defaults on (or omit) any variables. The person reproducing it should not need to invent variable settings * If multiple steps are required, such as running terraform twice, consider scripting it in a simple shell script. For example, see [this case](https://github.com/danieldreier/terraform-issue-reproductions/tree/master/25719). Providing a script can be easier than explaining what changes to make to the config between runs. * Omit any unneeded complexity: remove variables, conditional statements, functions, modules, providers, and resources that are not needed to trigger the bug * When possible, use the [null resource](https://www.terraform.io/docs/providers/null/resource.html) provider rather than a real provider in order to minimize external dependencies. We know this isn't always feasible. The Terraform Core team doesn't have deep domain knowledge in every provider, or access to every cloud platform for reproduction cases. --> ### Terraform Version <!--- Run `terraform version` to show the version, and paste the result between the ``` marks below. If you are not running the latest version of Terraform, please try upgrading because your issue may have already been fixed. --> ``` Terraform v0.13.5 ``` ### Terraform Configuration Files <!-- Paste the relevant parts of your Terraform configuration between the ``` marks below. For Terraform configs larger than a few resources, or that involve multiple files, please make a GitHub repository that we can clone, rather than copy-pasting multiple files in here. For security, you can also encrypt the files using our GPG public key at https://www.hashicorp.com/security. --> ```terraform here is the github project: https://github.com/HashiBeliver/terraform_bug ``` ### Debug Output <!-- Full debug output can be obtained by running Terraform with the environment variable `TF_LOG=trace`. Please create a GitHub Gist containing the debug output. Please do _not_ paste the debug output in the issue, since debug output is long. Debug output may contain sensitive information. Please review it before posting publicly, and if you are concerned feel free to encrypt the files using the HashiCorp security public key. --> ### Crash Output <!-- --> ``` I didn't run it with the trace environment variable but here is a link to crash.log gist, is it ok? https://gist.github.com/HashiBeliver/ced5553b228b6fa000bbafe042cde4a4 ``` ### Expected Behavior <!-- --> ``` The terraform plan stated on the screen should have been carried out as written. deploying every infrastructure component, especially the ec2 instances. ``` ### Actual Behavior <!-- --> ``` it sometimes works well as expected and sometimes fails, fails meaning it keeps sending messages of ec2 creation (still creating...) until I interrupt it, and at that point a crash log is generated. Usually there are 2 results when it fails 1. EC2 instance requests are hanging in the "still creating" process and are just not being created. 2. EC2 instance requests are hanging in the "still creating" process, but new duplicate instance of that hanging instance is being created in the background resulting in rouge infrastructure that terraform lose management of since in the state it registers only once, as it should have created only one. so terraform loses management over ec2 and deploys more than requested and what terraform planned. ``` ### Steps to Reproduce <!-- --> ``` Since I had it sometimes working and sometimes not, and when it doesnt had result differently I can only give some instructions and hopefully it will be reproduced at your end as well: git clone https://github.com/HashiBeliver/terraform_bug in there create a file terraform.tfvars and in it: aws_provider_main_region = "" << whatever aws region like eu-west-1 aws_credentials_profile = "" << name of a aws profile in .aws that hold aws credentials for deployment vpc_id = "" << vpc id in the chosen region aws_keypair = "" << aws key that exists in the region subnet_ids = [""] << subnet id in the chosen vpc ssh_ips = ["10.10.10.10/32"] <<allowed ssh ip es_initial_master_nodes_amount = 1 es_dedicated_master_nodes_amount = 1 es_data_master_nodes_amount = 1 es_dedicated_data_nodes_amount = 4 save the file terraform init terraform apply ``` ### Additional Context <!-- Are there anything atypical about your situation that we should know? For example: is Terraform running in a wrapper script or in a CI system? Are you passing any unusual command line options or environment variables to opt-in to non-default behavior? --> ### References <!-- Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example: - #6017 -->
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.