Controlling the version of terraform provider
Add version argument in the provider block of terraform init to control the terraform provider from automatic version upgrades.
The value of the version can be a single version or a range of versions. You can use the following formats to specify a range of versions:
>= 1.0.0- Versions greater than or equal to the 1.0.0.<= 1.0.0- Versions lesser than or equal to 1.0.0.>= 1.0.0, <= 2.0.0- This includes all versions between 1.0.0 and version number 2.0.0~> 1.0.0- Any non-beta version greater than or equal to 1.0.0 and lesser than or equal to 1.1.0.~> 1.1- Any non beta version greater than equal to 1.1.0 and lesser than 2.0
Example:
provider "aws" {
version = "~> 1.0"
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
region = "${var.aws_region}"
}