Skip to content

Add support for Security Group Adoption #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ack_generate_info:
build_date: "2024-01-03T22:47:06Z"
build_hash: 00e081fb541587f33970ad80c99f2ac02e9c2525
build_date: "2024-01-15T16:33:37Z"
build_hash: 3753ca3f6610172e9e652d6e5e62e0a05f2e639c
go_version: go1.21.5
version: v0.28.0-8-g00e081f
version: v0.28.0-11-g3753ca3
api_directory_checksum: 8b27f9e65dbad1f5f825c84d1dbe8fd333baf2a5
api_version: v1alpha1
aws_sdk_go_version: v1.44.93
Expand Down
5 changes: 5 additions & 0 deletions pkg/resource/security_group/sdk.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
if found {
// Needed because SecurityGroups Name are held in GroupName property of the AWS resource
ko.Spec.Name = resp.SecurityGroups[0].GroupName
Comment on lines +2 to +5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to add generated file in this PR.

This seems to be a good approach to handle adoptedResource

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pcolazurdo

Please let me know if you plan to make this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I was sick, new version with generated files should be in

rm.addRulesToSpec(ko, resp.SecurityGroups[0])
// A ReadOne call for SecurityGroup Rules (NOT SecurityGroups)
Expand All @@ -8,4 +12,4 @@
} else {
ko.Status.Rules = rules
}
}
}