-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from mustafasencer/fix-adopt-subscription-reso…
…urce Fix subscription resource adoption
- Loading branch information
Showing
9 changed files
with
87 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
ack_generate_info: | ||
build_date: "2023-05-31T12:45:46Z" | ||
build_date: "2023-06-01T10:26:45Z" | ||
build_hash: 8f3ba427974fd6e769926778d54834eaee3b81a3 | ||
go_version: go1.19 | ||
version: v0.26.1 | ||
api_directory_checksum: 017e52b555b690a39a60e82a6f9574ab42b52973 | ||
api_version: v1alpha1 | ||
aws_sdk_go_version: v1.44.197 | ||
generator_config_info: | ||
file_checksum: 9a21f966d921ec65e3229f88851e55c4fb43948a | ||
file_checksum: e8c9e140ef5690daab43e5452645acfd993dc678 | ||
original_file_name: generator.yaml | ||
last_modification: | ||
reason: API generation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
templates/hooks/subscription/sdk_get_attributes_pre_set_output.go.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
// If one of the below 3 fields (i.e. Protocol, Endpoint, TopicARN/TopicRef) is empty | ||
// populate them with their respective attribute values | ||
// present in the response of the GetSubscriptionAttributes API call | ||
// Use case: adopting an existing subscription by subcription ARN | ||
if ko.Spec.Protocol == nil { | ||
ko.Spec.Protocol = resp.Attributes["Protocol"] | ||
} | ||
if ko.Spec.Endpoint == nil { | ||
ko.Spec.Endpoint = resp.Attributes["Endpoint"] | ||
} | ||
if ko.Spec.TopicARN == nil && ko.Spec.TopicRef == nil { | ||
ko.Spec.TopicARN = resp.Attributes["TopicArn"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters