Last active
January 5, 2020 11:07
-
-
Save pranavcode/8d9ac1d0728223378082a897c7e5b951 to your computer and use it in GitHub Desktop.
Velotio - HashiCorp Consul Part 2 - Adding Consul intentions to allow or deny connection between services
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Allow connection from Django App (Web) to MongoDB Primary instance (DB) | |
$ consul intention create -allow web mongo-primary | |
Created: web => mongo-primary (allow) | |
# Allow connection from Django App (Web) to MongoDB Secondary instance (DB) | |
$ consul intention create -allow web mongo-secondary | |
Created: web => mongo-secondary (allow) | |
# Deny connection from Fabio (LB) to MongoDB Primary instance (DB) | |
$ consul intention create -deny fabio mongo-primary | |
Created: fabio => mongo-primary (deny) | |
# Deny connection from Fabio (LB) to MongoDB Secondary instance (DB) | |
$ consul intention create -deny fabio mongo-secondary | |
Created: fabio => mongo-secondary (deny) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
3rd command must be mongo-primary, not mongo-secondary