Skip to content

Commit 9493c44

Browse files
authored
Merge pull request #21 from platform9/feat/vpnaas
feat(vpnaas): Neutron VPNaaS family (service, IKE/IPsec policies, endpoint group, site connection)
2 parents f4e66ea + 783f811 commit 9493c44

22 files changed

Lines changed: 1850 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ All notable changes to this project are documented here. The format is based on
7777
resource stops managing the quotas without resetting them to defaults (matching the upstream
7878
provider). Imported by a composite `<project_id>/<region>` ID (legacy bare `<project_id>` is
7979
also accepted). Cinder per-volume-type quotas (`volume_type_quota`) are not yet implemented.
80+
- VPNaaS (Neutron VPN extension) — Phase 3: `pcd_vpnaas_service`, `pcd_vpnaas_ike_policy`,
81+
`pcd_vpnaas_ipsec_policy`, `pcd_vpnaas_endpoint_group`, and `pcd_vpnaas_site_connection`. Build a
82+
site-to-site IPsec VPN: attach a service to a router, pair IKE/IPsec policies (with a nested
83+
`lifetime` block) and local/peer endpoint groups, and connect with a site connection (nested
84+
`dpd` block, sensitive `psk`). The service and site connection wait for the object to disappear
85+
after delete (asynchronous teardown) so dependent routers/subnets can be destroyed in the same
86+
apply. The provider-specific `value_specs` escape hatch is not implemented.
8087

8188
- Registry documentation generation wired via `tfplugindocs` (`make generate`) — renders
8289
`docs/` for every resource and data source plus the provider index from schema

DECISIONS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ yet passable on this lab (reason noted). Generated registry docs are not committ
4040
| DNS (Designate) | `pcd_dns_zone`, `pcd_dns_recordset` + `pcd_dns_zone` DS | **PENDING** — Phase 3, code-complete; async create/update/delete → wait-for-`ACTIVE`/404. Acc test (zone + recordset + import) + examples written. Designate is live on the lab (Step 0) and DNS needs no compute/storage backend, so this should pass live — not yet run this session (credentials unavailable). |
4141
| Key management (Barbican) | `pcd_keymanager_secret`, `pcd_keymanager_container` + `pcd_keymanager_secret` DS | **PENDING** — Phase 3, code-complete; write-only echo-only `payload`, URL-ref→UUID id handling, wait-for-`ACTIVE` only on create-with-payload. Acc test (secret + container + data source + import) + examples written. Barbican is live on the lab (Step 0) and needs no compute/storage backend, so this should pass live — not yet run this session (credentials unavailable). |
4242
| Network QoS (Neutron) | `pcd_networking_qos_policy`, `_qos_bandwidth_limit_rule`, `_qos_dscp_marking_rule`, `_qos_minimum_bandwidth_rule` + `_qos_policy` DS | **PENDING** — Phase 3, code-complete; rules nested under a policy with composite `<policy_id>/<rule_id>` import, tags via the attributes-tags extension (`qos/policies` type), `ForceNew` on `qos_policy_id`. Full-tree acc test (policy + all three rules + data source + import) + examples written. Depends only on the Neutron `qos` extension (no compute/storage backend), so this should pass live — not yet run this session (credentials unavailable). |
43+
| VPNaaS (Neutron) | `pcd_vpnaas_service`, `pcd_vpnaas_ike_policy`, `pcd_vpnaas_ipsec_policy`, `pcd_vpnaas_endpoint_group`, `pcd_vpnaas_site_connection` | **PENDING** — Phase 3, code-complete; new `internal/services/vpnaas` package reusing `NetworkV2Client` (VPNaaS is a Neutron extension). Service + site connection wait for 404 after delete (async teardown); policies/endpoint groups delete synchronously. Nested `lifetime` (IKE/IPsec) and `dpd` (connection) as `SingleNestedAttribute` (Optional+Computed, whole-object + per-field `UseStateForUnknown`); `psk` sensitive. Full-tree acc test (service + policies + endpoint groups + connection + rename + import) + examples written. Needs the Neutron `vpnaas` extension enabled on the lab; not yet run this session (credentials unavailable). **Deferrals:** `value_specs` escape hatch (not in the PCD port), nova/neutron-only fields upstream omits. Avoided two upstream bugs: the `phase_1_negotiation_mode` update-key typo and the `peer_cidrs []string` cast panic. |
4344
| Project quotas | `pcd_compute_quotaset` (Nova), `pcd_networking_quota` (Neutron), `pcd_blockstorage_quotaset` (Cinder) | **PENDING** — Phase 3, code-complete; every quota field `Optional+Computed` with `UseStateForUnknown` (partial management — only user-set/changed fields are PUT via `*int` omitempty; server echoes the rest). No create API (Create = Update+read). **Delete is a deliberate no-op** (matches upstream `RemoveFromState`: destroying stops management without resetting quotas). Composite `<project_id>/<region>` id with legacy bare-`project_id` import tolerance; `project_id`/`region` are `ForceNew`. Per-service acc test (create project → set quotas → verify via API → update → import) + examples written. Needs live validation on the fresh CE lab (credentials unavailable this session). **Scope note:** matches upstream field-for-field except two deliberate deferrals — see the Deferred section. |
4445

4546
Both PENDING items are lab-side configuration gaps (Platform9 / lab-ops), not provider
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import pcd_vpnaas_endpoint_group.peer <endpoint_group_id>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resource "pcd_vpnaas_endpoint_group" "peer" {
2+
name = "tf-example-peer-endpoints"
3+
type = "cidr"
4+
endpoints = ["10.2.0.0/24", "10.3.0.0/24"]
5+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import pcd_vpnaas_ike_policy.example <ike_policy_id>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
resource "pcd_vpnaas_ike_policy" "example" {
2+
name = "tf-example-ike"
3+
auth_algorithm = "sha256"
4+
encryption_algorithm = "aes-256"
5+
pfs = "group14"
6+
7+
lifetime = {
8+
units = "seconds"
9+
value = 3600
10+
}
11+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import pcd_vpnaas_ipsec_policy.example <ipsec_policy_id>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
resource "pcd_vpnaas_ipsec_policy" "example" {
2+
name = "tf-example-ipsec"
3+
auth_algorithm = "sha256"
4+
encryption_algorithm = "aes-256"
5+
pfs = "group14"
6+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import pcd_vpnaas_service.example <service_id>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
resource "pcd_networking_router" "example" {
2+
name = "tf-example-vpn-router"
3+
}
4+
5+
resource "pcd_vpnaas_service" "example" {
6+
name = "tf-example-vpn"
7+
router_id = pcd_networking_router.example.id
8+
}

0 commit comments

Comments
 (0)