Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 22 22:21

    aaron-lane on v6.1.0

    (compare)

  • Jan 22 22:19

    aaron-lane on master

    6.1.0 (#468) * Add support for… (compare)

  • Jan 22 22:19

    aaron-lane on aaron-lane-6.1.0

    (compare)

  • Jan 22 22:19
    aaron-lane closed #468
  • Jan 22 22:19
    aaron-lane closed #467
  • Jan 22 22:19
    aaron-lane edited #468
  • Jan 22 22:18
    aaron-lane ready_for_review #468
  • Jan 22 22:17
    aaron-lane closed #397
  • Jan 22 22:15
    aaron-lane closed #355
  • Jan 22 22:09
    aaron-lane synchronize #468
  • Jan 22 22:09

    aaron-lane on aaron-lane-6.1.0

    Remove obsolete Travis CI refer… Update tty-which to ~> 0.5.0 Update bundle binstub and 2 more (compare)

  • Jan 22 21:44

    aaron-lane on master

    Create codeql-analysis.yml (compare)

  • Jan 22 21:42
    aaron-lane opened #468
  • Jan 22 21:41

    aaron-lane on aaron-lane-6.1.0

    Add support for Terraform >= 1.… Add entry for 6.1.0 Add Codespaces configuration (compare)

  • Jan 19 16:16
    aaron-lane commented #467
  • Jan 19 10:54
    jkroepke commented #467
  • Jan 04 16:09
    aaron-lane closed #464
  • Jan 04 16:05
    aaron-lane labeled #467
  • Jan 04 16:05
    aaron-lane labeled #467
  • Dec 30 2021 21:16
    tbugfinder commented #464
Brian G. Shacklett
@bgshacklett
One thing that's interesting about that gem is that it has a runtime dependancy on https://rubygems.org/gems/license-acceptance. While I've never seen a request to accept a license when installing, that is a bit concerning.
Purple90
@Purple90
I just wanted to see if I am doing something wrong. I am running through the tutorial here - https://newcontext-oss.github.io/kitchen-terraform/getting_started.html and the tests are failing at the last step.
  ×  file_check: File .kitchen/kitchen-terraform/kt-suite-terraform/foobar
     ×  File .kitchen/kitchen-terraform/kt-suite-terraform/foobar should exist
     expected File .kitchen/kitchen-terraform/kt-suite-terraform/foobar to exist
I do see foobar, but it is here
test/fixtures/tf_module/foobar
Jeff
@jeffcampbell
Anyone using kitchen-terraform with GCP? I am wondering if it always creates a new project when switching to a new workspace. Due to the nature of our terraform implementation we are strict with our resourcemanager.projectCreator roles. data.terraform_remote_state.organization: Refreshing state... google_project.project: Creating...
Aaron Lane
@aaron-lane
@Purple90 oh no, the tutorial may be out of date 😥thanks for pointing that out
@jeffcampbell 👋we spoke out of band, but for the benefit of the rest of the group, the use of workspaces means that all resources in the graph of the root_module_directory will be created specifically for the Kitchen Terraform instance
Edward Bartholomew
@edwardbartholomew
I have proposed writing an article for Azure docs regarding terraform testing with kitchen-terraform thumbs up appreciated: MicrosoftDocs/azure-docs#38222
Aaron Lane
@aaron-lane
Already done!
alepeltier
@alepeltier

Hello All,

Is there a way to mock remote states in kitchen or does the remote state file need to exist before hand ?

For example, I've got a brand new environment which I'm trying to test my code against. I haven't run an apply in this environment yet and I get the following Terraform error when running "kitchen test"

Error: Unable to find remote state

     on data.tf line 4, in data "terraform_remote_state" "eks":
      4: data "terraform_remote_state" "eks" {

   No stored state was found for the given workspace in the given backend.


   Error: Unable to find remote state

     on data.tf line 25, in data "terraform_remote_state" "vpc":
     25: data "terraform_remote_state" "vpc" {
alepeltier
@alepeltier
Ah actually never mind I see that kitchen converge will create a test environment in AWS for me so I'll need the VPC and EKS states to be there beforehand.
On another point, any idea when terraform 12 will be supported?
Aaron Lane
@aaron-lane
@alepeltier Terraform 0.12 has been supported since Kitchen-Terraform 4.9.0 back on 2019-05-27 :D
Aaron Lane
@aaron-lane
Regarding remote state, Kitchen-Terraform was designed with the intent of testing individual modules, rather than environment configurations which leverage remote state. It's certainly possible to use remote state, but there are some changes needed to make this efficient. newcontext-oss/kitchen-terraform#348 comes to mind
alepeltier
@alepeltier

@aaron-lane Thank you for the reply sorry it's taken me so long to get back to you.

I'm glad tf 12 is supported I'll get that installed right away. I'll have a look at how we can use kitchen Terraform within our environment even if we have to do specific module testing for the time being it is better than nothing.

I'll also keep an eye on that git issue hopefully it is something that can be accommodated in future releases.
Aaron Lane
@aaron-lane
@alepeltier if you have any information you can share about your use case of testing configurations more complex than individual modules, please do so on a GitHub issue. I think it would be valuable for Kitchen-Terraform to be able to easily support more than one testing pattern
alepeltier
@alepeltier
@aaron-lane no worries I've had to put it on the back burner for a bit but once I pick it up I'll feed in our use case.
Edward Bartholomew
@edwardbartholomew
Was trying to update a tutorial or two but having a beast of a time trying to get middleman working even tried Docker images to no avail. Does middleman run as part of the build process or should the generated files be in the PR?
Aaron Lane
@aaron-lane
The generated files should be part of the pull request, but I'd really like to migrate to the format natively supported by GitHub Sites
Annie Hedgpeth
@anniehedgie_twitter
Hi, I see that I can use winrm as a backend, but I can't seem to get it to work with password authentication. Just wanted to confirm that password auth is enabled for winrm and not just ssl.
Annie Hedgpeth
@anniehedgie_twitter
I just found this comment about connections through InSpec - https://github.com/newcontext-oss/kitchen-terraform/issues/317#issuecomment-454264007. I'll troubleshoot that I can connect through InSpec.
Annie Hedgpeth
@anniehedgie_twitter
I can connect with an inspec exec so I guess I'll keep plugging trying different things in the kitchen.yml.
Annie Hedgpeth
@anniehedgie_twitter
Edward Bartholomew
@edwardbartholomew
Is anyone using Terraform variables in their Inspec tests as introduced in 4.8.0? Seems to only work through "variables" in kitchen.yml and not "variable_files" ... Not sure if that's expected from the wording of the CHANGELOG though (https://github.com/newcontext-oss/kitchen-terraform/blob/master/CHANGELOG.md#480---2019-04-14)
Aaron Lane
@aaron-lane
That is expected! I've been wary of doing any state inspection to derive values so it only works for the variables defined in the Kitchen configuration file
I think I should just parse the state and make things much easier
Edward Bartholomew
@edwardbartholomew
Thank you for confirmation of being expected. I just wanted to make sure it was me and not the code :) I had started to dig into the source code but got distracted and never returned to it. I think it's fine as-is, but if output is from statefile too, then might be more consistent approach?
Edward Bartholomew
@edwardbartholomew
#378 my documentation PR still stuck on a failing test, not quite sure how to troubleshoot.
Aaron Lane
@aaron-lane
The outputs are from the output command. I have not checked lately if there is a command to display the variable values in a parsable format
Edward Bartholomew
@edwardbartholomew
I don't see any tf command after checking the docs!
Aaron Lane
@aaron-lane
@edwardbartholomew I'm at a resort with very poor WiFi. I'll have to check your tutorial in the new year 😬
@anniehedgie_twitter I'll also try to get some solutions for your issues in the new year as well
Edward Bartholomew
@edwardbartholomew
@aaron-lane Thanks for the update, enjoy your resort, and happy new year!!!
Aaron Lane
@aaron-lane
🎇🎆
Saul Jaramillo
@describeme
hey guys, does any body know if there is any way to skip terraform apply for workspaces other than the default while running test-kitchen (converge, verify) commands
i want to apply the default workspace and then just run tests on it not create an additional workspace that duplicates the infrastructure and run tests on it
Aaron Lane
@aaron-lane
Hey @describeme! #348 tracks a request for that behaviour. Please add any additional information you think could be useful
Aaron Lane
@aaron-lane
Aaron Lane
@aaron-lane
v5.30 has been released!
Josef
@tbugfinder
Meanwhile I've added kitchen-terraform to multiple modules (e.g. vpc, ec2, iam, ...). Usually those modules are integrated into an infrastructure stack. Within inf-stack testing I ended up duplicating parts of the test of modules. Now I'm looking for a decent approach of sharing that inspec test code between modules and module consumers. Any thoughts or links I could start with?
Aaron Lane
@aaron-lane
@tbugfinder you can use the verifier.systems[x].profile_locations attribute to reference remote InSpec profiles
Josef
@tbugfinder
@aaron-lane that looks promising as it also supports git as a source (as per inspec doc). I'll test this and maybe also check what's possible with include_controls.
Josef
@tbugfinder
@aaron-lane I have some difficulties in finding profile_locations within rubydoc.info. Should it be in ConfigAttribute/Systems?
Aaron Lane
@aaron-lane
@tbugfinder sorry to miss your message! Looks like the documentation for profile_locations didn't upload for some reason. An other reason to get off of rubydoc.info. You can find the description here: https://www.github.com/newcontext-oss/kitchen-terraform/tree/master/lib%2Fkitchen%2Fterraform%2Fconfig_schemas%2Fsystem.rb
Mike Delaney
@madelaney
WIth kitchen-terraform@5.2, is there a way for me to pin the version of azurerm / random that is used during the tests? For example the latest version of azurerm is 2.8.0 but I want to use 1.43.0. Is that possible?
Aaron Lane
@aaron-lane
@madelaney yes, you can do that independently of Kitchen-Terraform. Providers can be pinned with the version argument
You can invoke the module under test with a configuration that pins provider versions and use that configuration as the driver's root_module_directory