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

Properly type the default replication filter object #96

Merged
merged 4 commits into from
Jul 6, 2021
Merged

Properly type the default replication filter object #96

merged 4 commits into from
Jul 6, 2021

Conversation

alexjurkiewicz
Copy link
Contributor

I think this error was introduced during some rewriting in #93.

@alexjurkiewicz alexjurkiewicz requested review from a team as code owners June 30, 2021 06:30
@alexjurkiewicz alexjurkiewicz requested review from Gowiem and woz5999 June 30, 2021 06:30
@alexjurkiewicz
Copy link
Contributor Author

Here's the error source: https://github.com/cloudposse/terraform-aws-s3-bucket/pull/93/files#diff-dc46acf24afd63ef8c556b77c126ccc6e578bc87e3aa09a931f33d9bf2532fbbR197

btw, this causes errors like

Error: Inconsistent conditional result types

  on .terraform/modules/my_bucket/main.tf line 197, in resource "aws_s3_bucket" "default":
 197:             for_each = try(rules.value.filter, null) == null ? ["empty"] : [rules.value.filter]
    |----------------
    | rules.value.filter is object with no attributes

The true and false result expressions must have consistent types. The given
expressions are tuple and tuple, respectively.

Copy link
Member

@korenyoni korenyoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but let's leave the try block in for filter.value.tags

main.tf Outdated Show resolved Hide resolved
main.tf Outdated Show resolved Hide resolved
@mergify mergify bot dismissed korenyoni’s stale review July 6, 2021 05:04

This Pull Request has been updated, so we're dismissing all reviews.

@korenyoni
Copy link
Member

/test all

Copy link
Member

@korenyoni korenyoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@korenyoni korenyoni merged commit 8aed497 into cloudposse:master Jul 6, 2021
@korenyoni korenyoni added the bug 🐛 An issue with the system label Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants