Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 23 14:36
    aaron-lane commented #464
  • Sep 23 07:20
    rubans commented #464
  • Sep 22 08:07
    rubans commented #464
  • Sep 21 20:55
    aaron-lane commented #464
  • Sep 21 20:48
    aaron-lane commented #464
  • Sep 21 15:04
    rubans commented #464
  • Sep 21 14:45
    aaron-lane commented #464
  • Sep 21 14:43
    aaron-lane labeled #464
  • Sep 21 12:14
    rubans opened #464
  • Sep 15 20:04
    aaron-lane labeled #463
  • Sep 15 20:04
    aaron-lane labeled #463
  • Sep 15 16:43
    mjmenger opened #463
  • Aug 13 18:12
    aaron-lane closed #425
  • Jul 22 07:47
    navin70 closed #462
  • Jul 22 07:47
    navin70 commented #462
  • Jul 21 14:23
    aaron-lane commented #462
  • Jul 21 14:19
    aaron-lane labeled #462
  • Jul 21 14:19
    aaron-lane labeled #462
  • Jul 21 08:10
    navin70 opened #462
  • Jul 12 14:56
    aaron-lane labeled #461
James DeHart
@jamesdehart
it seems this variable is set pulling the output from the terraform outputs.tf file but where is the attribute defined? Is that InSpec or Kitchen-Terraform?
Aaron Lane
@aaron-lane
@madelaney not one that I'm aware of, but it's really independent of Kitchen-Terraform, other than setting the root module directory. The root module invoke the module under test along with pinned providers
@describeme Kitchen-Terraform automatically defines InSpec attributes equivalent to the Terraform outputs
tbugfinder
@tbugfinder
How could different logfiled be configured for verify and destroy cycles? My default-aws.log is always overwritten...
tbugfinder
@tbugfinder
And, is it possible to log inspec output also to a file?
Aaron Lane
@aaron-lane
@tbugfinder kitchen may support overriding the log file, but I've never checked. Is
Is the InSpec output not showing in the Kitchen log file?
Aaron Lane
@aaron-lane
Kitchen-Terraform 5.5.0 has been released, with support for Terraform 0.13! https://rubygems.org/gems/kitchen-terraform/versions/5.5.0
tbugfinder
@tbugfinder
Hi, I'm wondering if anybody tried using input*, output* while using module count? I didn't yet, however my understanding is that kitchen-terraform would provide only a single instance of those kv pairs.
tbugfinder
@tbugfinder
Interesting, it's an array and just works.
Hi, next question. While using outputs within a control as input I noticed that keys get prefixed with a ':' which I don't get if the input is loaded from a yml file. @aaron-lane any clue what's going on here?
tbugfinder
@tbugfinder
Fixed by using symbolized keys in my yaml.
Aaron Lane
@aaron-lane
@tbugfinder I'm glad both of those issues were resolved 😅
James Clarke
@jamesp22_gitlab
Hey, is anyone able to help with this - https://stackoverflow.com/questions/64536441/using-terraform-output-in-kitchen-terraform-tests I cant seem to get my terraform outputs to be usable in my tests.
tbugfinder
@tbugfinder
Hi @jamesp22_gitlab , did you try using output_ prefix? It's all setup by kitchen Terraform without mangling around inspec.yml.
I'd also recommend using "new" input() instead of attributes.
James Clarke
@jamesp22_gitlab
Hey, @tbugfinder is there any actual documentation for this/examples of it working? most of what I can find is years old and not relevant, or not clearly explained.
Like, Im not sure were to declare the terraform output? In output.tf in the root, in main.tf in the test/integrations/tf_module, or does there need to be a output.tf there aswell? not entirely sure. Ive tried adding attrs_outputs: to .kitchenyaml and it comes up with - Resolving the system attributes from outputs failed due to the absence of the 'gcloud_project' key from the Terraform outputs in the Kitchen instance state.
tbugfinder
@tbugfinder
Hi @jamesp22_gitlab , hm
Actually I've looked at the PR which added the feature. The output has to be part of the fixture output which could pass all module outputs.
Maybe we should add aPR to docs then.
James Clarke
@jamesp22_gitlab
so does it go in the main.tf in test/integrations/tf_module, or a seperate output.tf file?
Id love to see a working example ha, im sure im just missing something stupid.
tbugfinder
@tbugfinder
I'll create a sample
Just noticed there's already something.
tbugfinder
@tbugfinder
Hi @jamesp22_gitlab Let me know if this code explains it better. https://github.com/tbugfinder/kttfsample
tbugfinder
@tbugfinder
Is there any specific configuration needed in kitchen.yml so that kitchen-terraform loads inspec profiles?
tbugfinder
@tbugfinder
Actually I don't think so 👻
Aaron Lane
@aaron-lane
Nope, but you can specify alternative profiles if you're not using local profiles under test/integration
tbugfinder
@tbugfinder
Hi, I'm wondering if a second verify run should actually also run terraform apply, or if this is by design only executed once?
Aaron Lane
@aaron-lane
That is by design. Kitchen is implemented as a state machine and the commands are cumulative, so when you run verify the first time it implicitly includes converge, but the second time the Kitchen instance is already converged so verify only verifies
@tbugfinder
Aaron Lane
@aaron-lane
@/all v5.6.0 has been released with support for Terraform 0.14.0 🎉
tbugfinder
@tbugfinder
Thank you 👍👍
HAMMOUT
@jhammout
Hello, I'm wondering if i can use kitchen with terragrunt and how?
tbugfinder
@tbugfinder
Hi @jhammout I'm not a terragrunt user but rather a "follower". I think it should be possible given that kitchen-terraform supports lifecycle hooks. So terragrunt would manage the "module code" and kitchen-terraform+terraform the test/fixture. Should terragrunt also manage the test/fixture terraform files or can those be rather static for any terragrunt environment?
Wouldn't you use terratest in terragrunt space?
Aaron Lane
@aaron-lane
@jhammout sorry for the late reply; Gitter for Android seems to have notifications 🤷 you can use the client attribute on the driver configuration to point to a Terragrunt binary rather than a Terraform binary. We actually test using Terragrunt in one of the scenarios to check compatibility
s/have/hate
Aaron Lane
@aaron-lane
v5.7.0 has been released with support for InSpec plugins. Big thanks to @tbugfinder for the implementation!
laboDiabo
@laboDiabo
Hi everyone, first of all thanks for the work on Kitchen-Terraform
Currently implementing it in our process :)
had a question about Terragrunt but I see @aaron-lane already commented something on this. Checking the use of "client" attribute.
@jhammout were you able to implement this?
Aaron Lane
@aaron-lane
v5.8.0 has been released with support for Terraform 0.15!
tbugfinder
@tbugfinder
Thank you @aaron-lane - this release directly enabled us to move on with Terraform 1.0.0 🎉
Aaron Lane
@aaron-lane
@tbugfinder you're welcome!
TheSpartan1980
@TheSpartan1980
Hi everyone
Does anyone have an example of using Docker with kitchen-terraform? I tried using the tutorial here: https://newcontext-oss.github.io/kitchen-terraform/tutorials/docker_provider.html, however I know a lot has changed. I'm using Terraform 0.13.7, kitchen-terraform 5.8.0 (Ruby 2.7.3).
Aaron Lane
@aaron-lane
@TheSpartan1980 we also have a test case that uses the Docker provider: https://github.com/newcontext-oss/kitchen-terraform/tree/master/test%2Fterraform%2Fbackend-ssh
It's configured with the backend-ssh suite: https://www.github.com/newcontext-oss/kitchen-terraform/tree/master/kitchen.yml. Was there a specific issue that you're facing?
2 replies
Aaron Lane
@aaron-lane
@TheSpartan1980 great to hear :dancer: You may also be interested in the experimental terraform test command that is available as of Terraform v0.15: https://www.terraform.io/docs/language/modules/testing-experiment.html
1 reply