https://pulumi.com logo
b

breezy-kitchen-97655

01/04/2022, 9:42 AM
Hi team, We using Pulumi script to update behaviours in AWS Cloudfront using Typescript We are unable to find the property to set O*bject Caching -* to use origin cache headers. Please find the attached snapshot below:
h

happy-parrot-60128

01/04/2022, 9:52 AM
This option in the UI doesn't map directly to a property on the underlying resource, but I think it just uses the default values of:
Copy code
minTtl: 0,
defaultTtl: 86400,
maxTtl: 31536000,
b

breezy-kitchen-97655

01/04/2022, 10:20 AM
if we set minTtl = 0 , will not be considered as a non-caching scenario. we saw in one of the documentations -https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html
Our scenario is as below, /pathname/123 - for this cache control headers is set from the servers itself, but /pathname/abc - will not have any cache-control header from the server, is there way to add different behaviours for this scenario?
b

billowy-army-68599

01/04/2022, 3:53 PM
@breezy-kitchen-97655 there isn't always an API call that maps to to every console setting. you'll need to create a resource that has these values set and examine the created value to figure out what to set in the API
2 Views