Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a required_providers version constraint #73

Closed
jrobison-sb opened this issue Mar 3, 2022 · 1 comment · Fixed by #74
Closed

feat: add a required_providers version constraint #73

jrobison-sb opened this issue Mar 3, 2022 · 1 comment · Fixed by #74
Assignees
Labels
bug Something isn't working

Comments

@jrobison-sb
Copy link

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.
@afiune afiune self-assigned this Mar 3, 2022
@afiune afiune added the bug Something isn't working label Mar 3, 2022
@afiune
Copy link
Contributor

afiune commented Mar 3, 2022

Hi @jrobison-sb 👋🏽 - Thank you so much for your feedback and apologies that you are experiencing some difficulties with this module.

We will fix this bug ASAP and release a new version of the module.

afiune added a commit that referenced this issue Mar 3, 2022
The `multi_region` attribute in the KMS key was created in version
3.64.0, we should pin the version of the aws provider to be major than
that version.

hashicorp/terraform-provider-aws#20533

Closes #73

Signed-off-by: Salim Afiune Maya <[email protected]>
@afiune afiune closed this as completed in #74 Mar 3, 2022
afiune added a commit that referenced this issue Mar 3, 2022
The `multi_region` attribute in the KMS key was created in version
3.64.0, we should pin the version of the aws provider to be major than
that version.

hashicorp/terraform-provider-aws#20533

Closes #73

Signed-off-by: Salim Afiune Maya <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants