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

fix!: bastion internet access needs nat #63

Merged
merged 1 commit into from
Jul 15, 2022
Merged

Conversation

sandipndev
Copy link
Member

@sandipndev sandipndev commented Jul 15, 2022

Looks like without external IP on the VPC, to give Internet access to the bastion (which lets the startup script run properly) we need the NAT.

https://serverfault.com/questions/947970/google-compute-engine-trouble-accessing-internet-from-an-instance-without-exter

Moved the NAT from platform to inception.
Tested locally and working!

My assumption is there was some race condition between GCE running the startup script and platform applying the NAT which is why on the CI it was not reliably failing?

@sandipndev sandipndev requested a review from bodymindarts July 15, 2022 10:28
@sandipndev sandipndev changed the title fix: bastion internet access needs nat fix!: bastion internet access needs nat Jul 15, 2022
@sandipndev sandipndev merged commit a394208 into main Jul 15, 2022
@sandipndev sandipndev deleted the nat-to-inception branch July 15, 2022 18:37
fireballpoint1 pushed a commit to fireballpoint1/galoy-infra that referenced this pull request Aug 8, 2022
Moves NAT from Platform to Inception.

Migration Logic:

```
# Inception
terraform import module.inception.google_compute_router.router <id>
terraform import module.inception.google_compute_router_nat.main <id>

# Platform
terraform state rm module.platform.google_compute_router.router
terraform state rm module.platform.google_compute_router_nat.main
```

BREAKING CHANGE: To give proper internet access to bastion (so that metadata: startup-script works), the bastion must be created with NAT and Router present on the VPC. This should happen on the inception phase, earlier it was happening at platform.
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

Successfully merging this pull request may close these issues.

2 participants