-
Notifications
You must be signed in to change notification settings - Fork 17
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
Use aws_s3_object instead of aws_s3_bucket_object #821
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would be a good idea to add a required_providers
block to the terraform module so we can pin the minimum supported version of the AWS provider. I'm actually a little surprised that it works without that.
NISAR has: terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
null = {
source = "hashicorp/null"
version = "~> 2.1"
}
}
} Should I just duplicate that here? Well, actually, I cut out a couple things that were in https://github.com/asfadmin/CIRRUS-NISAR/blob/master/workflows/nisar/provider.tf. |
You should only include the providers that the module actually needs and you should use |
@@ -11,7 +11,6 @@ | |||
|
|||
# Tools | |||
.terraform | |||
/terraform/providers.tf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol, why was that in there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hah I don't know. I was hoping to find some discussion in the PR that brought that in. Couldn't find the reason.
terraform/providers.tf
Outdated
version = ">= 5.0" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing newline
terraform/providers.tf
Outdated
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 5.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't the minimum. I just checked a random 4.x version and 4.63 has the aws_s3_object
already. So you can go down at least to that.
You should find the lowest version that has that resource. I would do it through trial and error using this page and selecting the version from the version dropdown:
https://registry.terraform.io/providers/hashicorp/aws/4.63.0/docs/resources/s3_bucket_object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like 4.0 introduced it.
6125c91
to
d0c2d3c
Compare
Closes #801