Skip to content

Commit

Permalink
Add primary keys for generator (#33)
Browse files Browse the repository at this point in the history
The following resources have ARNs which are set at the primary key:

- [PlatformEndpoint](https://docs.aws.amazon.com/sns/latest/api/API_GetEndpointAttributes.html)
- [PlatformApplication](https://docs.aws.amazon.com/sns/latest/api/API_GetPlatformApplicationAttributes.html)
- [Topic](https://docs.aws.amazon.com/sns/latest/api/API_GetTopicAttributes.html)
- [Subscription](https://docs.aws.amazon.com/sns/latest/api/API_GetSubscriptionAttributes.html)

Issue aws-controllers-k8s/community#1778

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
arjunrn authored Apr 24, 2023
1 parent ad2b4e4 commit 3470eef
Show file tree
Hide file tree
Showing 13 changed files with 266 additions and 166 deletions.
10 changes: 5 additions & 5 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2023-04-04T18:27:42Z"
build_hash: a6ae2078e57187b2daf47978bc07bd67072d2cba
build_date: "2023-04-19T08:40:46Z"
build_hash: e69321ed2d9567bf2d439af970b7466086f0b4fa
go_version: go1.19.4
version: v0.25.0-1-ga6ae207
api_directory_checksum: b14be96ab59442ec6c1665e0c1a14713da9e5f42
version: v0.25.0-6-ge69321e
api_directory_checksum: 017e52b555b690a39a60e82a6f9574ab42b52973
api_version: v1alpha1
aws_sdk_go_version: v1.44.197
generator_config_info:
file_checksum: eb6753cd4cab8dea8412148ed883fca3928ec692
file_checksum: 9da316c2b7ef89650333f38895f067642d5c5e34
original_file_name: generator.yaml
last_modification:
reason: API generation
4 changes: 4 additions & 0 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ operations:
operation_type: SET_ATTRIBUTES
resources:
Topic:
is_arn_primary_key: true
update_operation:
custom_method_name: customUpdate
unpack_attributes_map:
Expand Down Expand Up @@ -87,6 +88,7 @@ resources:
compare:
is_ignored: true
PlatformApplication:
is_arn_primary_key: true
unpack_attributes_map:
set_attributes_single_attribute: false
fields:
Expand Down Expand Up @@ -133,6 +135,7 @@ resources:
tags:
ignore: true
PlatformEndpoint:
is_arn_primary_key: true
unpack_attributes_map:
set_attributes_single_attribute: false
fields:
Expand All @@ -145,6 +148,7 @@ resources:
tags:
ignore: true
Subscription:
is_arn_primary_key: true
update_operation:
custom_method_name: customUpdate
unpack_attributes_map:
Expand Down
4 changes: 4 additions & 0 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ operations:
operation_type: SET_ATTRIBUTES
resources:
Topic:
is_arn_primary_key: true
update_operation:
custom_method_name: customUpdate
unpack_attributes_map:
Expand Down Expand Up @@ -87,6 +88,7 @@ resources:
compare:
is_ignored: true
PlatformApplication:
is_arn_primary_key: true
unpack_attributes_map:
set_attributes_single_attribute: false
fields:
Expand Down Expand Up @@ -133,6 +135,7 @@ resources:
tags:
ignore: true
PlatformEndpoint:
is_arn_primary_key: true
unpack_attributes_map:
set_attributes_single_attribute: false
fields:
Expand All @@ -145,6 +148,7 @@ resources:
tags:
ignore: true
Subscription:
is_arn_primary_key: true
update_operation:
custom_method_name: customUpdate
unpack_attributes_map:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
github.com/aws-controllers-k8s/iam-controller v1.1.1
github.com/aws-controllers-k8s/kms-controller v1.0.2
github.com/aws-controllers-k8s/runtime v0.25.0
github.com/aws-controllers-k8s/runtime v0.26.0
github.com/aws/aws-sdk-go v1.44.197
github.com/go-logr/logr v1.2.3
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ github.com/aws-controllers-k8s/iam-controller v1.1.1 h1:O6arh7DNlQF26MEKzgA2/kBE
github.com/aws-controllers-k8s/iam-controller v1.1.1/go.mod h1:2+ARwRpazTq5MErjMz0MpXHhtAzRfNtY56Uj0gvu9vE=
github.com/aws-controllers-k8s/kms-controller v1.0.2 h1:v8nh/oaX/U6spCwBDaWyem7XXpzoP/MnkJyEjNOZN9s=
github.com/aws-controllers-k8s/kms-controller v1.0.2/go.mod h1:BeoijsyGjJ9G5VcDjpFdxBW0IxaeKXYX497XmUJiPSQ=
github.com/aws-controllers-k8s/runtime v0.25.0 h1:6SYa8qmbw+Yil5/LodF7LmIGxBhpjz4QEIvNjpeRuoc=
github.com/aws-controllers-k8s/runtime v0.25.0/go.mod h1:jizDzKikL09cueIuA9ZxoZ+4pfn5U7oKW5s/ZAqOA6E=
github.com/aws-controllers-k8s/runtime v0.26.0 h1:XKqygFzHSBtM74Ov9IroZbyCVeYei9Eskp4aKbJ2SFw=
github.com/aws-controllers-k8s/runtime v0.26.0/go.mod h1:jizDzKikL09cueIuA9ZxoZ+4pfn5U7oKW5s/ZAqOA6E=
github.com/aws/aws-sdk-go v1.44.197 h1:pkg/NZsov9v/CawQWy+qWVzJMIZRQypCtYjUBXFomF8=
github.com/aws/aws-sdk-go v1.44.197/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
Expand Down
Loading

0 comments on commit 3470eef

Please sign in to comment.