{"action":"created","issue":{"url":"https://api.github.com/repos/newcontext-oss/kitchen-terraform/issues/255","repository_url":"https://api.github.com/repos/newcontext-oss/kitchen-terraform","labels_url":"https://api.github.com/repos/newcontext-oss/kitchen-terraform/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/newcontext-oss/kitchen-terraform/issues/255/comments","events_url":"https://api.github.com/repos/newcontext-oss/kitchen-terraform/issues/255/events","html_url":"https://github.com/newcontext-oss/kitchen-terraform/issues/255","id":345787434,"node_id":"MDU6SXNzdWUzNDU3ODc0MzQ=","number":255,"title":"Receive 'Interrupt received' signal after 11m20s","user":{"login":"darkraiden","id":8956107,"node_id":"MDQ6VXNlcjg5NTYxMDc=","avatar_url":"https://avatars0.githubusercontent.com/u/8956107?v=4","gravatar_id":"","url":"https://api.github.com/users/darkraiden","html_url":"https://github.com/darkraiden","followers_url":"https://api.github.com/users/darkraiden/followers","following_url":"https://api.github.com/users/darkraiden/following{/other_user}","gists_url":"https://api.github.com/users/darkraiden/gists{/gist_id}","starred_url":"https://api.github.com/users/darkraiden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkraiden/subscriptions","organizations_url":"https://api.github.com/users/darkraiden/orgs","repos_url":"https://api.github.com/users/darkraiden/repos","events_url":"https://api.github.com/users/darkraiden/events{/privacy}","received_events_url":"https://api.github.com/users/darkraiden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-30T14:40:11Z","updated_at":"2018-07-30T14:57:13Z","closed_at":null,"author_association":"NONE","body":"Hello there,\r\n\r\nI've been experiencing something odd whilst testing a terraform module I wrote with test kitchen.\r\n\r\n## Ruby, terraform and gems versions\r\n\r\n* ruby 2.4.2\r\n* kitchen-terraform 3.3\r\n* test-kitchen 1.22.0\r\n* terraform v0.11.7\r\n* provider.aws v1.29.0\r\n\r\n## Context\r\n\r\nI wrote a module to provision an RDS instance to AWS - run `kitchen converge` and start provisioning. Everything looks fine until it gets to 11m20s, then it fails throwing this error:\r\n\r\n```bash\r\n       module.rds-master.aws_db_instance.rds: Still creating... (10m50s elapsed)\r\n       module.rds-master.aws_db_instance.rds: Still creating... (11m0s elapsed)\r\n       module.rds-master.aws_db_instance.rds: Still creating... (11m10s elapsed)\r\n       module.rds-master.aws_db_instance.rds: Still creating... (11m20s elapsed)\r\n       Interrupt received.\r\n       Please wait for Terraform to exit or data loss may occur.\r\n       Gracefully shutting down...\r\n       stopping operation...\r\n\r\n       Apply complete! Resources: 0 added, 0 changed, 0 destroyed.\r\n>>>>>> ------Exception-------\r\n>>>>>> Class: Kitchen::ActionFailed\r\n>>>>>> Message: 1 actions failed.\r\n>>>>>>     Converge failed on instance <default-aws>.  Please see .kitchen/logs/default-aws.log for more details\r\n>>>>>> ----------------------\r\n>>>>>> Please see .kitchen/logs/kitchen.log for more details\r\n>>>>>> Also try running `kitchen diagnose --all` for configuration\r\n```\r\n\r\nand this is the content of the log file:\r\n\r\n```\r\n^[[0m^[[1mmodule.rds-master.aws_db_instance.rds: Still creating... (10m50s elapsed)^[[0m^[[0m\r\n^[[0m^[[1mmodule.rds-master.aws_db_instance.rds: Still creating... (11m0s elapsed)^[[0m^[[0m\r\n^[[0m^[[1mmodule.rds-master.aws_db_instance.rds: Still creating... (11m10s elapsed)^[[0m^[[0m\r\n^[[0m^[[1mmodule.rds-master.aws_db_instance.rds: Still creating... (11m20s elapsed)^[[0m^[[0m\r\nInterrupt received.\r\nPlease wait for Terraform to exit or data loss may occur.\r\nGracefully shutting down...\r\nstopping operation...\r\n^[[0m^[[1m^[[32m\r\nApply complete! Resources: 0 added, 0 changed, 0 destroyed.^[[0m\r\nSTDERR:\r\n---- End output of terraform apply -lock=true -lock-timeout=0s -input=false -auto-approve=true  -parallelism=10 -refresh=true   /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/test/test_fixture ----\r\nRan terraform apply -lock=true -lock-timeout=0s -input=false -auto-approve=true  -parallelism=10 -refresh=true   /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/test/test_fixture returned 0\r\nE, [2018-07-30T15:37:01.720184 #15338] ERROR -- default-aws: ----------------------\r\nE, [2018-07-30T15:37:01.720221 #15338] ERROR -- default-aws: ------Backtrace-------\r\nE, [2018-07-30T15:37:01.720255 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/kitchen-terraform-3.3.1/lib/kitchen/provisioner/terraform.rb:106:in `rescue in call'\r\nE, [2018-07-30T15:37:01.720290 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/kitchen-terraform-3.3.1/lib/kitchen/provisioner/terraform.rb:98:in `call'\r\nE, [2018-07-30T15:37:01.720324 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/test-kitchen-1.22.0/lib/kitchen/instance.rb:393:in `block in converge_action'\r\nE, [2018-07-30T15:37:01.720387 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/test-kitchen-1.22.0/lib/kitchen/instance.rb:536:in `synchronize_or_call'\r\nE, [2018-07-30T15:37:01.720423 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/test-kitchen-1.22.0/lib/kitchen/instance.rb:498:in `block in action'\r\nE, [2018-07-30T15:37:01.720458 #15338] ERROR -- default-aws: /Users/davide/.rvm/rubies/ruby-2.4.2/lib/ruby/2.4.0/benchmark.rb:293:in `measure'\r\nE, [2018-07-30T15:37:01.720493 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/test-kitchen-1.22.0/lib/kitchen/instance.rb:497:in `action'\r\nE, [2018-07-30T15:37:01.720527 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/test-kitchen-1.22.0/lib/kitchen/instance.rb:389:in `converge_action'\r\nE, [2018-07-30T15:37:01.720561 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/test-kitchen-1.22.0/lib/kitchen/instance.rb:368:in `block in transition_to'\r\nE, [2018-07-30T15:37:01.720603 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/test-kitchen-1.22.0/lib/kitchen/instance.rb:367:in `each'\r\nE, [2018-07-30T15:37:01.720639 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/test-kitchen-1.22.0/lib/kitchen/instance.rb:367:in `transition_to'\r\nE, [2018-07-30T15:37:01.720673 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/test-kitchen-1.22.0/lib/kitchen/instance.rb:135:in `converge'\r\nE, [2018-07-30T15:37:01.720707 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/test-kitchen-1.22.0/lib/kitchen/command.rb:197:in `public_send'\r\nE, [2018-07-30T15:37:01.720741 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/test-kitchen-1.22.0/lib/kitchen/command.rb:197:in `run_action_in_thread'\r\nE, [2018-07-30T15:37:01.720776 #15338] ERROR -- default-aws: /Users/davide/wip/docker-build/workspace/modules/database/rds/rds-master/vendor/bundle/ruby/2.4.0/gems/test-kitchen-1.22.0/lib/kitchen/command.rb:169:in `block (2 levels) in run_action'\r\nE, [2018-07-30T15:37:01.720810 #15338] ERROR -- default-aws: ----End Backtrace-----\r\n```\r\n\r\nThe same happened with an `ElastiCache` module, still failing at 11m20s mark. For more context, find below the files used for this test:\r\n\r\n### kitchen.yml\r\n\r\n```yml\r\n---\r\ndriver:\r\n  name: \"terraform\"\r\n  root_module_directory: \"test/test_fixture\"\r\n\r\nprovisioner:\r\n  name: \"terraform\"\r\n\r\nplatforms:\r\n  - name: \"aws\"\r\n\r\nverifier:\r\n  name: \"awspec\"\r\n\r\nsuites:\r\n  - name: \"default\"\r\n```\r\n\r\n### module.tf\r\n\r\n```hcl\r\nresource \"aws_db_instance\" \"rds\" {\r\n  identifier = \"${var.environment}-${var.service}-${var.engine}-master\"\r\n\r\n  engine         = \"${var.engine}\"\r\n  engine_version = \"${var.engine_version}\"\r\n  instance_class = \"${var.instance_class}\"\r\n\r\n  storage_type      = \"${var.storage_type}\"\r\n  allocated_storage = \"${var.allocated_storage}\"\r\n\r\n  iops = \"${var.storage_type == \"io1\" ?\r\n    var.iops != 0 ?\r\n      var.iops :\r\n      var.allocated_storage * 50 :\r\n    0\r\n  }\"\r\n\r\n  name     = \"${var.db_name}\"\r\n  username = \"${var.db_username}\"\r\n  password = \"${var.db_password}\"\r\n  port     = \"${var.db_port}\"\r\n\r\n  vpc_security_group_ids = [\"${var.vpc_security_group_ids}\"]\r\n  db_subnet_group_name   = \"${var.subnet_group_name}\"\r\n  parameter_group_name   = \"${var.parameter_group_name}\"\r\n\r\n  multi_az            = \"${var.is_multi_az}\"\r\n  publicly_accessible = \"${var.is_publicly_accessible}\"\r\n\r\n  allow_major_version_upgrade = \"${var.allow_major_version_upgrade}\"\r\n  auto_minor_version_upgrade  = \"${var.auto_minor_version_upgrade}\"\r\n  apply_immediately           = \"${var.apply_immediately}\"\r\n  maintenance_window          = \"${var.maintenance_window}\"\r\n\r\n  final_snapshot_identifier = \"${var.environment}-${var.service}-${var.engine}-master-${md5(timestamp())}\"\r\n\r\n  backup_retention_period = \"${var.backup_retention_period}\"\r\n  backup_window           = \"${var.backup_window}\"\r\n\r\n  tags = \"${\r\n    merge(\r\n      map(\"Name\", format(\"%s-%s-%s-master\", var.environment, var.service, var.engine)),\r\n      map(\"Environment\", var.environment),\r\n      map(\"Service\", var.service),\r\n      map(\"Description\", var.description),\r\n      var.tags\r\n    )\r\n  }\"\r\n}\r\n```\r\n\r\n### test/test_fixture/main.tf\r\n\r\n```hcl\r\nprovider \"aws\" {\r\n  region = \"us-east-1\"\r\n}\r\n\r\nmodule \"rds-master\" {\r\n  source         = \"../../\"\r\n  environment    = \"test\"\r\n  service        = \"kitchen\"\r\n  engine         = \"postgres\"\r\n  engine_version = \"9.3\"\r\n  db_username    = \"test\"\r\n  db_password    = \"password\"\r\n  db_port        = 5432\r\n}\r\n```\r\n\r\nJust FYI if I run this `test/test_fixture/main.tf` file using terraform commands (`init`, `plan` and `apply`) works like a charm.\r\n\r\nAny help would be greatly appreciated. Thanks in advance 🙂 "},"comment":{"url":"https://api.github.com/repos/newcontext-oss/kitchen-terraform/issues/comments/408893156","html_url":"https://github.com/newcontext-oss/kitchen-terraform/issues/255#issuecomment-408893156","issue_url":"https://api.github.com/repos/newcontext-oss/kitchen-terraform/issues/255","id":408893156,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODg5MzE1Ng==","user":{"login":"darkraiden","id":8956107,"node_id":"MDQ6VXNlcjg5NTYxMDc=","avatar_url":"https://avatars0.githubusercontent.com/u/8956107?v=4","gravatar_id":"","url":"https://api.github.com/users/darkraiden","html_url":"https://github.com/darkraiden","followers_url":"https://api.github.com/users/darkraiden/followers","following_url":"https://api.github.com/users/darkraiden/following{/other_user}","gists_url":"https://api.github.com/users/darkraiden/gists{/gist_id}","starred_url":"https://api.github.com/users/darkraiden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkraiden/subscriptions","organizations_url":"https://api.github.com/users/darkraiden/orgs","repos_url":"https://api.github.com/users/darkraiden/repos","events_url":"https://api.github.com/users/darkraiden/events{/privacy}","received_events_url":"https://api.github.com/users/darkraiden/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T14:57:13Z","updated_at":"2018-07-30T14:57:13Z","author_association":"NONE","body":"Thanks for replying so quickly. I imagined it might have been a timeout issue but couldn't find any reference to it. That's brilliant, I'll give it a go and let you know whether it works. Cheers"}}
{"actor":{"display_login":"darkraiden"}}