Terraform: Deleting AWS API GW domain base path mapping with the empty base path fails

Created on 4 Oct 2016  ยท  3Comments  ยท  Source: hashicorp/terraform

Hi there,

After creating a base path mapping with an empty base path (an optional attribute) for the custom domain TF doesn't seem to be able to destroy it.

This is because the API (http://docs.aws.amazon.com/apigateway/api-reference/link-relation/basepathmapping-delete/) requires to use the special value of (none) for the path variable base_path to denote the empty base path and Terraform doesn't set the path variable correctly.

Terraform version: 0.7.4
Affected resource: aws_api_gateway_base_path_mapping
Debug output: https://gist.github.com/rafal-gancarz-opencredo/5ca8a05cf600b0947519a94f0457d566

bug provideaws

Most helpful comment

Hi guys,
Made some work on this here. Hope it will fit :)

All 3 comments

I too have verified this.

The AWS cli also requires a parameter of "(none)" passed in.
aws apigateway delete-base-path-mapping --domain-name "sub-domain.domain.com" --base-path "(none)"

If it is ran with an empty string,
aws apigateway delete-base-path-mapping --domain-name "sub-domain.domain.com" --base-path ""
The response is No JSON object could be decoded

Hi guys,
Made some work on this here. Hope it will fit :)

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.

Was this page helpful?
0 / 5 - 0 ratings