-
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
provider/aws: Re-implement api gateway parameter handling #7794
provider/aws: Re-implement api gateway parameter handling #7794
Conversation
Thanks for the PR @nicolai86 , this looks a lot cleaner 🚿 👍 😄 I think we should however keep the old field there for a few version as I know it means keeping the old expand helper there too - feel free to duplicate those functions and rename the existing ones to something like If you add |
Thanks for pointing out |
following @radeksimko s advice, keeping the old code around with a deprecation warning. this should be cleaned up in a few releases
@radeksimko I've adjusted the PR to keep the old attribute with a deprecation warning around. Hope I did not missing anything |
ops, err := deprecatedExpandApiGatewayMethodParametersJSONOperations(d, "request_parameters_in_json", "requestParameters") | ||
if err != nil { | ||
return err | ||
} |
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.
I think you're missing operations = append(operations, ops...)
here which is why tests are failing 😉
https://travis-ci.org/hashicorp/terraform/builds/150845813#L175
@nicolai86 Left you some comments there, I will have another look once Travis turns green 😃 |
@radeksimko thanks again for the review. I've adjusted accordingly & tests are now green : ) |
parameters[k] = v.(bool) | ||
} | ||
} | ||
if v, ok := d.GetOk("request_parameters"); ok { |
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.
Wasn't this supposed to be request_parameters_in_json
here?
@nicolai86 Except that comment about wrong field name ^ there's one core schema bug affecting this PR unfortunately.
See #8104 Good news is that we can get around it before it is actually fixed, e.g. parameters[k], ok = v.(bool)
if !ok {
value, _ := strconv.ParseBool(v.(string))
parameters[k] = value
} Would you mind having a look at it? |
following @radeksimko s lead
I'm always assuming that travis runs aws tests, too, but it doesn't. Ran the AWS tests manually, see below: I have some cloudwatch errors but I don't see an< in my account. is this broken for you too, @radeksimko ?
|
Thanks for the modifications.
It does, but only once per day and only for
I will have a look tomorrow, but I reckon this would be just a local error to your AWS account... or eventual consistency. |
LGTM. All acceptance tests passing on my side:
|
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. |
This PR is a follow up of my original API Gateway PR, #4295
Now that GH-2143 is finally closed this PR does away with the ugly
request_parameters_in_json
andresponse_parameters_in_json
hack.E.g. before:
after