feat: add a required_providers version constraintΒ #73
Closed
Description
Feature Request
Describe the Feature Request
A user should be able to know the minimum version of the AWS provider that they need to be able to run any given version of this module.
Describe Preferred Solution
Use the required_providers
block to set a minimum AWS provider version constraint.
For example, I notice that the multi_region
attribute in the KMS key being created here requires version 3.64.0 or higher. It would be a better user experience if Terraform could call out this version constraint specifically, rather than letting a plan/apply
fail when the constraint isn't met, as seen below.
Additional Context
$ terraform version
Terraform v0.14.11
+ provider registry.terraform.io/hashicorp/aws v3.57.0
$ terraform plan
Releasing state lock. This may take a few moments...
Error: Unsupported argument
on .terraform/modules/some_module.lacework_aws_cloudtrail/main.tf line 40, in resource "aws_kms_key" "lacework_kms_key":
40: multi_region = var.kms_key_multi_region
An argument named "multi_region" is not expected here.