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

CustomOriginConfig fills in with values not specified #3281

Closed
1 of 5 tasks
McDoit opened this issue Jul 11, 2019 · 2 comments
Closed
1 of 5 tasks

CustomOriginConfig fills in with values not specified #3281

McDoit opened this issue Jul 11, 2019 · 2 comments
Assignees
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront bug This issue is a bug. needs-reproduction This issue needs reproduction. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@McDoit
Copy link
Contributor

McDoit commented Jul 11, 2019

Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.

  • I'm submitting a ...

    • 🪲 bug report
    • 🚀 feature request
    • 📚 construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior?
    If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce

Creating a CloudFrontWebDistribution with a SourceConfiguration with the following CustomOriginConfig sets values for properties not specified

new CustomOriginConfig
{
    DomainName = "web.example.com",
    HttpPort = 80,
    OriginProtocolPolicy = OriginProtocolPolicy.HTTP_ONLY,
}

becomes

"CustomOriginConfig": {
  "HTTPPort": 80,
  "HTTPSPort": 443,
  "OriginKeepaliveTimeout": 5,
  "OriginProtocolPolicy": "http-only",
  "OriginReadTimeout": 30,
  "OriginSSLProtocols": []
}

in the synthed output

And i dont find any way to override that without overiding the entire Origins property

  • What is the expected behavior (or behavior of feature suggested)?
    A output more like this:
"CustomOriginConfig": {
  "HTTPPort": 80,
  "OriginProtocolPolicy": "http-only"
}
  • What is the motivation / use case for changing the behavior or adding this feature?

  • Please tell us about your environment:

    • CDK CLI Version: 0.39
    • Module Version: 0.39
    • OS: [Windows 10]
    • Language: [C#]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)

@McDoit McDoit added the needs-triage This issue or PR still needs to be triaged. label Jul 11, 2019
@McDoit McDoit changed the title CustomOriginConfig fills in with values CustomOriginConfig fills in with values not specified Jul 11, 2019
@SomayaB SomayaB added language/dotnet Related to .NET bindings bug This issue is a bug. and removed needs-triage This issue or PR still needs to be triaged. labels Oct 11, 2019
@SomayaB SomayaB assigned RomainMuller and unassigned eladb Oct 11, 2019
@SomayaB SomayaB added the needs-reproduction This issue needs reproduction. label Oct 11, 2019
@RomainMuller
Copy link
Contributor

RomainMuller commented Nov 5, 2019

@McDoit The defaults are applied at the Javascript layer. What's the reason why you want the defaults to NOT be applied here?

@RomainMuller RomainMuller added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Nov 5, 2019
@RomainMuller RomainMuller assigned eladb and unassigned RomainMuller Nov 5, 2019
@RomainMuller RomainMuller added @aws-cdk/aws-cloudfront Related to Amazon CloudFront and removed language/dotnet Related to .NET bindings labels Nov 5, 2019
@eladb
Copy link
Contributor

eladb commented Nov 7, 2019

The synthesized outputs are functionally equivalent since the default values of the construct are aligned with the defaults of the service/CloudFormation:

  • OriginKeepaliveTimeout default is 5s (ref)
  • OriginReadTimeout default is 30s (ref)
  • OriginSSLProtocols empty list is equivalent to not specifying the value
  • HTTPSPort is ignored since http-only is set.

Resolving for now.

@eladb eladb closed this as completed Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront bug This issue is a bug. needs-reproduction This issue needs reproduction. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

4 participants