{"id":20700767,"url":"https://github.com/l2fprod/ibmcloud-vpe-example","last_synced_at":"2026-03-19T17:07:46.064Z","repository":{"id":41554155,"uuid":"337248080","full_name":"l2fprod/ibmcloud-vpe-example","owner":"l2fprod","description":"Creating virtual private endpoints with terraform","archived":false,"fork":false,"pushed_at":"2022-03-16T13:59:45.000Z","size":239,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-13T11:42:53.396Z","etag":null,"topics":["ibmcloud","virtual-private-cloud","vpc","vpe"],"latest_commit_sha":null,"homepage":"https://www.ibm.com/cloud/blog/creating-virtual-private-endpoint-gateways-with-terraform","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/l2fprod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-09T00:26:26.000Z","updated_at":"2022-03-16T13:47:46.000Z","dependencies_parsed_at":"2022-09-01T13:51:24.487Z","dependency_job_id":null,"html_url":"https://github.com/l2fprod/ibmcloud-vpe-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/l2fprod/ibmcloud-vpe-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2fprod%2Fibmcloud-vpe-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2fprod%2Fibmcloud-vpe-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2fprod%2Fibmcloud-vpe-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2fprod%2Fibmcloud-vpe-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l2fprod","download_url":"https://codeload.github.com/l2fprod/ibmcloud-vpe-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2fprod%2Fibmcloud-vpe-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30234526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T19:01:10.287Z","status":"ssl_error","status_checked_at":"2026-03-07T18:59:58.103Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ibmcloud","virtual-private-cloud","vpc","vpe"],"created_at":"2024-11-17T00:37:04.997Z","updated_at":"2026-03-07T22:31:49.938Z","avatar_url":"https://github.com/l2fprod.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Creating virtual private endpoints with terraform\n\nThis sample shows how to provision virtual private endpoint gateways from terraform.\n\n![Architecture](./architecture.png)\n\n## Deploy all resources\n\n1. Copy `terraform.tfvars.template` to `terraform.tfvars`:\n   ```\n   cp terraform.tfvars.template terraform.tfvars\n   ```\n1. Edit `terraform.tfvars` to match your environment.\n1. Make sure you have Terraform 0.14 installed. Use [`tfswitch`](https://tfswitch.warrensbox.com/) to easily move between Terraform versions.\n1. Run terraform:\n   ```\n   terraform init\n   terraform apply\n   ```\n\n## Test virtual private endpoints\n\nThe script `lookup.sh` iterates over all provisioned virtual server instances and does a `dig` to resolve the IP addresses of Redis, Object Storage and Key Protect.\n\nIn the first `apply`, VPE is not yet enabled, only cloud service endpoints are.\n\n1. Run `./lookup.sh` to show how the virtual server instances are resolving endpoints. Here is an excerpt for the first instance:\n\n   | Source | Destination | Resolved IPs |\n   | ------ | ----------- | ------------ |\n   | vpe-example-instance-1 | redis (123456.private.databases.appdomain.cloud) | 166.9.16.93, 166.9.12.115, 166.9.14.76 |\n   | vpe-example-instance-1 | cos (s3.direct.us-south.cloud-object-storage.appdomain.cloud) | 161.26.0.34 |\n   | vpe-example-instance-1 | kms (private.us-south.kms.cloud.ibm.com) | 166.9.250.227, 166.9.250.195, 166.9.251.3 |\n\n1. Edit `terraform.tfvars`, add `use_vpe = true` and save.\n1. Apply `terraform` again:\n   ```\n   terraform apply\n   ```\n1. After a short while, run `./lookup.sh` again to see the VPE Reserved IPs allocated to the services. Here is an excerpt for the first instance:\n\n   | Source | Destination | Resolved IPs |\n   | ------ | ----------- | ------------ |\n   | vpe-example-instance-1 | redis (123456.private.databases.appdomain.cloud) | 10.20.10.9 |\n   | vpe-example-instance-1 | cos (s3.direct.us-south.cloud-object-storage.appdomain.cloud) | 10.20.10.10 |\n   | vpe-example-instance-1 | kms (private.us-south.kms.cloud.ibm.com) | 10.20.10.8 |\n\n   **Notice how the hostnames now resolve to private IPs within the VPC.**\n\n## Destroy all configuration\n\nTo destroy the environment:\n   ```\n   terraform destroy\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl2fprod%2Fibmcloud-vpe-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl2fprod%2Fibmcloud-vpe-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl2fprod%2Fibmcloud-vpe-example/lists"}