Skip to content
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

Provide ability to delete default VPC gateway route on network creation #25

Closed
bmenasha opened this issue Jan 25, 2019 · 5 comments
Closed

Comments

@bmenasha
Copy link

See terraform-google-modules/terraform-google-project-factory#135

Can we add an option to delete default VPC gateway route on the created VPC?

A customer is asking for this feature as they wish to intercept all egress traffic with a security device. They will create their own route for this interception and routing of traffic from the security device to the gateway.

Thanks!

glarizza added a commit to glarizza/terraform-google-network that referenced this issue Feb 5, 2019
This commit introduces the ability to delete the default gateway route
that is created for the VPC network (issue terraform-google-modules#25). If the input variable
`var.delete_default_internet_gateway_routes` is set then a null_resource
uses the local-exec provisioner to execute a script that filters for all
network routes within the `project_id` whose name begins with
"default-route" and who contains a next hop of "default-internet-gateway"
and then deletes them. This functionality is useful in the event that
all egress traffic should be routed through a single device instead of
directly to the default internet gateway.  Without this change there is
no way to automate the deletion of those routes.
glarizza added a commit to glarizza/terraform-google-network that referenced this issue Feb 20, 2019
This commit introduces the ability to delete the default gateway route
that is created for the VPC network (issue terraform-google-modules#25). If the input variable
`var.delete_default_internet_gateway_routes` is set then a null_resource
uses the local-exec provisioner to execute a script that filters for all
network routes within the `project_id` whose name begins with
"default-route" and who contains a next hop of "default-internet-gateway"
and then deletes them. This functionality is useful in the event that
all egress traffic should be routed through a single device instead of
directly to the default internet gateway.  Without this change there is
no way to automate the deletion of those routes.
glarizza added a commit to glarizza/terraform-google-network that referenced this issue Feb 20, 2019
This commit introduces the ability to delete the default gateway route
that is created for the VPC network (issue terraform-google-modules#25). If the input variable
`var.delete_default_internet_gateway_routes` is set then a null_resource
uses the local-exec provisioner to execute a script that filters for all
network routes within the `project_id` whose name begins with
"default-route" and who contains a next hop of "default-internet-gateway"
and then deletes them. This functionality is useful in the event that
all egress traffic should be routed through a single device instead of
directly to the default internet gateway.  Without this change there is
no way to automate the deletion of those routes.
glarizza added a commit to glarizza/terraform-google-network that referenced this issue Feb 20, 2019
This commit introduces the ability to delete the default gateway route
that is created for the VPC network (issue terraform-google-modules#25). If the input variable
`var.delete_default_internet_gateway_routes` is set then a null_resource
uses the local-exec provisioner to execute a script that filters for all
network routes within the `project_id` whose name begins with
"default-route" and who contains a next hop of "default-internet-gateway"
and then deletes them. This functionality is useful in the event that
all egress traffic should be routed through a single device instead of
directly to the default internet gateway.  Without this change there is
no way to automate the deletion of those routes.
glarizza added a commit to glarizza/terraform-google-network that referenced this issue Feb 20, 2019
This commit introduces the ability to delete the default gateway route
that is created for the VPC network (issue terraform-google-modules#25). If the input variable
`var.delete_default_internet_gateway_routes` is set then a null_resource
uses the local-exec provisioner to execute a script that filters for all
network routes within the `project_id` whose name begins with
"default-route" and who contains a next hop of "default-internet-gateway"
and then deletes them. This functionality is useful in the event that
all egress traffic should be routed through a single device instead of
directly to the default internet gateway.  Without this change there is
no way to automate the deletion of those routes.
glarizza added a commit to glarizza/terraform-google-network that referenced this issue Feb 20, 2019
This commit introduces the ability to delete the default gateway route
that is created for the VPC network (issue terraform-google-modules#25). If the input variable
`var.delete_default_internet_gateway_routes` is set then a null_resource
uses the local-exec provisioner to execute a script that filters for all
network routes within the `project_id` whose name begins with
"default-route" and who contains a next hop of "default-internet-gateway"
and then deletes them. This functionality is useful in the event that
all egress traffic should be routed through a single device instead of
directly to the default internet gateway.  Without this change there is
no way to automate the deletion of those routes.
glarizza added a commit to glarizza/terraform-google-network that referenced this issue Feb 20, 2019
This commit introduces the ability to delete the default gateway route
that is created for the VPC network (issue terraform-google-modules#25). If the input variable
`var.delete_default_internet_gateway_routes` is set then a null_resource
uses the local-exec provisioner to execute a script that filters for all
network routes within the `project_id` whose name begins with
"default-route" and who contains a next hop of "default-internet-gateway"
and then deletes them. This functionality is useful in the event that
all egress traffic should be routed through a single device instead of
directly to the default internet gateway.  Without this change there is
no way to automate the deletion of those routes.
glarizza added a commit to glarizza/terraform-google-network that referenced this issue Feb 20, 2019
This commit introduces the ability to delete the default gateway route
that is created for the VPC network (issue terraform-google-modules#25). If the input variable
`var.delete_default_internet_gateway_routes` is set then a null_resource
uses the local-exec provisioner to execute a script that filters for all
network routes within the `project_id` whose name begins with
"default-route" and who contains a next hop of "default-internet-gateway"
and then deletes them. This functionality is useful in the event that
all egress traffic should be routed through a single device instead of
directly to the default internet gateway.  Without this change there is
no way to automate the deletion of those routes.
glarizza added a commit to glarizza/terraform-google-network that referenced this issue Feb 20, 2019
This commit introduces the ability to delete the default gateway route
that is created for the VPC network (issue terraform-google-modules#25). If the input variable
`var.delete_default_internet_gateway_routes` is set then a null_resource
uses the local-exec provisioner to execute a script that filters for all
network routes within the `project_id` whose name begins with
"default-route" and who contains a next hop of "default-internet-gateway"
and then deletes them. This functionality is useful in the event that
all egress traffic should be routed through a single device instead of
directly to the default internet gateway.  Without this change there is
no way to automate the deletion of those routes.
glarizza added a commit to glarizza/terraform-google-network that referenced this issue Feb 20, 2019
This commit introduces the ability to delete the default gateway route
that is created for the VPC network (issue terraform-google-modules#25). If the input variable
`var.delete_default_internet_gateway_routes` is set then a null_resource
uses the local-exec provisioner to execute a script that filters for all
network routes within the `project_id` whose name begins with
"default-route" and who contains a next hop of "default-internet-gateway"
and then deletes them. This functionality is useful in the event that
all egress traffic should be routed through a single device instead of
directly to the default internet gateway.  Without this change there is
no way to automate the deletion of those routes.
@glarizza
Copy link
Contributor

PR #29 addresses this issue and was merged today

@bmenasha
Copy link
Author

Wow. Thank you very much Gary!

@bmenasha
Copy link
Author

Thank you very much Gary! this is great.

@drebes
Copy link
Contributor

drebes commented Mar 18, 2019

GoogleCloudPlatform/magic-modules#1539 is open to do this directly on the provider. Once merged you can remove the local-exec.

@andreyk-code
Copy link
Contributor

nice, thank you @drebes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants