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: adjust default value for custom headers variable #47

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

RoseSecurity
Copy link
Contributor

what

  • The default custom header is currently an empty string which fails the following provider validation:
	"custom_headers": {
		Type:         schema.TypeString,
		Optional:     true,
		Computed:     true,
		ValidateFunc: validation.StringLenBetween(1, 25000),
	},

Which produces the following error:

│ Error: expected length of custom_headers to be in the range (1 - 25000), got

│   with module.amplify_app.aws_amplify_app.default[0],
│   on .terraform/e98d/modules/amplify_app/main.tf line 28, in resource "aws_amplify_app" "default":
│   28:   custom_headers                = var.custom_headers
  • This changes the default value to null for the custom_headers variable

why

Fixes the following error:

Planning failed. Terraform encountered an error while generating this plan.


│ Error: expected length of custom_headers to be in the range (1 - 25000), got

│   with module.amplify_app.aws_amplify_app.default[0],
│   on .terraform/infra/modules/amplify_app/main.tf line 28, in resource "aws_amplify_app" "default":
│   28:   custom_headers                = var.custom_headers

references

@RoseSecurity RoseSecurity requested review from a team as code owners January 22, 2025 19:52
@RoseSecurity
Copy link
Contributor Author

/terratest

@mergify mergify bot added the triage Needs triage label Jan 22, 2025
@GabisCampana
Copy link

@goruha

@mergify mergify bot removed the triage Needs triage label Jan 22, 2025
@RoseSecurity RoseSecurity merged commit f573b8a into main Jan 23, 2025
37 checks passed
@RoseSecurity RoseSecurity deleted the fix-custom-headers-default branch January 23, 2025 02:34
Copy link

These changes were released in v1.2.0.

@oycyc
Copy link
Contributor

oycyc commented Jan 24, 2025

Ah, thanks for fixing this, I put that original input in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants