Skip to content

Commit fed7184

Browse files
committed
feat: add AdditionalVPCs field to HostedZoneSpec
1 parent cec13d0 commit fed7184

28 files changed

Lines changed: 874 additions & 161 deletions
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2026-03-11T22:05:02Z"
3-
build_hash: 5ac6c79fbc941c426d8b70cba768820fc9296542
4-
go_version: go1.25.7
5-
version: v0.58.0
6-
api_directory_checksum: b612de0e7a18f2ad41155b5b645fb6676753f2ba
2+
build_date: "2026-03-16T19:15:38Z"
3+
build_hash: af2891ea8affbe25b5b1c4f397146e208e134603
4+
go_version: go1.26.1
5+
version: v0.58.0-2-gaf2891e
6+
api_directory_checksum: 4f28c0f1bd2454828173a60002f54f7963f18c8e
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.32.6
99
generator_config_info:
10-
file_checksum: c4156ee69d38bea32cd1ddac3f41da19ebcf2680
10+
file_checksum: 5ae421d838a4d0224a0630fee8446707b0902f14
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ resources:
5757
from:
5858
operation: ListResourceRecordSets
5959
path: ResourceRecordSets.AliasTarget
60-
# This field cannot be ignored, but values for this will be overriden and should not be used
6160
CidrRoutingConfig:
6261
from:
6362
operation: ListResourceRecordSets
@@ -156,13 +155,21 @@ resources:
156155
update_operation:
157156
custom_method_name: customUpdateRecordSet
158157
HostedZone:
158+
custom_cel_rules:
159+
- rule: "!has(self.hostedZoneConfig) || !self.hostedZoneConfig.privateZone || has(self.vpc)"
160+
message: "spec.vpc is required for private hosted zones"
159161
exceptions:
160162
terminal_codes:
161163
- DelegationSetNotReusable
162164
- InvalidDomainName
163165
- InvalidInput
164166
- InvalidVPCId
165167
fields:
168+
AdditionalVPCs:
169+
custom_field:
170+
list_of: VPC
171+
compare:
172+
is_ignored: True
166173
DelegationSet:
167174
from:
168175
operation: CreateHostedZone
@@ -176,7 +183,11 @@ resources:
176183
is_ignored: True
177184
hooks:
178185
delta_pre_compare:
179-
code: compareTags(delta, a, b)
186+
code: |
187+
compareTags(delta, a, b)
188+
compareAdditionalVPCs(delta, a, b)
189+
sdk_delete_pre_build_request:
190+
template_path: hooks/hosted_zone/sdk_delete_pre_build_request.go.tpl
180191
sdk_read_one_post_set_output:
181192
template_path: hooks/hosted_zone/sdk_read_one_post_set_output.go.tpl
182193
sdk_create_post_set_output:

apis/v1alpha1/hosted_zone.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1alpha1/zz_generated.deepcopy.go

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/route53.services.k8s.aws_hostedzones.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,24 @@ spec:
4242
4343
A complex type that contains general information about the hosted zone.
4444
properties:
45+
additionalVPCs:
46+
items:
47+
description: |-
48+
(Private hosted zones only) A complex type that contains information about
49+
an Amazon VPC.
50+
51+
If you associate a private hosted zone with an Amazon VPC when you make a
52+
CreateHostedZone (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html)
53+
request, the following parameters are also required.
54+
properties:
55+
vpcID:
56+
description: (Private hosted zones only) The ID of an Amazon
57+
VPC.
58+
type: string
59+
vpcRegion:
60+
type: string
61+
type: object
62+
type: array
4563
delegationSetID:
4664
description: |-
4765
If you want to associate a reusable delegation set with this hosted zone,
@@ -122,6 +140,10 @@ spec:
122140
required:
123141
- name
124142
type: object
143+
x-kubernetes-validations:
144+
- message: spec.vpc is required for private hosted zones
145+
rule: '!has(self.hostedZoneConfig) || !self.hostedZoneConfig.privateZone
146+
|| has(self.vpc)'
125147
status:
126148
description: HostedZoneStatus defines the observed state of HostedZone
127149
properties:

generator.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ resources:
5757
from:
5858
operation: ListResourceRecordSets
5959
path: ResourceRecordSets.AliasTarget
60-
# This field cannot be ignored, but values for this will be overriden and should not be used
6160
CidrRoutingConfig:
6261
from:
6362
operation: ListResourceRecordSets
@@ -156,13 +155,21 @@ resources:
156155
update_operation:
157156
custom_method_name: customUpdateRecordSet
158157
HostedZone:
158+
custom_cel_rules:
159+
- rule: "!has(self.hostedZoneConfig) || !self.hostedZoneConfig.privateZone || has(self.vpc)"
160+
message: "spec.vpc is required for private hosted zones"
159161
exceptions:
160162
terminal_codes:
161163
- DelegationSetNotReusable
162164
- InvalidDomainName
163165
- InvalidInput
164166
- InvalidVPCId
165167
fields:
168+
AdditionalVPCs:
169+
custom_field:
170+
list_of: VPC
171+
compare:
172+
is_ignored: True
166173
DelegationSet:
167174
from:
168175
operation: CreateHostedZone
@@ -176,7 +183,11 @@ resources:
176183
is_ignored: True
177184
hooks:
178185
delta_pre_compare:
179-
code: compareTags(delta, a, b)
186+
code: |
187+
compareTags(delta, a, b)
188+
compareAdditionalVPCs(delta, a, b)
189+
sdk_delete_pre_build_request:
190+
template_path: hooks/hosted_zone/sdk_delete_pre_build_request.go.tpl
180191
sdk_read_one_post_set_output:
181192
template_path: hooks/hosted_zone/sdk_read_one_post_set_output.go.tpl
182193
sdk_create_post_set_output:

helm/crds/route53.services.k8s.aws_hostedzones.yaml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,24 @@ spec:
4242
4343
A complex type that contains general information about the hosted zone.
4444
properties:
45+
additionalVPCs:
46+
items:
47+
description: |-
48+
(Private hosted zones only) A complex type that contains information about
49+
an Amazon VPC.
50+
51+
If you associate a private hosted zone with an Amazon VPC when you make a
52+
CreateHostedZone (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html)
53+
request, the following parameters are also required.
54+
properties:
55+
vpcID:
56+
description: (Private hosted zones only) The ID of an Amazon
57+
VPC.
58+
type: string
59+
vpcRegion:
60+
type: string
61+
type: object
62+
type: array
4563
delegationSetID:
4664
description: |-
4765
If you want to associate a reusable delegation set with this hosted zone,
@@ -58,9 +76,9 @@ spec:
5876
description: |-
5977
(Optional) A complex type that contains the following optional values:
6078
61-
- For public and private hosted zones, an optional comment
79+
* For public and private hosted zones, an optional comment
6280
63-
- For private hosted zones, an optional PrivateZone element
81+
* For private hosted zones, an optional PrivateZone element
6482
6583
If you don't specify a comment or the PrivateZone element, omit HostedZoneConfig
6684
and the other elements.
@@ -122,6 +140,10 @@ spec:
122140
required:
123141
- name
124142
type: object
143+
x-kubernetes-validations:
144+
- message: spec.vpc is required for private hosted zones
145+
rule: '!has(self.hostedZoneConfig) || !self.hostedZoneConfig.privateZone
146+
|| has(self.vpc)'
125147
status:
126148
description: HostedZoneStatus defines the observed state of HostedZone
127149
properties:

0 commit comments

Comments
 (0)