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

Add CloudFront Function (#1027) #1031

Merged
merged 2 commits into from
Jun 28, 2023
Merged

Add CloudFront Function (#1027) #1031

merged 2 commits into from
Jun 28, 2023

Conversation

npellegrin
Copy link
Contributor

@npellegrin npellegrin commented Jun 20, 2023

This closes #1027

Output with feature activated

Do you really want to nuke these resources on the account with the ID xxx and the alias 'xxx'?
Do you want to continue? Enter account alias to continue.
> xxx

global - CloudFrontFunction - [name: "index-location", stage: "DEVELOPMENT"] - triggered remove
global - CloudFrontFunction - [name: "index-location", stage: "LIVE"] - failed

Removal requested: 1 waiting, 1 failed, 39 skipped, 0 finished

global - CloudFrontFunction - [name: "index-location", stage: "DEVELOPMENT"] - waiting
global - CloudFrontFunction - [name: "index-location", stage: "LIVE"] - removed

Removal requested: 1 waiting, 0 failed, 39 skipped, 1 finished

global - CloudFrontFunction - [name: "index-location", stage: "DEVELOPMENT"] - removed

Removal requested: 0 waiting, 0 failed, 39 skipped, 2 finished

Nuke complete: 0 failed, 39 skipped, 2 finished.

@npellegrin npellegrin requested a review from a team as a code owner June 20, 2023 09:02
Comment on lines 23 to 44
for {
resp, err := svc.ListFunctions(nil)
if err != nil {
return nil, err
}

for _, item := range resp.FunctionList.Items {
resources = append(resources, &CloudFrontFunction{
svc: svc,
name: item.Name,
stage: item.FunctionMetadata.Stage,
})
}
return resources, nil
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I missed anything, but this loop doesn't really make sense if you return after the first execution. Are you missing the actual pagination?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I started implementing the pagination but fogot to actually add it on the way... I pushed an update adding it :)

@der-eismann der-eismann merged commit 4e41a7f into rebuy-de:main Jun 28, 2023
2 checks passed
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.

CloudFront Functions are not supported
3 participants