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

docs: Remove the invalid provider argument from the oidc_providers variable description #452

Merged

Conversation

AndrewCharlesHay
Copy link
Contributor

@AndrewCharlesHay AndrewCharlesHay commented Jan 16, 2024

Description

The provider attribute is never accessed and thus shouldn't be listed. It also changes the type of oidc_providers from any to a map(any) because it is a map.

Motivation and Context

It clutters the requirements for the variable and thus should be removed

Breaking Changes

If someone used to pass something into oidc_providers it will now throw an error at an earlier stage of validation

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@AndrewCharlesHay AndrewCharlesHay changed the title fix: removed provider from list of attribute of oidc_providers fix: Removed provider from list of attribute of oidc_providers Jan 16, 2024
@AndrewCharlesHay
Copy link
Contributor Author

I didn't mean to commit the SID addition to this PR. I can make a new PR if you want.

@bryantbiggs bryantbiggs changed the title fix: Removed provider from list of attribute of oidc_providers docs: Remove the invalid provider argument from the oidc_providers variable description Jan 16, 2024
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

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

thank you

@bryantbiggs bryantbiggs merged commit 814b8e6 into terraform-aws-modules:master Jan 16, 2024
36 checks passed
@AndrewCharlesHay AndrewCharlesHay deleted the docs/remove-provider branch January 16, 2024 21:04
@AndrewCharlesHay
Copy link
Contributor Author

@bryantbiggs Thank you for the merge! I understand if you want them in a separate PR. But what is wrong with changing the type to map(any) instead of just any?

@bryantbiggs
Copy link
Member

when you go with a type, other than any, you are forcing users into using the same shape on every input. so for example, if you had something like the following that was acceptable for use by the underlying resource, if you used any it will work, if you used map(any), it will complain that the objects are of different types (one has colors and the other does not):

  foo = {
    one = {
      hot = true
      cups = 2
      colors = ["orange", "blue"]
    }
    two = {
      hot = false
      cups = 1
    }
  }

So we typically just default to any for complex types so that users have the most flexibility and can provide only the values they wish

@AndrewCharlesHay
Copy link
Contributor Author

AndrewCharlesHay commented Jan 16, 2024

Ohh yeah I've run into that before. But we would want to ensure that every object has just provider_arn and namespace_service_accounts right?

@AndrewCharlesHay
Copy link
Contributor Author

Both attributes are referenced in each iteration so we need both and wouldn't want anything else right? I guess it would somewhat unnecessarily make things not backwards compatible.

@antonbabenko
Copy link
Member

This PR is included in version 5.33.1 🎉

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants