-
Notifications
You must be signed in to change notification settings - Fork 142
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
Added support for custom Directors #43
Conversation
Sorry for the delayed response. Hoping to have an answer for you soon. |
Hi @thommahoney - any progress on an answer for this? Thanks! |
@hynd if you can resolve the conflicts, we can re-review this PR. Thanks for your patience. |
Sure can! Rebased... |
@@ -217,6 +250,15 @@ used in the `request_condition`, `response_condition`, or | |||
* `priority` - (Optional) A number used to determine the order in which multiple | |||
conditions execute. Lower numbers execute first. Default `10`. | |||
|
|||
The `director` block supports: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the director block support all the fields that the director api has available? https://docs.fastly.com/api/config#director
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be ideal but not required (cc/ @hynd). I would prefer to prioritize the relief of the users for features that can easily be augmented in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good spot - comment
was missing from the doc, i think the only thing actually missing from the code is the shield
field (which isn't in the underlying go-fastly lib.... yet)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, and capacity
is only half-implemented in go-fastly - i'll PR fixes for both of those first, and will update this accordingly....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hynd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done - merged upstream and refreshed this PR
fastly/resource_fastly_service_v1.go
Outdated
@@ -1350,7 +1405,7 @@ func resourceServiceV1Update(d *schema.ResourceData, meta interface{}) error { | |||
Name: cf["name"].(string), | |||
} | |||
|
|||
log.Printf("[DEBUG] Fastly Conditions Removal opts: %#v", opts) | |||
log.Printf("[DEBUG] Condition Removal opts: %#v", opts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I do agree that adding 'Fastly' to the log line is redundant, it has no relation to the intended change and should be done in another PR with a dedicated purpose.
The same is true for the remaining changes below.
Thanks for removing those message changes
Got an acceptance test failure:
Looks like the timestamps don't match. I haven't dug into the reason but if you could investigate, I would appreciate it. |
Fixed! Also removed the type "2" (round-robin) director, which seems to have been recently dropped from the docs (and throws an HTTP 400). |
Thanks @hynd |
Hello!
Custom director's aren't particularly well documented on Fastly's site yet, but essential for anything other than per-request random balancing across origins.