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

fix: Invalid value for "replace" parameter: argument must not be null. #2322

Merged
merged 1 commit into from
Dec 7, 2022

Conversation

andpozo
Copy link
Contributor

@andpozo andpozo commented Dec 7, 2022

Description

replace function doesn't accept null as replacement value

Motivation and Context

cause an issue when you try to use module.eks.oidc_provider it always be null

$ tf console
Acquiring state lock. This may take a few moments...
> replace("https://test.com.ar", "https://", null)
│
│ Error: Invalid function argument
│
│   on <console-input> line 1:
│   (source code not available)
│
│ Invalid value for "replace" parameter: argument must not be null.
╵

# wrapped inside `try` function it always be null
> try(replace("https://test.com.ar", "https://", null), null)
null
> try(replace("https://test.com.ar", "https://", ""), null)
"test.com.ar"

Breaking Changes

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

@andpozo andpozo changed the title Fix: Invalid value for "replace" parameter: argument must not be null. fix: Invalid value for "replace" parameter: argument must not be null. Dec 7, 2022
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 for catching this - looks like this change was made inadvertently

value = try(replace(aws_eks_cluster.this[0].identity[0].oidc[0].issuer, "https://", ""), "")

@bryantbiggs bryantbiggs merged commit 9adc475 into terraform-aws-modules:master Dec 7, 2022
antonbabenko pushed a commit that referenced this pull request Dec 7, 2022
### [19.0.3](v19.0.2...v19.0.3) (2022-12-07)

### Bug Fixes

* Invalid value for "replace" parameter: argument must not be null. ([#2322](#2322)) ([9adc475](9adc475))
@antonbabenko
Copy link
Member

This PR is included in version 19.0.3 🎉

spr-mweber3 pushed a commit to spring-media/terraform-aws-eks that referenced this pull request Jan 4, 2023
spr-mweber3 pushed a commit to spring-media/terraform-aws-eks that referenced this pull request Jan 4, 2023
@github-actions
Copy link

github-actions bot commented Jan 6, 2023

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 Jan 6, 2023
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