Skip to content

Commit bd79f99

Browse files
committed
kawaii: extended doc on peering
1 parent b91c880 commit bd79f99

1 file changed

Lines changed: 78 additions & 2 deletions

File tree

content/en/docs/user-guide/services/kawaii.md

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,82 @@ resource "kowabunga_kawaii" "gw" {
5151

5252
You may refer to [TF](https://search.opentofu.org/provider/kowabunga-cloud/kowabunga/latest/docs/resources/kawaii) documentation to extend **Kawaii** gateway with VPC peering and custom egress/ingress/nat rules.
5353

54-
## IPSec Peering
54+
## VPC Peering
5555

56-
Alternatively, it is also possible to setup an [IPSec peering connection](https://search.opentofu.org/provider/kowabunga-cloud/kowabunga/latest/docs/resources/kawaii_ipsec) with **Kawaii**, should you need to provide some admin users with remote access capabilities.
56+
Kowabunga VPC peering allows you to inter-connect 2 projects subnets. This can come in handy if you have 2 specific applications, managed by different set of people, and still need both to communicate all together.
57+
58+
The following example extends our **Kawaii** gateway configuration to peer with 2 subnets:
59+
60+
- the underlying Ceph one, used to directly access storage resources.
61+
- the one form **marvelous** project, allowing bi-directional connectivity throuh associated ingress/egress firewalling rules.
62+
63+
<!-- prettier-ignore-start -->
64+
{{< tabpane >}}
65+
{{< tab header="Code:" disabled=true />}}
66+
{{< tab header="TF" lang="hcl" >}}
67+
resource "kowabunga_kawaii" "gw" {
68+
project = kowabunga_project.acme.id
69+
region = data.kowabunga_region.eu-west.id
70+
vpc_peerings = [
71+
{
72+
subnet = data.kowabunga_subnet.eu-west-ceph.id
73+
},
74+
{
75+
subnet = data.kowabunga_subnet.eu-west-marvelous.id
76+
egress = {
77+
ports = "1-65535"
78+
protocol = "tcp"
79+
}
80+
ingress = {
81+
ports = "1-65535"
82+
protocol = "tcp"
83+
}
84+
policy = "accept"
85+
},
86+
]
87+
}
88+
{{< /tab >}}
89+
{{< /tabpane >}}
90+
<!-- prettier-ignore-end -->
91+
92+
{{< alert color="warning" title="Warning" >}}
93+
Note that setting up VPC peering requires you to configure and allow connectivity on both projects ends. Network is bi-directional and, for security measures, one project cannot arbitrary decide to peer with another one without mutual consent.
94+
{{< /alert >}}
95+
96+
## IPsec Peering
97+
98+
Alternatively, it is also possible to setup an [IPsec peering connection](https://search.opentofu.org/provider/kowabunga-cloud/kowabunga/latest/docs/resources/kawaii_ipsec) with **Kawaii**, should you need to provide some admin users with remote access capabilities.
99+
100+
This allows connecting your private subnet with other premises or Cloud providers as to extend the reach of services behind the walls of Kowabunga.
101+
102+
The above example extend our **Kawaii** instance with an IPsec connection with the ACME remote office. The remote IPsec engine public IP address will be **5.6.7.8** and expose the private network **172.16.1.0/24**.
103+
104+
<!-- prettier-ignore-start -->
105+
{{< tabpane >}}
106+
{{< tab header="Code:" disabled=true />}}
107+
{{< tab header="TF" lang="hcl" >}}
108+
resource "kowabunga_kawaii_ipsec" "office" {
109+
kawaii = kowabunga_kawaii.gw.id
110+
name = "ACME Office"
111+
desc = "connect ro aws ipsec"
112+
pre_shared_key = local.secrets.kowabunga.ipsec_office_psk
113+
remote_peer = "5.6.7.8"
114+
remote_subnet = "172.16.1.0/24"
115+
phase1_dh_group_number = 14
116+
phase1_integrity_algorithm = "SHA512"
117+
phase1_encryption_algorithm = "AES256"
118+
phase2_dh_group_number = 14
119+
phase2_integrity_algorithm = "SHA512"
120+
phase2_encryption_algorithm = "AES256"
121+
}
122+
{{< /tab >}}
123+
{{< /tabpane >}}
124+
<!-- prettier-ignore-end -->
125+
126+
{{< alert color="warning" title="Warning" >}}
127+
It comes without saying but setting up an IPsec tunnel requires you to:
128+
129+
- Expose both ends publicly
130+
- Configure tunnel connectivity both ways.
131+
- Configure both ends firewall, if necessary.
132+
{{< /alert >}}

0 commit comments

Comments
 (0)