Installs Terraform by Mitchell Hashimoto (@mitchellh).
Terraform is an open source tool that allows you to configure entire infrastructure stack as code.
This cookbook depends on the ark cookbook and build-essential.
The following platforms are supported and have been tested under Test Kitchen:
- CentOS 6.7
- CentOS 7.2
- Debian 8.6
- Fedora 25
- Ubuntu 14.04
- Ubuntu 15.10
- Ubuntu 16.10
Other versions of these OSs should work. Alternative Debian and RHEL family distributions are also assumed to work. Please report any additional platforms you have tested so they can be added.
Simply include recipe[terraform]
in your run_list to have
Terraform installed. If you are using an artifact repository, like Nexus, hosted behind your corporate firewall, you must set the default attribute or override attributes in your roles or environments. The attributes are detailed velow.
Installs Terraform from official pre-compiled binaries.
Installs ruby-gpgme gem
If you are using an artifact repository, like Nexus, hosted behind your corporate firewall, you must set the default attribute or override attributes in your roles or environments.
Default: https://releases.hashicorp.com/terraform
The version of Terraform that will be installed (Default: 0.8.2)
As of v0.4.1, checksums are processed dynamically. There is no longer a need to specify the sha256 checksums of each terraform package in a cookbook attribute manually
_As of v1.0.0, the checksum file will have its gpg signature verified. If the gpg signature is rejected, the chef run will fail.
NOTE: All other attributes are considered internal and shouldn't normally need to be changed.
{
"name": "terraform_workstation",
"description": "Role to apply onto a terraform workstation",
"json_class": "Chef::Role",
"default_attributes": {
"terraform": {
"url_base": "https://nexus.internal.com/nexus",
"version": "0.8.2"
}
},
"override_attributes": {},
"run_list": [
"recipe[terraform]"
]
}
- Source hosted at GitHub
- Report issues/questions/feature requests on GitHub Issues
Pull requests are very welcome! Ideally create a topic branch for every separate change you make.
This cookbook uses ChefSpec for unit tests. I also use Food
Critic and RuboCop to check for style issues.
When contributing it would be very helpful if you could run these via
bundle exec spec
and bundle exec style
.
Lastly, there are Serverspec integration tests for
use with Test Kitchen. To see all of the available
integration test suites just check bundle exec rake T
or bundle exec kitchen list
. It would be great if you could run these tests too, you
may however leave out the Amazon Linux test suite if you do not have
an AWS account as it runs on an EC2 instance (you will be billed for
running this).
This cookbook, especially the checksum stuff in attributes file has been influenced by the Packer cookbook by @sit.
Author:: Ross Timson <[email protected]>
Contributor:: Dang Nguyen <[email protected]>
Copyright 2014, Ross Timson
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.