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

Cannot create VCL "versioned" snippet, only dynamic #747

Closed
raupie opened this issue Dec 27, 2022 · 2 comments · Fixed by #751
Closed

Cannot create VCL "versioned" snippet, only dynamic #747

raupie opened this issue Dec 27, 2022 · 2 comments · Fixed by #751
Labels
bug Something isn't working

Comments

@raupie
Copy link

raupie commented Dec 27, 2022

Version

Fastly CLI version v4.5.0 (c56025c)
Built with go version go1.18.9 linux/amd64

What happened

When creating a VCL snippet, the dynamic argument is required. There is no option to select a versioned option as the default int is always set to dynamic.

fastly vcl snippet create --version=active --service-id $SERVICE_ID --autoclone --content example.vcl --type recv --name="Shielding Test"        

ERROR: the Fastly API returned 400 Bad Request: Bad request (No value for required field 'dynamic').

I want to create a versioned VCL Snippet so I'm not adding the --dynamic argument but it's required.

https://github.com/fastly/go-fastly/blob/9261ce9f69f4c19c5814e0e21ea29771b4191cff/fastly/vcl_snippets.go#L74

@Integralist
Copy link
Collaborator

Thanks @raupie for opening this issue. I've found the bug and have a PR open to fix it:

#751

@Integralist
Copy link
Collaborator

This should hopefully be fixed in https://github.com/fastly/cli/releases/tag/v4.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants