-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
docs: Updating the app_cookie_stickiness_policy docs to reflect needing a L… #3277
docs: Updating the app_cookie_stickiness_policy docs to reflect needing a L… #3277
Conversation
…oadBalancer name NOT Id
Name and ID are actually equal, so it does not matter, but it's nice to be explicit in docs. 👍 |
load_balancer = "${aws_elb.lb.id}" | ||
lb_port = 80 | ||
cookie_name = "MyAppCookie" | ||
name = "foo_policy" |
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.
When I tried applying this example, I got an error:
1 error(s) occurred:
* aws_app_cookie_stickiness_policy.foo: Error creating AppCookieStickinessPolicy: ValidationError: Policy name cannot contain characters that are not letters, or digits or the dash.
status code: 400, request id: c96ca9bd-5eed-11e5-b3c8-1b09bd7b9609
It would be nice to add validation for aws_app_cookie_stickiness_policy.name
, but more importantly the example should be fixed - e.g. by replacing underscore with dash.
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 so this is actually an error with app_cookie_stickiness_policy?
On 19 Sep 2015 5:50 pm, "Radek Simko" notifications@github.com wrote:
In
website/source/docs/providers/aws/r/app_cookie_stickiness_policy.html.markdown
#3277 (comment):}
resource "aws_app_cookie_stickiness_policy" "foo" {
name = "foo_policy"
load_balancer = "${aws_elb.lb.id}"
lb_port = 80
cookie_name = "MyAppCookie"
- name = "foo_policy"
This is however wrong, when I tried applying this example, I got an error:
1 error(s) occurred:
- aws_app_cookie_stickiness_policy.foo: Error creating AppCookieStickinessPolicy: ValidationError: Policy name cannot contain characters that are not letters, or digits or the dash.
status code: 400, request id: c96ca9bd-5eed-11e5-b3c8-1b09bd7b9609It would be nice to add validation for
aws_app_cookie_stickiness_policy.name, but more importantly the example
should be fixed - e.g. by replacing underscore with dash.—
Reply to this email directly or view it on GitHub
https://github.com/hashicorp/terraform/pull/3277/files#r39921319.
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.
Well, you didn't cause this by your changes 😃 but the example has invalid name for some reason, so I think we can fix it.
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.
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.
@radeksimko the validation rules for this are not actually noted anywhere
http://docs.aws.amazon.com/cli/latest/reference/elb/create-app-cookie-stickiness-policy.html
just says:
--policy-name (string)
The name of the policy being created. This name must be unique within the set of policies for this load balancer.
I am not sure where this error comes from. Even the go-sdk doesn't seem to list the specific error you are getting:
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.
Hm, you're right, AWS docs are not always matching with the reality. I will open a support case, encourage them to update it. I've been already reporting some RDS validation, which was out of date the other day.
Until they document it, I think we should just validate against what the error says (i.e. alphanumeric + dash). Feel free to test certain edge cases, like two dashes, dashes at either end of the name, but I'd guess these will be allowed, based on the error message.
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.
kk, will update the PR with the Validation :)
--
Paul
Sent with Airmail
On 19 September 2015 at 19:55:51, Radek Simko (notifications@github.com) wrote:
In website/source/docs/providers/aws/r/app_cookie_stickiness_policy.html.markdown:
}
resource "aws_app_cookie_stickiness_policy" "foo" {
- name = "foo_policy"
- load_balancer = "${aws_elb.lb.id}"
- lb_port = 80
- cookie_name = "MyAppCookie"
- name = "foo_policy"
Hm, you're right, AWS docs are not always matching with the reality. I will open a support case, encourage them to update it. I've been already reporting some RDS validation, which was out of date the other day.Until they document it, I think we should just validate against what the error says (i.e. alphanumeric + dash). Feel free to test certain edge cases, like two dashes, dashes at either end of the name, but I'd guess these will be allowed, based on the error message.
—
Reply to this email directly or view it on GitHub.
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.
FYI: I just opened the support ticket, here's a copy: https://gist.github.com/radeksimko/f01168a61cbaa222b16c
…WS API returned an error
@radeksimko this is now working as expected - i was able to reproduce this with the acceptance tests. I will open a subsequent PR to add a func that allows an acceptance test for throwing the correct validation errors :) |
Thank you for your patience here, @stack72 This LGTM now 👍 |
docs: Updating the app_cookie_stickiness_policy docs to reflect needing a L…
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
…oadBalancer name NOT Id
Fixes #2926