https://pulumi.com logo
#aws
Title
# aws
e

elegant-fountain-6809

03/25/2024, 7:23 PM
I've done a search and doesn't look like many people are automated CloudFront - but here's my question and maybe somebody can throw me some pointers into how to diagnose further: a CloudFront distribution with multiple origins and ordered-cache-behaviors The initial pulumi up did exactly what it said on the tin - and the distribution has been created. I then added some additional origins and had to request an increase in quotas from AWS. All good and I ended up with what I wanted. I did a few more mods yesterday and the pulumi up deployed them - but things stopped working correctly and I realised I was back down to a single origin in the CloudFront distribution. Pulumi up is suggesting that changes are going to be made - but they never occur. AWS CLI reports the distribution as having the same as the GUI - just a single origin. I've done a pulumi refresh etc but no matter what I do I can't get it to recreate those missing origins or cache behaviors. Is there a way to see the API calls that Pulumi is making? and could this be a terraform issue? When I say it's not making the changes...
Copy code
pulumi up --suppress-outputs --verbose 3
Previewing update (prod):
     Type                            Name                         Plan       Info
     pulumi:pulumi:Stack             photo-archive-iac-prod                  
 ~   ├─ aws:cloudfront:Distribution  pa-wsa-website-cf            update     [diff: ~orderedCacheBehaviors,origins]
 ~   └─ aws:cloudfront:Distribution  pa-driving-creek-website-cf  update     [diff: ~orderedCacheBehaviors,origins]

Resources:
    ~ 2 to update
    408 unchanged

Do you want to perform this update? yes
Updating (prod):
     Type                 Name                    Status     
     pulumi:pulumi:Stack  photo-archive-iac-prod             

Resources:
    410 unchanged

Duration: 11s
e

enough-garden-22763

03/25/2024, 7:37 PM
https://www.pulumi.com/docs/support/troubleshooting/ would be the first thing to try, mind the TF_LOG=TRACE variable
It would be very interesting if we could capture it into a reproducible issue, my team could have a look, definitely seems like something that shouldn't happen
e

elegant-fountain-6809

03/25/2024, 7:43 PM
thanks @enough-garden-22763 - TF_LOG=TRACE hasn't provided any further insights - I'll create a fresh project with a CF and a few S3 buckets and see if I can reproduce the issue
e

enough-garden-22763

03/25/2024, 7:44 PM
Awesome, thank you!
e

elegant-fountain-6809

03/25/2024, 9:59 PM
ha ha - and in typical fashion I can't reproduce it.... will keep trying though
e

enough-garden-22763

03/25/2024, 10:30 PM
Thanks! Yeah the repro is half the fix, it's the hardest part. it's a stateful system.
e

elegant-fountain-6809

03/25/2024, 10:48 PM
no surprises - it appears to be an issue around my use of pulumi.all() to turn an URL into a FQDN. a bit strange how the preview phase correctly identified the change and then the run phase ignore the changes entirely - but by re-writing the way the pulumi.all() is written I appear to be getting what I want