terraform configuration example for ibm cloud VPN server setup, and use this a reference implementation for vpn server terraform configuration
What will be done in this vpn-server terraform configuration example:
- Create the IBM Cloud secrets manager instance with trial plan.
- Generate the server certificate/key and client certificate/key locally, or generate the certificate/keys via private certificate capability in IBM secrets manager service.
- Import the server/client certificate/key to secrets manager instance. For IBM secerts manager generated private certificate, please skip this step.
- Create one VPC and one subnet
- Create one subnet
- Create a security group with inbound and outbound rules to allow all traffics.
- Create the VPN server within the subnet, security group, and server/client certificates in secerts manager instance.
- Download the VPN client profile and configure the client certicate and key in the client profile.
export IBMCLOUD_API_KEY=<YOUR_IBM_CLOUD_API_KEY>
This is only done once while you intialized your terraform directory.
terraform init
terraform plan
terraform apply