Skip to content

Commit 9fdb7f0

Browse files
committed
Update AWSResourceManagerFactory to include roleARN paramter
This patch modifies the `AWSResourceManageFactory` intgerface and its implementation to include a `roleARN` parameter in the `ManagerFor` function. The addition of `roleARN` is necessary to support fine-grained access control and multi-tenant scenarios where different IAM roles may be used within the same AWS account and region. This change corresponds to the updates in code-generaotr repository.
1 parent dda2022 commit 9fdb7f0

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

mocks/pkg/types/aws_resource_manager_factory.go

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/runtime/adoption_reconciler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func (r *adoptionReconciler) reconcile(ctx context.Context, req ctrlrt.Request)
142142
ackrtlog.InfoAdoptedResource(r.log, res, "starting adoption reconciliation")
143143

144144
rm, err := rmf.ManagerFor(
145-
r.cfg, r.log, r.metrics, r, sess, acctID, region,
145+
r.cfg, r.log, r.metrics, r, sess, acctID, region, roleARN,
146146
)
147147
if err != nil {
148148
return err

pkg/runtime/reconciler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ func (r *resourceReconciler) Reconcile(ctx context.Context, req ctrlrt.Request)
266266
)
267267

268268
rm, err := r.rmf.ManagerFor(
269-
r.cfg, r.log, r.metrics, r, sess, acctID, region,
269+
r.cfg, r.log, r.metrics, r, sess, acctID, region, roleARN,
270270
)
271271
if err != nil {
272272
return ctrlrt.Result{}, err

pkg/types/aws_resource_manager.go

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ type AWSResourceManagerFactory interface {
106106
*session.Session,
107107
ackv1alpha1.AWSAccountID,
108108
ackv1alpha1.AWSRegion,
109+
ackv1alpha1.AWSResourceName,
109110
) (AWSResourceManager, error)
110111
// IsAdoptable returns true if the resource is able to be adopted
111112
IsAdoptable() bool

0 commit comments

Comments
 (0)