# Configure the Chef provider
provider "chef" {
server_url = "https://https://api.chef.io/organizations/MYORG/"
# You can set up a "Client" within the Chef Server management console.
client_name = "terraform"
key_material = "${file("chef-terraform.pem")}"
}
# Create a Chef Environment
resource "chef_environment" "tf_production" {
name = "tf_production"
}
# Create a Chef Role
resource "chef_role" "app_server" {
name = "app_server"
run_list = [
"recipe[terraform]",
]
}
Debug Output
Panic Output
Expected Behavior
$ terraform init
Initializing the backend...
Initializing provider plugins...
The following providers do not have any version constraints in configuration,
so the latest version was installed.
To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.
* provider.chef: version = "~> 0.1"
Terraform has been successfully initialized!
...
Actual Behavior
$ terraform init
Initializing the backend...
Initializing provider plugins...
- Checking for available provider plugins...
No available provider "chef" plugins are compatible with this Terraform version.
From time to time, new Terraform major releases can change the requirements for
plugins such that older plugins become incompatible.
Terraform checked all of the plugin versions matching the given constraint:
(any version)
Unfortunately, none of the suitable versions are compatible with this version
of Terraform. If you have recently upgraded Terraform, it may be necessary to
move to a newer major release of this provider. Alternatively, if you are
attempting to upgrade the provider to a new major version you may need to
also upgrade Terraform to support the new version.
Consult the documentation for this provider for more information on
compatibility between provider versions and Terraform versions.
Error: no available version is compatible with this version of Terraform
Steps to Reproduce
terraform init
Important Factoids
If I run terraform init on terraform v0.10.8, it will install the chef plugin. Subsequent runs of terraform init on terraform v0.12.2 appear to pick up the installed plugin. I have not tested whether the plugin is actually compatible yet, though.
Terraform Version
0.12.2
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform init
Important Factoids
If I run
terraform init
on terraform v0.10.8, it will install the chef plugin. Subsequent runs ofterraform init
on terraform v0.12.2 appear to pick up the installed plugin. I have not tested whether the plugin is actually compatible yet, though.References