File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ code paths:
6969* convert_tags_post_to_ack_tags
7070* convert_tags_pre_from_ack_tags
7171* convert_tags_post_from_ack_tags
72+ * pre_set_resource_identifiers
73+ * post_set_resource_identifiers
7274
7375The "pre_build_request" hooks are called BEFORE the call to construct
7476the Input shape that is used in the API operation and therefore BEFORE
@@ -143,6 +145,12 @@ tags into K8s resource tags
143145
144146The "convert_tags_post_from_ack_tags" are called after converting the ACK
145147tags into K8s resource tags
148+
149+ The "pre_set_resource_identifiers" hook is called before the generated code
150+ that sets the resource identifiers to uniquely identify a resource
151+
152+ The "post_set_resource_identifiers" hook is called after the generated code
153+ that sets the resource identifiers to uniquely identify a resource
146154*/
147155
148156// ResourceHookCode returns a string with custom callback code for a resource
Original file line number Diff line number Diff line change @@ -72,7 +72,13 @@ func (r *resource) SetStatus(desired acktypes.AWSResource) {
7272// SetIdentifiers sets the Spec or Status field that is referenced as the unique
7373// resource identifier
7474func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error {
75+ {{- if $hookCode := Hook .CRD " pre_set_resource_identifiers" } }
76+ { { $hookCode } }
77+ { {- end } }
7578{ {- GoCodeSetResourceIdentifiers .CRD " identifier" " r.ko" 1} }
79+ { {- if $hookCode := Hook .CRD " post_set_resource_identifiers" } }
80+ { { $hookCode } }
81+ { {- end } }
7682 return nil
7783}
7884
You can’t perform that action at this time.
0 commit comments