diff --git a/.changelog/5104.txt b/.changelog/5104.txt new file mode 100644 index 00000000000..b1189ef6b3b --- /dev/null +++ b/.changelog/5104.txt @@ -0,0 +1,3 @@ +```release-note:bug +apigateway: fixed import functionality for all `apigateway` resources +``` diff --git a/website/docs/r/api_gateway_api.html.markdown b/website/docs/r/api_gateway_api.html.markdown index 06bcf19f5a6..7d72830a0a0 100644 --- a/website/docs/r/api_gateway_api.html.markdown +++ b/website/docs/r/api_gateway_api.html.markdown @@ -106,9 +106,9 @@ This resource provides the following Api can be imported using any of these accepted formats: ``` -$ terraform import google_api_gateway_api.default projects/{{project}}/locations/global/apis/{{name}} -$ terraform import google_api_gateway_api.default {{project}}/{{name}} -$ terraform import google_api_gateway_api.default {{name}} +$ terraform import google_api_gateway_api.default projects/{{project}}/locations/global/apis/{{api_id}} +$ terraform import google_api_gateway_api.default {{project}}/{{api_id}} +$ terraform import google_api_gateway_api.default {{api_id}} ``` ## User Project Overrides diff --git a/website/docs/r/api_gateway_api_config.html.markdown b/website/docs/r/api_gateway_api_config.html.markdown index 5bc05d63410..11712856bbf 100644 --- a/website/docs/r/api_gateway_api_config.html.markdown +++ b/website/docs/r/api_gateway_api_config.html.markdown @@ -167,9 +167,9 @@ This resource provides the following ApiConfig can be imported using any of these accepted formats: ``` -$ terraform import google_api_gateway_api_config.default projects/{{project}}/locations/global/apis/{{api}}/configs/{{name}} -$ terraform import google_api_gateway_api_config.default {{project}}/{{api}}/{{name}} -$ terraform import google_api_gateway_api_config.default {{api}}/{{name}} +$ terraform import google_api_gateway_api_config.default projects/{{project}}/locations/global/apis/{{api}}/configs/{{api_config_id}} +$ terraform import google_api_gateway_api_config.default {{project}}/{{api}}/{{api_config_id}} +$ terraform import google_api_gateway_api_config.default {{api}}/{{api_config_id}} ``` ## User Project Overrides diff --git a/website/docs/r/api_gateway_api_iam.html.markdown b/website/docs/r/api_gateway_api_iam.html.markdown index 45dfb94896c..b2ff11928a7 100644 --- a/website/docs/r/api_gateway_api_iam.html.markdown +++ b/website/docs/r/api_gateway_api_iam.html.markdown @@ -114,9 +114,9 @@ exported: For all import syntaxes, the "resource in question" can take any of the following forms: -* projects/{{project}}/locations/global/apis/{{name}} -* {{project}}/{{name}} -* {{name}} +* projects/{{project}}/locations/global/apis/{{api}} +* {{project}}/{{api}} +* {{api}} Any variables not passed in the import command will be taken from the provider configuration. diff --git a/website/docs/r/api_gateway_gateway.html.markdown b/website/docs/r/api_gateway_gateway.html.markdown index deed8c1cd5f..91f338d4e64 100644 --- a/website/docs/r/api_gateway_gateway.html.markdown +++ b/website/docs/r/api_gateway_gateway.html.markdown @@ -132,10 +132,10 @@ This resource provides the following Gateway can be imported using any of these accepted formats: ``` -$ terraform import google_api_gateway_gateway.default projects/{{project}}/locations/{{region}}/gateways/{{name}} -$ terraform import google_api_gateway_gateway.default {{project}}/{{region}}/{{name}} -$ terraform import google_api_gateway_gateway.default {{region}}/{{name}} -$ terraform import google_api_gateway_gateway.default {{name}} +$ terraform import google_api_gateway_gateway.default projects/{{project}}/locations/{{region}}/gateways/{{gateway_id}} +$ terraform import google_api_gateway_gateway.default {{project}}/{{region}}/{{gateway_id}} +$ terraform import google_api_gateway_gateway.default {{region}}/{{gateway_id}} +$ terraform import google_api_gateway_gateway.default {{gateway_id}} ``` ## User Project Overrides diff --git a/website/docs/r/api_gateway_gateway_iam.html.markdown b/website/docs/r/api_gateway_gateway_iam.html.markdown index bb6e00275e9..45e6620abeb 100644 --- a/website/docs/r/api_gateway_gateway_iam.html.markdown +++ b/website/docs/r/api_gateway_gateway_iam.html.markdown @@ -121,10 +121,10 @@ exported: For all import syntaxes, the "resource in question" can take any of the following forms: -* projects/{{project}}/locations/{{region}}/gateways/{{name}} -* {{project}}/{{region}}/{{name}} -* {{region}}/{{name}} -* {{name}} +* projects/{{project}}/locations/{{region}}/gateways/{{gateway}} +* {{project}}/{{region}}/{{gateway}} +* {{region}}/{{gateway}} +* {{gateway}} Any variables not passed in the import command will be taken from the provider configuration.