diff --git a/apis/acm/v1beta1/zz_generated.resolvers.go b/apis/acm/v1beta1/zz_generated.resolvers.go index d4431b677a..95c5502f4b 100644 --- a/apis/acm/v1beta1/zz_generated.resolvers.go +++ b/apis/acm/v1beta1/zz_generated.resolvers.go @@ -19,18 +19,14 @@ func (mg *CertificateValidation) ResolveReferences( // ResolveReferences of this ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -47,12 +43,9 @@ func (mg *CertificateValidation) ResolveReferences( // ResolveReferences of this mg.Spec.ForProvider.CertificateArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CertificateArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/acmpca/v1beta1/zz_generated.resolvers.go b/apis/acmpca/v1beta1/zz_generated.resolvers.go index 821b06dd97..26f75f1642 100644 --- a/apis/acmpca/v1beta1/zz_generated.resolvers.go +++ b/apis/acmpca/v1beta1/zz_generated.resolvers.go @@ -20,17 +20,13 @@ func (mg *Certificate) ResolveReferences( // ResolveReferences of this Certifica ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", - - "v1beta1", "CertificateAuthority", "CertificateAuthorityList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", "v1beta1", "CertificateAuthority", "CertificateAuthorityList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -48,11 +44,8 @@ func (mg *Certificate) ResolveReferences( // ResolveReferences of this Certifica mg.Spec.ForProvider.CertificateAuthorityArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CertificateAuthorityArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", - - "v1beta1", "CertificateAuthority", "CertificateAuthorityList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", "v1beta1", "CertificateAuthority", "CertificateAuthorityList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -77,17 +70,13 @@ func (mg *Certificate) ResolveReferences( // ResolveReferences of this Certifica func (mg *CertificateAuthorityCertificate) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", - - "v1beta1", "CertificateAuthority", "CertificateAuthorityList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", "v1beta1", "CertificateAuthority", "CertificateAuthorityList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -105,11 +94,8 @@ func (mg *CertificateAuthorityCertificate) ResolveReferences(ctx context.Context mg.Spec.ForProvider.CertificateAuthorityArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CertificateAuthorityArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", - - "v1beta1", "CertificateAuthority", "CertificateAuthorityList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", "v1beta1", "CertificateAuthority", "CertificateAuthorityList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -134,17 +120,13 @@ func (mg *CertificateAuthorityCertificate) ResolveReferences(ctx context.Context func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", - - "v1beta1", "CertificateAuthority", "CertificateAuthorityList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", "v1beta1", "CertificateAuthority", "CertificateAuthorityList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -162,11 +144,8 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.CertificateAuthorityArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CertificateAuthorityArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", - - "v1beta1", "CertificateAuthority", "CertificateAuthorityList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", "v1beta1", "CertificateAuthority", "CertificateAuthorityList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -191,17 +170,13 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", - - "v1beta1", "CertificateAuthority", "CertificateAuthorityList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", "v1beta1", "CertificateAuthority", "CertificateAuthorityList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -219,11 +194,8 @@ func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.ResourceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", - - "v1beta1", "CertificateAuthority", "CertificateAuthorityList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("acmpca.aws.upbound.io", "v1beta1", "CertificateAuthority", "CertificateAuthorityList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/amp/v1beta1/zz_generated.resolvers.go b/apis/amp/v1beta1/zz_generated.resolvers.go index cb41192a5c..80a050a8c9 100644 --- a/apis/amp/v1beta1/zz_generated.resolvers.go +++ b/apis/amp/v1beta1/zz_generated.resolvers.go @@ -20,18 +20,14 @@ func (mg *AlertManagerDefinition) ResolveReferences( // ResolveReferences of thi ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("amp.aws.upbound.io", - - "v1beta1", "Workspace", "WorkspaceList") + m, l, err = apisresolver.GetManagedResource("amp.aws.upbound.io", "v1beta1", "Workspace", "WorkspaceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -48,12 +44,9 @@ func (mg *AlertManagerDefinition) ResolveReferences( // ResolveReferences of thi mg.Spec.ForProvider.WorkspaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.WorkspaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("amp.aws.upbound.io", - - "v1beta1", "Workspace", "WorkspaceList") + m, l, err = apisresolver.GetManagedResource("amp.aws.upbound.io", "v1beta1", "Workspace", "WorkspaceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -77,18 +70,14 @@ func (mg *AlertManagerDefinition) ResolveReferences( // ResolveReferences of thi func (mg *RuleGroupNamespace) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("amp.aws.upbound.io", - - "v1beta1", "Workspace", "WorkspaceList") + m, l, err = apisresolver.GetManagedResource("amp.aws.upbound.io", "v1beta1", "Workspace", "WorkspaceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/amplify/v1beta1/zz_generated.resolvers.go b/apis/amplify/v1beta1/zz_generated.resolvers.go index 42d42b310c..582b607a0e 100644 --- a/apis/amplify/v1beta1/zz_generated.resolvers.go +++ b/apis/amplify/v1beta1/zz_generated.resolvers.go @@ -23,19 +23,14 @@ import ( func (mg *App) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -52,13 +47,9 @@ func (mg *App) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.IAMServiceRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IAMServiceRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -82,19 +73,14 @@ func (mg *App) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *BackendEnvironment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("amplify.aws.upbound.io", - - "v1beta1", "App", "AppList") + m, l, err = apisresolver.GetManagedResource("amplify.aws.upbound.io", "v1beta1", "App", "AppList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -118,19 +104,14 @@ func (mg *BackendEnvironment) ResolveReferences(ctx context.Context, c client.Re func (mg *Branch) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("amplify.aws.upbound.io", - - "v1beta1", "App", "AppList") + m, l, err = apisresolver.GetManagedResource("amplify.aws.upbound.io", "v1beta1", "App", "AppList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -154,19 +135,14 @@ func (mg *Branch) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *Webhook) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("amplify.aws.upbound.io", - - "v1beta1", "App", "AppList") + m, l, err = apisresolver.GetManagedResource("amplify.aws.upbound.io", "v1beta1", "App", "AppList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -183,12 +159,9 @@ func (mg *Webhook) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.AppID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AppIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("amplify.aws.upbound.io", - - "v1beta1", "Branch", "BranchList") + m, l, err = apisresolver.GetManagedResource("amplify.aws.upbound.io", "v1beta1", "Branch", "BranchList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -205,13 +178,9 @@ func (mg *Webhook) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.BranchName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BranchNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("amplify.aws.upbound.io", - - "v1beta1", "App", "AppList") + m, l, err = apisresolver.GetManagedResource("amplify.aws.upbound.io", "v1beta1", "App", "AppList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -228,12 +197,9 @@ func (mg *Webhook) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.AppID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.AppIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("amplify.aws.upbound.io", - - "v1beta1", "Branch", "BranchList") + m, l, err = apisresolver.GetManagedResource("amplify.aws.upbound.io", "v1beta1", "Branch", "BranchList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/apigateway/v1beta1/zz_generated.resolvers.go b/apis/apigateway/v1beta1/zz_generated.resolvers.go index 8c4afba47c..0341ada7f2 100644 --- a/apis/apigateway/v1beta1/zz_generated.resolvers.go +++ b/apis/apigateway/v1beta1/zz_generated.resolvers.go @@ -23,19 +23,14 @@ import ( func (mg *Account) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -52,13 +47,9 @@ func (mg *Account) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.CloudwatchRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CloudwatchRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -82,19 +73,14 @@ func (mg *Account) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *Authorizer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -111,12 +97,9 @@ func (mg *Authorizer) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.AuthorizerCredentials = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AuthorizerCredentialsRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -133,12 +116,9 @@ func (mg *Authorizer) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.AuthorizerURI = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AuthorizerURIRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -155,13 +135,9 @@ func (mg *Authorizer) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -178,12 +154,9 @@ func (mg *Authorizer) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.AuthorizerCredentials = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.AuthorizerCredentialsRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -200,12 +173,9 @@ func (mg *Authorizer) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.AuthorizerURI = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.AuthorizerURIRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -229,18 +199,14 @@ func (mg *Authorizer) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *BasePathMapping) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -257,9 +223,7 @@ func (mg *BasePathMapping) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "DomainName", "DomainNameList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "DomainName", "DomainNameList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -278,12 +242,9 @@ func (mg *BasePathMapping) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.DomainName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DomainNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Stage", "StageList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Stage", "StageList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -300,12 +261,9 @@ func (mg *BasePathMapping) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.StageName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StageNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -322,9 +280,7 @@ func (mg *BasePathMapping) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "DomainName", "DomainNameList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "DomainName", "DomainNameList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -343,12 +299,9 @@ func (mg *BasePathMapping) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.DomainName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DomainNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Stage", "StageList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Stage", "StageList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -372,18 +325,14 @@ func (mg *BasePathMapping) ResolveReferences(ctx context.Context, c client.Reade func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -400,12 +349,9 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -429,18 +375,14 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *DocumentationPart) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -457,12 +399,9 @@ func (mg *DocumentationPart) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -486,18 +425,14 @@ func (mg *DocumentationPart) ResolveReferences(ctx context.Context, c client.Rea func (mg *DocumentationVersion) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -514,12 +449,9 @@ func (mg *DocumentationVersion) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -543,17 +475,13 @@ func (mg *DocumentationVersion) ResolveReferences(ctx context.Context, c client. func (mg *DomainName) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "CertificateValidation", "CertificateValidationList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "CertificateValidation", "CertificateValidationList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -571,11 +499,8 @@ func (mg *DomainName) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.CertificateArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CertificateArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "CertificateValidation", "CertificateValidationList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "CertificateValidation", "CertificateValidationList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -593,11 +518,8 @@ func (mg *DomainName) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.RegionalCertificateArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RegionalCertificateArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "CertificateValidation", "CertificateValidationList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "CertificateValidation", "CertificateValidationList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -615,11 +537,8 @@ func (mg *DomainName) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.CertificateArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.CertificateArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "CertificateValidation", "CertificateValidationList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "CertificateValidation", "CertificateValidationList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -644,18 +563,14 @@ func (mg *DomainName) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *GatewayResponse) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -672,12 +587,9 @@ func (mg *GatewayResponse) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -701,18 +613,14 @@ func (mg *GatewayResponse) ResolveReferences(ctx context.Context, c client.Reade func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "VPCLink", "VPCLinkList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "VPCLink", "VPCLinkList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -729,12 +637,9 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Method", "MethodList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Method", "MethodList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -751,9 +656,7 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.HTTPMethod = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.HTTPMethodRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Resource", "ResourceList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Resource", "ResourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -772,12 +675,9 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -794,12 +694,9 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -816,12 +713,9 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.URI = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.URIRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "VPCLink", "VPCLinkList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "VPCLink", "VPCLinkList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -838,12 +732,9 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Method", "MethodList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Method", "MethodList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -860,9 +751,7 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.HTTPMethod = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.HTTPMethodRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Resource", "ResourceList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Resource", "ResourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -881,12 +770,9 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -903,12 +789,9 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -932,18 +815,14 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Method", "MethodList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Method", "MethodList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -960,9 +839,7 @@ func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.HTTPMethod = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.HTTPMethodRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Resource", "ResourceList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Resource", "ResourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -981,12 +858,9 @@ func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1003,9 +877,7 @@ func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "MethodResponse", "MethodResponseList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "MethodResponse", "MethodResponseList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1024,12 +896,9 @@ func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.StatusCode = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StatusCodeRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Method", "MethodList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Method", "MethodList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1046,9 +915,7 @@ func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.R mg.Spec.InitProvider.HTTPMethod = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.HTTPMethodRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Resource", "ResourceList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Resource", "ResourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1067,12 +934,9 @@ func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.R mg.Spec.InitProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1089,9 +953,7 @@ func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.R mg.Spec.InitProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "MethodResponse", "MethodResponseList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "MethodResponse", "MethodResponseList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1117,15 +979,12 @@ func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.R func (mg *Method) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Authorizer", "AuthorizerList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Authorizer", "AuthorizerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1144,9 +1003,7 @@ func (mg *Method) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.AuthorizerID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AuthorizerIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Resource", "ResourceList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Resource", "ResourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1165,12 +1022,9 @@ func (mg *Method) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1187,9 +1041,7 @@ func (mg *Method) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Authorizer", "AuthorizerList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Authorizer", "AuthorizerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1208,9 +1060,7 @@ func (mg *Method) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.AuthorizerID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.AuthorizerIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Resource", "ResourceList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Resource", "ResourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1229,12 +1079,9 @@ func (mg *Method) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1258,18 +1105,14 @@ func (mg *Method) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *MethodResponse) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Method", "MethodList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Method", "MethodList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1286,9 +1129,7 @@ func (mg *MethodResponse) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.HTTPMethod = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.HTTPMethodRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Resource", "ResourceList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Resource", "ResourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1307,12 +1148,9 @@ func (mg *MethodResponse) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1329,12 +1167,9 @@ func (mg *MethodResponse) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Method", "MethodList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Method", "MethodList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1351,9 +1186,7 @@ func (mg *MethodResponse) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.HTTPMethod = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.HTTPMethodRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Resource", "ResourceList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Resource", "ResourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1372,12 +1205,9 @@ func (mg *MethodResponse) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1401,18 +1231,14 @@ func (mg *MethodResponse) ResolveReferences(ctx context.Context, c client.Reader func (mg *MethodSettings) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1429,12 +1255,9 @@ func (mg *MethodSettings) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Stage", "StageList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Stage", "StageList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1451,12 +1274,9 @@ func (mg *MethodSettings) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.StageName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StageNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1473,12 +1293,9 @@ func (mg *MethodSettings) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Stage", "StageList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Stage", "StageList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1502,18 +1319,14 @@ func (mg *MethodSettings) ResolveReferences(ctx context.Context, c client.Reader func (mg *Model) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1530,12 +1343,9 @@ func (mg *Model) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1559,18 +1369,14 @@ func (mg *Model) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *RequestValidator) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1587,12 +1393,9 @@ func (mg *RequestValidator) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1616,18 +1419,14 @@ func (mg *RequestValidator) ResolveReferences(ctx context.Context, c client.Read func (mg *Resource) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1644,12 +1443,9 @@ func (mg *Resource) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.ParentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ParentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1666,12 +1462,9 @@ func (mg *Resource) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1688,12 +1481,9 @@ func (mg *Resource) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.ParentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ParentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1717,18 +1507,14 @@ func (mg *Resource) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *RestAPIPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1745,12 +1531,9 @@ func (mg *RestAPIPolicy) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1774,15 +1557,12 @@ func (mg *RestAPIPolicy) ResolveReferences(ctx context.Context, c client.Reader) func (mg *Stage) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Deployment", "DeploymentList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Deployment", "DeploymentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1801,12 +1581,9 @@ func (mg *Stage) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.DeploymentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DeploymentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1823,9 +1600,7 @@ func (mg *Stage) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.RestAPIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RestAPIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Deployment", "DeploymentList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Deployment", "DeploymentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1844,12 +1619,9 @@ func (mg *Stage) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.DeploymentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DeploymentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1873,7 +1645,6 @@ func (mg *Stage) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *UsagePlan) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -1881,14 +1652,10 @@ func (mg *UsagePlan) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.ForProvider.APIStages); i3++ { { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.APIStages[i3].APIID), Extract: resource.ExtractResourceID(), @@ -1906,14 +1673,10 @@ func (mg *UsagePlan) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.ForProvider.APIStages); i3++ { { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Stage", "StageList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Stage", "StageList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.APIStages[i3].Stage), Extract: resource.ExtractParamPath("stage_name", false), @@ -1931,14 +1694,10 @@ func (mg *UsagePlan) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.InitProvider.APIStages); i3++ { { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "RestAPI", "RestAPIList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "RestAPI", "RestAPIList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.APIStages[i3].APIID), Extract: resource.ExtractResourceID(), @@ -1956,14 +1715,10 @@ func (mg *UsagePlan) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.InitProvider.APIStages); i3++ { { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "Stage", "StageList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "Stage", "StageList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.APIStages[i3].Stage), Extract: resource.ExtractParamPath("stage_name", false), @@ -1987,18 +1742,14 @@ func (mg *UsagePlan) ResolveReferences(ctx context.Context, c client.Reader) err func (mg *UsagePlanKey) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "APIKey", "APIKeyList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "APIKey", "APIKeyList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2015,9 +1766,7 @@ func (mg *UsagePlanKey) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.KeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "UsagePlan", "UsagePlanList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "UsagePlan", "UsagePlanList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2036,12 +1785,9 @@ func (mg *UsagePlanKey) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.UsagePlanID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UsagePlanIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "APIKey", "APIKeyList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "APIKey", "APIKeyList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2058,9 +1804,7 @@ func (mg *UsagePlanKey) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.KeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", - - "v1beta1", "UsagePlan", "UsagePlanList") + m, l, err = apisresolver.GetManagedResource("apigateway.aws.upbound.io", "v1beta1", "UsagePlan", "UsagePlanList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2086,19 +1830,14 @@ func (mg *UsagePlanKey) ResolveReferences(ctx context.Context, c client.Reader) func (mg *VPCLink) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LB", "LBList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LB", "LBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -2115,13 +1854,9 @@ func (mg *VPCLink) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.TargetArns = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.TargetArnRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LB", "LBList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LB", "LBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ diff --git a/apis/apigatewayv2/v1beta1/zz_generated.resolvers.go b/apis/apigatewayv2/v1beta1/zz_generated.resolvers.go index 4c7743a664..30714f829b 100644 --- a/apis/apigatewayv2/v1beta1/zz_generated.resolvers.go +++ b/apis/apigatewayv2/v1beta1/zz_generated.resolvers.go @@ -24,15 +24,12 @@ func (mg *APIMapping) ResolveReferences( // ResolveReferences of this APIMapping ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -51,9 +48,7 @@ func (mg *APIMapping) ResolveReferences( // ResolveReferences of this APIMapping mg.Spec.ForProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "DomainName", "DomainNameList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "DomainName", "DomainNameList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -72,12 +67,9 @@ func (mg *APIMapping) ResolveReferences( // ResolveReferences of this APIMapping mg.Spec.ForProvider.DomainName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DomainNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "Stage", "StageList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "Stage", "StageList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -94,9 +86,7 @@ func (mg *APIMapping) ResolveReferences( // ResolveReferences of this APIMapping mg.Spec.ForProvider.Stage = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StageRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -115,9 +105,7 @@ func (mg *APIMapping) ResolveReferences( // ResolveReferences of this APIMapping mg.Spec.InitProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "DomainName", "DomainNameList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "DomainName", "DomainNameList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -136,12 +124,9 @@ func (mg *APIMapping) ResolveReferences( // ResolveReferences of this APIMapping mg.Spec.InitProvider.DomainName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DomainNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "Stage", "StageList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "Stage", "StageList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -165,15 +150,12 @@ func (mg *APIMapping) ResolveReferences( // ResolveReferences of this APIMapping func (mg *Authorizer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -192,12 +174,9 @@ func (mg *Authorizer) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -214,9 +193,7 @@ func (mg *Authorizer) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.AuthorizerURI = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AuthorizerURIRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -235,12 +212,9 @@ func (mg *Authorizer) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -264,15 +238,12 @@ func (mg *Authorizer) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -291,9 +262,7 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -319,7 +288,6 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *DomainName) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -327,14 +295,10 @@ func (mg *DomainName) ResolveReferences(ctx context.Context, c client.Reader) er for i3 := 0; i3 < len(mg.Spec.ForProvider.DomainNameConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DomainNameConfiguration[i3].CertificateArn), Extract: common.ARNExtractor(), @@ -352,14 +316,10 @@ func (mg *DomainName) ResolveReferences(ctx context.Context, c client.Reader) er } for i3 := 0; i3 < len(mg.Spec.InitProvider.DomainNameConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DomainNameConfiguration[i3].CertificateArn), Extract: common.ARNExtractor(), @@ -383,15 +343,12 @@ func (mg *DomainName) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -410,9 +367,7 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "VPCLink", "VPCLinkList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "VPCLink", "VPCLinkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -431,13 +386,9 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -454,12 +405,9 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.CredentialsArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CredentialsArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -476,9 +424,7 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.IntegrationURI = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IntegrationURIRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -497,9 +443,7 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "VPCLink", "VPCLinkList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "VPCLink", "VPCLinkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -518,13 +462,9 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -541,12 +481,9 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.CredentialsArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.CredentialsArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -570,15 +507,12 @@ func (mg *Integration) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -597,9 +531,7 @@ func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "Integration", "IntegrationList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "Integration", "IntegrationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -618,9 +550,7 @@ func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.IntegrationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IntegrationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -639,9 +569,7 @@ func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.R mg.Spec.InitProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "Integration", "IntegrationList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "Integration", "IntegrationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -667,15 +595,12 @@ func (mg *IntegrationResponse) ResolveReferences(ctx context.Context, c client.R func (mg *Model) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -694,9 +619,7 @@ func (mg *Model) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -722,15 +645,12 @@ func (mg *Model) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -749,9 +669,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "Authorizer", "AuthorizerList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "Authorizer", "AuthorizerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -770,9 +688,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.AuthorizerID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AuthorizerIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "Integration", "IntegrationList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "Integration", "IntegrationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -791,9 +707,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.Target = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TargetRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -812,9 +726,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "Authorizer", "AuthorizerList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "Authorizer", "AuthorizerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -833,9 +745,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.AuthorizerID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.AuthorizerIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "Integration", "IntegrationList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "Integration", "IntegrationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -861,15 +771,12 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *RouteResponse) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -888,12 +795,9 @@ func (mg *RouteResponse) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "Route", "RouteList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "Route", "RouteList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -910,9 +814,7 @@ func (mg *RouteResponse) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.RouteID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RouteIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -931,12 +833,9 @@ func (mg *RouteResponse) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "Route", "RouteList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "Route", "RouteList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -960,15 +859,12 @@ func (mg *RouteResponse) ResolveReferences(ctx context.Context, c client.Reader) func (mg *Stage) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -987,9 +883,7 @@ func (mg *Stage) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "Deployment", "DeploymentList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "Deployment", "DeploymentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1008,9 +902,7 @@ func (mg *Stage) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.DeploymentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DeploymentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "API", "APIList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "API", "APIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1029,9 +921,7 @@ func (mg *Stage) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", - - "v1beta1", "Deployment", "DeploymentList") + m, l, err = apisresolver.GetManagedResource("apigatewayv2.aws.upbound.io", "v1beta1", "Deployment", "DeploymentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1057,15 +947,12 @@ func (mg *Stage) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *VPCLink) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1084,9 +971,7 @@ func (mg *VPCLink) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1105,9 +990,7 @@ func (mg *VPCLink) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1126,9 +1009,7 @@ func (mg *VPCLink) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/appautoscaling/v1beta1/zz_generated.resolvers.go b/apis/appautoscaling/v1beta1/zz_generated.resolvers.go index b182c2e6dd..127f2067f6 100644 --- a/apis/appautoscaling/v1beta1/zz_generated.resolvers.go +++ b/apis/appautoscaling/v1beta1/zz_generated.resolvers.go @@ -23,15 +23,12 @@ import ( func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", - - "v1beta1", "Target", "TargetList") + m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", "v1beta1", "Target", "TargetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -50,9 +47,7 @@ func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", - - "v1beta1", "Target", "TargetList") + m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", "v1beta1", "Target", "TargetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -71,9 +66,7 @@ func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.ScalableDimension = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ScalableDimensionRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", - - "v1beta1", "Target", "TargetList") + m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", "v1beta1", "Target", "TargetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -99,15 +92,12 @@ func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *ScheduledAction) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", - - "v1beta1", "Target", "TargetList") + m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", "v1beta1", "Target", "TargetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -126,9 +116,7 @@ func (mg *ScheduledAction) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", - - "v1beta1", "Target", "TargetList") + m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", "v1beta1", "Target", "TargetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -147,9 +135,7 @@ func (mg *ScheduledAction) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.ScalableDimension = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ScalableDimensionRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", - - "v1beta1", "Target", "TargetList") + m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", "v1beta1", "Target", "TargetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -168,9 +154,7 @@ func (mg *ScheduledAction) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.ServiceNamespace = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServiceNamespaceRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", - - "v1beta1", "Target", "TargetList") + m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", "v1beta1", "Target", "TargetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -189,9 +173,7 @@ func (mg *ScheduledAction) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", - - "v1beta1", "Target", "TargetList") + m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", "v1beta1", "Target", "TargetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -210,9 +192,7 @@ func (mg *ScheduledAction) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.ScalableDimension = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ScalableDimensionRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", - - "v1beta1", "Target", "TargetList") + m, l, err = apisresolver.GetManagedResource("appautoscaling.aws.upbound.io", "v1beta1", "Target", "TargetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -238,19 +218,14 @@ func (mg *ScheduledAction) ResolveReferences(ctx context.Context, c client.Reade func (mg *Target) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -267,13 +242,9 @@ func (mg *Target) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/appconfig/v1beta1/zz_generated.resolvers.go b/apis/appconfig/v1beta1/zz_generated.resolvers.go index afb3bac3d2..3d4c6d48eb 100644 --- a/apis/appconfig/v1beta1/zz_generated.resolvers.go +++ b/apis/appconfig/v1beta1/zz_generated.resolvers.go @@ -22,15 +22,12 @@ func (mg *ConfigurationProfile) ResolveReferences( // ResolveReferences of this ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -49,13 +46,9 @@ func (mg *ConfigurationProfile) ResolveReferences( // ResolveReferences of this mg.Spec.ForProvider.ApplicationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ApplicationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -72,9 +65,7 @@ func (mg *ConfigurationProfile) ResolveReferences( // ResolveReferences of this mg.Spec.ForProvider.RetrievalRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RetrievalRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -93,13 +84,9 @@ func (mg *ConfigurationProfile) ResolveReferences( // ResolveReferences of this mg.Spec.InitProvider.ApplicationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ApplicationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -123,15 +110,12 @@ func (mg *ConfigurationProfile) ResolveReferences( // ResolveReferences of this func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -150,9 +134,7 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.ApplicationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ApplicationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "ConfigurationProfile", "ConfigurationProfileList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "ConfigurationProfile", "ConfigurationProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -171,10 +153,7 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.ConfigurationProfileID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConfigurationProfileIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "HostedConfigurationVersion", "HostedConfigurationVersionList", - ) + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "HostedConfigurationVersion", "HostedConfigurationVersionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -193,11 +172,8 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.ConfigurationVersion = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConfigurationVersionRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "DeploymentStrategy", "DeploymentStrategyList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "DeploymentStrategy", "DeploymentStrategyList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -215,9 +191,7 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.DeploymentStrategyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DeploymentStrategyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Environment", "EnvironmentList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Environment", "EnvironmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -236,13 +210,9 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.EnvironmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EnvironmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -259,9 +229,7 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.KMSKeyIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -280,9 +248,7 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.ApplicationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ApplicationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "ConfigurationProfile", "ConfigurationProfileList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "ConfigurationProfile", "ConfigurationProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -301,10 +267,7 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.ConfigurationProfileID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ConfigurationProfileIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "HostedConfigurationVersion", "HostedConfigurationVersionList", - ) + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "HostedConfigurationVersion", "HostedConfigurationVersionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -323,11 +286,8 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.ConfigurationVersion = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ConfigurationVersionRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "DeploymentStrategy", "DeploymentStrategyList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "DeploymentStrategy", "DeploymentStrategyList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -345,9 +305,7 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.DeploymentStrategyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DeploymentStrategyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Environment", "EnvironmentList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Environment", "EnvironmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -366,13 +324,9 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.EnvironmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.EnvironmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -396,15 +350,12 @@ func (mg *Deployment) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *Environment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -425,13 +376,10 @@ func (mg *Environment) ResolveReferences(ctx context.Context, c client.Reader) e for i3 := 0; i3 < len(mg.Spec.ForProvider.Monitor); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatch.aws.upbound.io", - - "v1beta1", "MetricAlarm", "MetricAlarmList") + m, l, err = apisresolver.GetManagedResource("cloudwatch.aws.upbound.io", "v1beta1", "MetricAlarm", "MetricAlarmList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Monitor[i3].AlarmArn), Extract: resource.ExtractParamPath("arn", true), @@ -449,15 +397,10 @@ func (mg *Environment) ResolveReferences(ctx context.Context, c client.Reader) e } for i3 := 0; i3 < len(mg.Spec.ForProvider.Monitor); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Monitor[i3].AlarmRoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -474,13 +417,10 @@ func (mg *Environment) ResolveReferences(ctx context.Context, c client.Reader) e } { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ApplicationID), Extract: resource.ExtractResourceID(), @@ -497,13 +437,10 @@ func (mg *Environment) ResolveReferences(ctx context.Context, c client.Reader) e for i3 := 0; i3 < len(mg.Spec.InitProvider.Monitor); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatch.aws.upbound.io", - - "v1beta1", "MetricAlarm", "MetricAlarmList") + m, l, err = apisresolver.GetManagedResource("cloudwatch.aws.upbound.io", "v1beta1", "MetricAlarm", "MetricAlarmList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Monitor[i3].AlarmArn), Extract: resource.ExtractParamPath("arn", true), @@ -521,15 +458,10 @@ func (mg *Environment) ResolveReferences(ctx context.Context, c client.Reader) e } for i3 := 0; i3 < len(mg.Spec.InitProvider.Monitor); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Monitor[i3].AlarmRoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -553,7 +485,6 @@ func (mg *Environment) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *Extension) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -562,15 +493,10 @@ func (mg *Extension) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.ForProvider.ActionPoint); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.ActionPoint[i3].Action); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ActionPoint[i3].Action[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -590,15 +516,10 @@ func (mg *Extension) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.ForProvider.ActionPoint); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.ActionPoint[i3].Action); i4++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ActionPoint[i3].Action[i4].URI), Extract: resource.ExtractParamPath("arn", true), @@ -618,15 +539,10 @@ func (mg *Extension) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.InitProvider.ActionPoint); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.ActionPoint[i3].Action); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ActionPoint[i3].Action[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -646,15 +562,10 @@ func (mg *Extension) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.InitProvider.ActionPoint); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.ActionPoint[i3].Action); i4++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ActionPoint[i3].Action[i4].URI), Extract: resource.ExtractParamPath("arn", true), @@ -679,15 +590,12 @@ func (mg *Extension) ResolveReferences(ctx context.Context, c client.Reader) err func (mg *ExtensionAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Extension", "ExtensionList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Extension", "ExtensionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -706,9 +614,7 @@ func (mg *ExtensionAssociation) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.ExtensionArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ExtensionArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -727,9 +633,7 @@ func (mg *ExtensionAssociation) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.ResourceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Extension", "ExtensionList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Extension", "ExtensionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -748,9 +652,7 @@ func (mg *ExtensionAssociation) ResolveReferences(ctx context.Context, c client. mg.Spec.InitProvider.ExtensionArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ExtensionArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -776,15 +678,12 @@ func (mg *ExtensionAssociation) ResolveReferences(ctx context.Context, c client. func (mg *HostedConfigurationVersion) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -803,9 +702,7 @@ func (mg *HostedConfigurationVersion) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.ApplicationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ApplicationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "ConfigurationProfile", "ConfigurationProfileList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "ConfigurationProfile", "ConfigurationProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -824,9 +721,7 @@ func (mg *HostedConfigurationVersion) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.ConfigurationProfileID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConfigurationProfileIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -845,9 +740,7 @@ func (mg *HostedConfigurationVersion) ResolveReferences(ctx context.Context, c c mg.Spec.InitProvider.ApplicationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ApplicationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", - - "v1beta1", "ConfigurationProfile", "ConfigurationProfileList") + m, l, err = apisresolver.GetManagedResource("appconfig.aws.upbound.io", "v1beta1", "ConfigurationProfile", "ConfigurationProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/appflow/v1beta1/zz_generated.resolvers.go b/apis/appflow/v1beta1/zz_generated.resolvers.go index 0c238a3fcd..3664dc6899 100644 --- a/apis/appflow/v1beta1/zz_generated.resolvers.go +++ b/apis/appflow/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ import ( func (mg *Flow) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -32,13 +31,10 @@ func (mg *Flow) ResolveReferences(ctx context.Context, c client.Reader) error { for i4 := 0; i4 < len(mg.Spec.ForProvider.DestinationFlowConfig[i3].DestinationConnectorProperties); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.DestinationFlowConfig[i3].DestinationConnectorProperties[i4].S3); i5++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "BucketPolicy", "BucketPolicyList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "BucketPolicy", "BucketPolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DestinationFlowConfig[i3].DestinationConnectorProperties[i4].S3[i5].BucketName), Extract: resource.ExtractParamPath("bucket", false), @@ -60,13 +56,10 @@ func (mg *Flow) ResolveReferences(ctx context.Context, c client.Reader) error { for i4 := 0; i4 < len(mg.Spec.ForProvider.SourceFlowConfig[i3].SourceConnectorProperties); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.SourceFlowConfig[i3].SourceConnectorProperties[i4].S3); i5++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "BucketPolicy", "BucketPolicyList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "BucketPolicy", "BucketPolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SourceFlowConfig[i3].SourceConnectorProperties[i4].S3[i5].BucketName), Extract: resource.ExtractParamPath("bucket", false), @@ -88,13 +81,10 @@ func (mg *Flow) ResolveReferences(ctx context.Context, c client.Reader) error { for i4 := 0; i4 < len(mg.Spec.InitProvider.DestinationFlowConfig[i3].DestinationConnectorProperties); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.DestinationFlowConfig[i3].DestinationConnectorProperties[i4].S3); i5++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "BucketPolicy", "BucketPolicyList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "BucketPolicy", "BucketPolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DestinationFlowConfig[i3].DestinationConnectorProperties[i4].S3[i5].BucketName), Extract: resource.ExtractParamPath("bucket", false), @@ -116,13 +106,10 @@ func (mg *Flow) ResolveReferences(ctx context.Context, c client.Reader) error { for i4 := 0; i4 < len(mg.Spec.InitProvider.SourceFlowConfig[i3].SourceConnectorProperties); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.SourceFlowConfig[i3].SourceConnectorProperties[i4].S3); i5++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "BucketPolicy", "BucketPolicyList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "BucketPolicy", "BucketPolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SourceFlowConfig[i3].SourceConnectorProperties[i4].S3[i5].BucketName), Extract: resource.ExtractParamPath("bucket", false), diff --git a/apis/appmesh/v1beta1/zz_generated.resolvers.go b/apis/appmesh/v1beta1/zz_generated.resolvers.go index 8fcbdc20c5..c61273ea69 100644 --- a/apis/appmesh/v1beta1/zz_generated.resolvers.go +++ b/apis/appmesh/v1beta1/zz_generated.resolvers.go @@ -21,7 +21,6 @@ func (mg *GatewayRoute) ResolveReferences( // ResolveReferences of this GatewayR ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -33,13 +32,10 @@ func (mg *GatewayRoute) ResolveReferences( // ResolveReferences of this GatewayR for i6 := 0; i6 < len(mg.Spec.ForProvider.Spec[i3].HTTPRoute[i4].Action[i5].Target); i6++ { for i7 := 0; i7 < len(mg.Spec.ForProvider.Spec[i3].HTTPRoute[i4].Action[i5].Target[i6].VirtualService); i7++ { { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualService", "VirtualServiceList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualService", "VirtualServiceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Spec[i3].HTTPRoute[i4].Action[i5].Target[i6].VirtualService[i7].VirtualServiceName), Extract: resource.ExtractParamPath("name", false), @@ -60,13 +56,10 @@ func (mg *GatewayRoute) ResolveReferences( // ResolveReferences of this GatewayR } } { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualGateway", "VirtualGatewayList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualGateway", "VirtualGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VirtualGatewayName), Extract: resource.ExtractParamPath("name", false), @@ -87,13 +80,10 @@ func (mg *GatewayRoute) ResolveReferences( // ResolveReferences of this GatewayR for i6 := 0; i6 < len(mg.Spec.InitProvider.Spec[i3].HTTPRoute[i4].Action[i5].Target); i6++ { for i7 := 0; i7 < len(mg.Spec.InitProvider.Spec[i3].HTTPRoute[i4].Action[i5].Target[i6].VirtualService); i7++ { { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualService", "VirtualServiceList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualService", "VirtualServiceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Spec[i3].HTTPRoute[i4].Action[i5].Target[i6].VirtualService[i7].VirtualServiceName), Extract: resource.ExtractParamPath("name", false), @@ -114,13 +104,10 @@ func (mg *GatewayRoute) ResolveReferences( // ResolveReferences of this GatewayR } } { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualGateway", "VirtualGatewayList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualGateway", "VirtualGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.VirtualGatewayName), Extract: resource.ExtractParamPath("name", false), @@ -142,15 +129,12 @@ func (mg *GatewayRoute) ResolveReferences( // ResolveReferences of this GatewayR func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "Mesh", "MeshList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "Mesh", "MeshList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -174,13 +158,10 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { for i5 := 0; i5 < len(mg.Spec.ForProvider.Spec[i3].HTTPRoute[i4].Action); i5++ { for i6 := 0; i6 < len(mg.Spec.ForProvider.Spec[i3].HTTPRoute[i4].Action[i5].WeightedTarget); i6++ { { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualNode", "VirtualNodeList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualNode", "VirtualNodeList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Spec[i3].HTTPRoute[i4].Action[i5].WeightedTarget[i6].VirtualNode), Extract: resource.ExtractParamPath("name", false), @@ -204,13 +185,10 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { for i5 := 0; i5 < len(mg.Spec.ForProvider.Spec[i3].TCPRoute[i4].Action); i5++ { for i6 := 0; i6 < len(mg.Spec.ForProvider.Spec[i3].TCPRoute[i4].Action[i5].WeightedTarget); i6++ { { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualNode", "VirtualNodeList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualNode", "VirtualNodeList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Spec[i3].TCPRoute[i4].Action[i5].WeightedTarget[i6].VirtualNode), Extract: resource.ExtractParamPath("name", false), @@ -230,13 +208,10 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { } } { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualRouter", "VirtualRouterList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualRouter", "VirtualRouterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VirtualRouterName), Extract: resource.ExtractParamPath("name", false), @@ -251,9 +226,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.VirtualRouterName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VirtualRouterNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "Mesh", "MeshList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "Mesh", "MeshList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -277,13 +250,10 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { for i5 := 0; i5 < len(mg.Spec.InitProvider.Spec[i3].HTTPRoute[i4].Action); i5++ { for i6 := 0; i6 < len(mg.Spec.InitProvider.Spec[i3].HTTPRoute[i4].Action[i5].WeightedTarget); i6++ { { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualNode", "VirtualNodeList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualNode", "VirtualNodeList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Spec[i3].HTTPRoute[i4].Action[i5].WeightedTarget[i6].VirtualNode), Extract: resource.ExtractParamPath("name", false), @@ -307,13 +277,10 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { for i5 := 0; i5 < len(mg.Spec.InitProvider.Spec[i3].TCPRoute[i4].Action); i5++ { for i6 := 0; i6 < len(mg.Spec.InitProvider.Spec[i3].TCPRoute[i4].Action[i5].WeightedTarget); i6++ { { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualNode", "VirtualNodeList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualNode", "VirtualNodeList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Spec[i3].TCPRoute[i4].Action[i5].WeightedTarget[i6].VirtualNode), Extract: resource.ExtractParamPath("name", false), @@ -333,13 +300,10 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { } } { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualRouter", "VirtualRouterList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualRouter", "VirtualRouterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.VirtualRouterName), Extract: resource.ExtractParamPath("name", false), @@ -361,7 +325,6 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *VirtualGateway) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -373,14 +336,10 @@ func (mg *VirtualGateway) ResolveReferences(ctx context.Context, c client.Reader for i6 := 0; i6 < len(mg.Spec.ForProvider.Spec[i3].Listener[i4].TLS[i5].Certificate); i6++ { for i7 := 0; i7 < len(mg.Spec.ForProvider.Spec[i3].Listener[i4].TLS[i5].Certificate[i6].Acm); i7++ { { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Spec[i3].Listener[i4].TLS[i5].Certificate[i6].Acm[i7].CertificateArn), Extract: resource.ExtractParamPath("arn", true), @@ -406,14 +365,10 @@ func (mg *VirtualGateway) ResolveReferences(ctx context.Context, c client.Reader for i6 := 0; i6 < len(mg.Spec.InitProvider.Spec[i3].Listener[i4].TLS[i5].Certificate); i6++ { for i7 := 0; i7 < len(mg.Spec.InitProvider.Spec[i3].Listener[i4].TLS[i5].Certificate[i6].Acm); i7++ { { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Spec[i3].Listener[i4].TLS[i5].Certificate[i6].Acm[i7].CertificateArn), Extract: resource.ExtractParamPath("arn", true), @@ -441,15 +396,12 @@ func (mg *VirtualGateway) ResolveReferences(ctx context.Context, c client.Reader func (mg *VirtualNode) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "Mesh", "MeshList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "Mesh", "MeshList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -472,14 +424,10 @@ func (mg *VirtualNode) ResolveReferences(ctx context.Context, c client.Reader) e for i4 := 0; i4 < len(mg.Spec.ForProvider.Spec[i3].ServiceDiscovery); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.Spec[i3].ServiceDiscovery[i4].AwsCloudMap); i5++ { { - m, l, err = apisresolver.GetManagedResource("servicediscovery.aws.upbound.io", - - "v1beta1", "HTTPNamespace", "HTTPNamespaceList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("servicediscovery.aws.upbound.io", "v1beta1", "HTTPNamespace", "HTTPNamespaceList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Spec[i3].ServiceDiscovery[i4].AwsCloudMap[i5].NamespaceName), Extract: resource.ExtractParamPath("name", false), @@ -498,13 +446,10 @@ func (mg *VirtualNode) ResolveReferences(ctx context.Context, c client.Reader) e } } { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "Mesh", "MeshList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "Mesh", "MeshList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.MeshName), Extract: resource.ExtractResourceID(), @@ -523,14 +468,10 @@ func (mg *VirtualNode) ResolveReferences(ctx context.Context, c client.Reader) e for i4 := 0; i4 < len(mg.Spec.InitProvider.Spec[i3].ServiceDiscovery); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.Spec[i3].ServiceDiscovery[i4].AwsCloudMap); i5++ { { - m, l, err = apisresolver.GetManagedResource("servicediscovery.aws.upbound.io", - - "v1beta1", "HTTPNamespace", "HTTPNamespaceList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("servicediscovery.aws.upbound.io", "v1beta1", "HTTPNamespace", "HTTPNamespaceList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Spec[i3].ServiceDiscovery[i4].AwsCloudMap[i5].NamespaceName), Extract: resource.ExtractParamPath("name", false), @@ -556,15 +497,12 @@ func (mg *VirtualNode) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *VirtualRouter) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "Mesh", "MeshList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "Mesh", "MeshList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -583,9 +521,7 @@ func (mg *VirtualRouter) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.MeshName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.MeshNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "Mesh", "MeshList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "Mesh", "MeshList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -611,15 +547,12 @@ func (mg *VirtualRouter) ResolveReferences(ctx context.Context, c client.Reader) func (mg *VirtualService) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "Mesh", "MeshList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "Mesh", "MeshList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -642,13 +575,10 @@ func (mg *VirtualService) ResolveReferences(ctx context.Context, c client.Reader for i4 := 0; i4 < len(mg.Spec.ForProvider.Spec[i3].Provider); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.Spec[i3].Provider[i4].VirtualNode); i5++ { { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualNode", "VirtualNodeList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualNode", "VirtualNodeList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Spec[i3].Provider[i4].VirtualNode[i5].VirtualNodeName), Extract: resource.ExtractParamPath("name", false), @@ -670,13 +600,10 @@ func (mg *VirtualService) ResolveReferences(ctx context.Context, c client.Reader for i4 := 0; i4 < len(mg.Spec.ForProvider.Spec[i3].Provider); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.Spec[i3].Provider[i4].VirtualRouter); i5++ { { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualRouter", "VirtualRouterList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualRouter", "VirtualRouterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Spec[i3].Provider[i4].VirtualRouter[i5].VirtualRouterName), Extract: resource.ExtractParamPath("name", false), @@ -695,13 +622,10 @@ func (mg *VirtualService) ResolveReferences(ctx context.Context, c client.Reader } } { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "Mesh", "MeshList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "Mesh", "MeshList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.MeshName), Extract: resource.ExtractResourceID(), @@ -720,13 +644,10 @@ func (mg *VirtualService) ResolveReferences(ctx context.Context, c client.Reader for i4 := 0; i4 < len(mg.Spec.InitProvider.Spec[i3].Provider); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.Spec[i3].Provider[i4].VirtualNode); i5++ { { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualNode", "VirtualNodeList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualNode", "VirtualNodeList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Spec[i3].Provider[i4].VirtualNode[i5].VirtualNodeName), Extract: resource.ExtractParamPath("name", false), @@ -748,13 +669,10 @@ func (mg *VirtualService) ResolveReferences(ctx context.Context, c client.Reader for i4 := 0; i4 < len(mg.Spec.InitProvider.Spec[i3].Provider); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.Spec[i3].Provider[i4].VirtualRouter); i5++ { { - m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", - - "v1beta1", "VirtualRouter", "VirtualRouterList") + m, l, err = apisresolver.GetManagedResource("appmesh.aws.upbound.io", "v1beta1", "VirtualRouter", "VirtualRouterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Spec[i3].Provider[i4].VirtualRouter[i5].VirtualRouterName), Extract: resource.ExtractParamPath("name", false), diff --git a/apis/apprunner/v1beta1/zz_generated.resolvers.go b/apis/apprunner/v1beta1/zz_generated.resolvers.go index 8f09fa5e43..f3b5fbddb9 100644 --- a/apis/apprunner/v1beta1/zz_generated.resolvers.go +++ b/apis/apprunner/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ import ( func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -31,13 +30,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.NetworkConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.NetworkConfiguration[i3].EgressConfiguration); i4++ { { - m, l, err = apisresolver.GetManagedResource("apprunner.aws.upbound.io", - - "v1beta1", "VPCConnector", "VPCConnectorList") + m, l, err = apisresolver.GetManagedResource("apprunner.aws.upbound.io", "v1beta1", "VPCConnector", "VPCConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.NetworkConfiguration[i3].EgressConfiguration[i4].VPCConnectorArn), Extract: resource.ExtractParamPath("arn", true), @@ -56,14 +52,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.ObservabilityConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("apprunner.aws.upbound.io", - - "v1beta1", "ObservabilityConfiguration", "ObservabilityConfigurationList", - ) + m, l, err = apisresolver.GetManagedResource("apprunner.aws.upbound.io", "v1beta1", "ObservabilityConfiguration", "ObservabilityConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ObservabilityConfiguration[i3].ObservabilityConfigurationArn), Extract: resource.ExtractParamPath("arn", true), @@ -82,13 +74,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.SourceConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.SourceConfiguration[i3].AuthenticationConfiguration); i4++ { { - m, l, err = apisresolver.GetManagedResource("apprunner.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("apprunner.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SourceConfiguration[i3].AuthenticationConfiguration[i4].ConnectionArn), Extract: resource.ExtractParamPath("arn", true), @@ -108,13 +97,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.NetworkConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.NetworkConfiguration[i3].EgressConfiguration); i4++ { { - m, l, err = apisresolver.GetManagedResource("apprunner.aws.upbound.io", - - "v1beta1", "VPCConnector", "VPCConnectorList") + m, l, err = apisresolver.GetManagedResource("apprunner.aws.upbound.io", "v1beta1", "VPCConnector", "VPCConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.NetworkConfiguration[i3].EgressConfiguration[i4].VPCConnectorArn), Extract: resource.ExtractParamPath("arn", true), @@ -133,14 +119,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.ObservabilityConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("apprunner.aws.upbound.io", - - "v1beta1", "ObservabilityConfiguration", "ObservabilityConfigurationList", - ) + m, l, err = apisresolver.GetManagedResource("apprunner.aws.upbound.io", "v1beta1", "ObservabilityConfiguration", "ObservabilityConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ObservabilityConfiguration[i3].ObservabilityConfigurationArn), Extract: resource.ExtractParamPath("arn", true), @@ -159,13 +141,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.SourceConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.SourceConfiguration[i3].AuthenticationConfiguration); i4++ { { - m, l, err = apisresolver.GetManagedResource("apprunner.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("apprunner.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SourceConfiguration[i3].AuthenticationConfiguration[i4].ConnectionArn), Extract: resource.ExtractParamPath("arn", true), @@ -190,15 +169,12 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *VPCConnector) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -217,9 +193,7 @@ func (mg *VPCConnector) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.SecurityGroups = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -238,9 +212,7 @@ func (mg *VPCConnector) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.Subnets = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -259,9 +231,7 @@ func (mg *VPCConnector) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.SecurityGroups = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/appstream/v1beta1/zz_generated.resolvers.go b/apis/appstream/v1beta1/zz_generated.resolvers.go index 8f64bf77fd..6f6d9d9e87 100644 --- a/apis/appstream/v1beta1/zz_generated.resolvers.go +++ b/apis/appstream/v1beta1/zz_generated.resolvers.go @@ -23,20 +23,15 @@ import ( func (mg *Fleet) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -55,13 +50,10 @@ func (mg *Fleet) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCConfig[i3].SubnetIds), Extract: reference.ExternalName(), @@ -78,15 +70,10 @@ func (mg *Fleet) ResolveReferences(ctx context.Context, c client.Reader) error { } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.IAMRoleArn), Extract: common.ARNExtractor(), @@ -103,13 +90,10 @@ func (mg *Fleet) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCConfig[i3].SubnetIds), Extract: reference.ExternalName(), @@ -133,18 +117,14 @@ func (mg *Fleet) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *FleetStackAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appstream.aws.upbound.io", - - "v1beta1", "Fleet", "FleetList") + m, l, err = apisresolver.GetManagedResource("appstream.aws.upbound.io", "v1beta1", "Fleet", "FleetList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -161,12 +141,9 @@ func (mg *FleetStackAssociation) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.FleetName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FleetNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appstream.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("appstream.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -190,20 +167,15 @@ func (mg *FleetStackAssociation) ResolveReferences(ctx context.Context, c client func (mg *ImageBuilder) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -222,13 +194,10 @@ func (mg *ImageBuilder) ResolveReferences(ctx context.Context, c client.Reader) for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCConfig[i3].SubnetIds), Extract: reference.ExternalName(), @@ -245,15 +214,10 @@ func (mg *ImageBuilder) ResolveReferences(ctx context.Context, c client.Reader) } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.IAMRoleArn), Extract: common.ARNExtractor(), @@ -270,13 +234,10 @@ func (mg *ImageBuilder) ResolveReferences(ctx context.Context, c client.Reader) for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCConfig[i3].SubnetIds), Extract: reference.ExternalName(), @@ -300,15 +261,12 @@ func (mg *ImageBuilder) ResolveReferences(ctx context.Context, c client.Reader) func (mg *UserStackAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appstream.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("appstream.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -327,12 +285,9 @@ func (mg *UserStackAssociation) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.AuthenticationType = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AuthenticationTypeRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appstream.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("appstream.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -349,9 +304,7 @@ func (mg *UserStackAssociation) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.StackName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appstream.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("appstream.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/appsync/v1beta1/zz_generated.resolvers.go b/apis/appsync/v1beta1/zz_generated.resolvers.go index 2dbb5cb617..b6547b6ff1 100644 --- a/apis/appsync/v1beta1/zz_generated.resolvers.go +++ b/apis/appsync/v1beta1/zz_generated.resolvers.go @@ -14,23 +14,21 @@ import ( xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" common "github.com/upbound/provider-aws/config/common" - apisresolver "github.com/upbound/provider-aws/internal/apis" client "sigs.k8s.io/controller-runtime/pkg/client" + + // ResolveReferences of this APICache. + apisresolver "github.com/upbound/provider-aws/internal/apis" ) -func (mg *APICache) ResolveReferences( // ResolveReferences of this APICache. - ctx context.Context, c client.Reader) error { +func (mg *APICache) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", - - "v1beta1", "GraphQLAPI", "GraphQLAPIList") + m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", "v1beta1", "GraphQLAPI", "GraphQLAPIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -49,9 +47,7 @@ func (mg *APICache) ResolveReferences( // ResolveReferences of this APICache. mg.Spec.ForProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", - - "v1beta1", "GraphQLAPI", "GraphQLAPIList") + m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", "v1beta1", "GraphQLAPI", "GraphQLAPIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -77,15 +73,12 @@ func (mg *APICache) ResolveReferences( // ResolveReferences of this APICache. func (mg *APIKey) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", - - "v1beta1", "GraphQLAPI", "GraphQLAPIList") + m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", "v1beta1", "GraphQLAPI", "GraphQLAPIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -111,15 +104,12 @@ func (mg *APIKey) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *Datasource) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", - - "v1beta1", "GraphQLAPI", "GraphQLAPIList") + m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", "v1beta1", "GraphQLAPI", "GraphQLAPIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -140,13 +130,10 @@ func (mg *Datasource) ResolveReferences(ctx context.Context, c client.Reader) er for i3 := 0; i3 < len(mg.Spec.ForProvider.DynamodbConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", - - "v1beta1", "Table", "TableList") + m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", "v1beta1", "Table", "TableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DynamodbConfig[i3].TableName), Extract: reference.ExternalName(), @@ -163,15 +150,10 @@ func (mg *Datasource) ResolveReferences(ctx context.Context, c client.Reader) er } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ServiceRoleArn), Extract: common.ARNExtractor(), @@ -188,13 +170,10 @@ func (mg *Datasource) ResolveReferences(ctx context.Context, c client.Reader) er for i3 := 0; i3 < len(mg.Spec.InitProvider.DynamodbConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", - - "v1beta1", "Table", "TableList") + m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", "v1beta1", "Table", "TableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DynamodbConfig[i3].TableName), Extract: reference.ExternalName(), @@ -211,15 +190,10 @@ func (mg *Datasource) ResolveReferences(ctx context.Context, c client.Reader) er } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ServiceRoleArn), Extract: common.ARNExtractor(), @@ -241,15 +215,12 @@ func (mg *Datasource) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", - - "v1beta1", "GraphQLAPI", "GraphQLAPIList") + m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", "v1beta1", "GraphQLAPI", "GraphQLAPIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -268,9 +239,7 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", - - "v1beta1", "Datasource", "DatasourceList") + m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", "v1beta1", "Datasource", "DatasourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -289,9 +258,7 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.DataSource = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DataSourceRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", - - "v1beta1", "GraphQLAPI", "GraphQLAPIList") + m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", "v1beta1", "GraphQLAPI", "GraphQLAPIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -310,9 +277,7 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", - - "v1beta1", "Datasource", "DatasourceList") + m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", "v1beta1", "Datasource", "DatasourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -338,7 +303,6 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *GraphQLAPI) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -346,15 +310,10 @@ func (mg *GraphQLAPI) ResolveReferences(ctx context.Context, c client.Reader) er for i3 := 0; i3 < len(mg.Spec.ForProvider.LogConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LogConfig[i3].CloudwatchLogsRoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -372,13 +331,10 @@ func (mg *GraphQLAPI) ResolveReferences(ctx context.Context, c client.Reader) er } for i3 := 0; i3 < len(mg.Spec.ForProvider.UserPoolConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.UserPoolConfig[i3].UserPoolID), Extract: resource.ExtractResourceID(), @@ -396,15 +352,10 @@ func (mg *GraphQLAPI) ResolveReferences(ctx context.Context, c client.Reader) er } for i3 := 0; i3 < len(mg.Spec.InitProvider.LogConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LogConfig[i3].CloudwatchLogsRoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -422,13 +373,10 @@ func (mg *GraphQLAPI) ResolveReferences(ctx context.Context, c client.Reader) er } for i3 := 0; i3 < len(mg.Spec.InitProvider.UserPoolConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.UserPoolConfig[i3].UserPoolID), Extract: resource.ExtractResourceID(), @@ -452,15 +400,12 @@ func (mg *GraphQLAPI) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *Resolver) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", - - "v1beta1", "GraphQLAPI", "GraphQLAPIList") + m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", "v1beta1", "GraphQLAPI", "GraphQLAPIList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -479,9 +424,7 @@ func (mg *Resolver) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.APIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.APIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", - - "v1beta1", "Datasource", "DatasourceList") + m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", "v1beta1", "Datasource", "DatasourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -500,9 +443,7 @@ func (mg *Resolver) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.DataSource = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DataSourceRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", - - "v1beta1", "Datasource", "DatasourceList") + m, l, err = apisresolver.GetManagedResource("appsync.aws.upbound.io", "v1beta1", "Datasource", "DatasourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/athena/v1beta1/zz_generated.resolvers.go b/apis/athena/v1beta1/zz_generated.resolvers.go index cfbf2e3570..7fa0f2a2a1 100644 --- a/apis/athena/v1beta1/zz_generated.resolvers.go +++ b/apis/athena/v1beta1/zz_generated.resolvers.go @@ -23,19 +23,14 @@ import ( func (mg *Database) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -52,13 +47,9 @@ func (mg *Database) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -82,18 +73,14 @@ func (mg *Database) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *NamedQuery) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("athena.aws.upbound.io", - - "v1beta1", "Database", "DatabaseList") + m, l, err = apisresolver.GetManagedResource("athena.aws.upbound.io", "v1beta1", "Database", "DatabaseList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -110,12 +97,9 @@ func (mg *NamedQuery) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.Database = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DatabaseRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("athena.aws.upbound.io", - - "v1beta1", "Workgroup", "WorkgroupList") + m, l, err = apisresolver.GetManagedResource("athena.aws.upbound.io", "v1beta1", "Workgroup", "WorkgroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -132,12 +116,9 @@ func (mg *NamedQuery) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.Workgroup = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.WorkgroupRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("athena.aws.upbound.io", - - "v1beta1", "Database", "DatabaseList") + m, l, err = apisresolver.GetManagedResource("athena.aws.upbound.io", "v1beta1", "Database", "DatabaseList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -154,12 +135,9 @@ func (mg *NamedQuery) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.Database = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DatabaseRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("athena.aws.upbound.io", - - "v1beta1", "Workgroup", "WorkgroupList") + m, l, err = apisresolver.GetManagedResource("athena.aws.upbound.io", "v1beta1", "Workgroup", "WorkgroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -183,7 +161,6 @@ func (mg *NamedQuery) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *Workgroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -193,15 +170,10 @@ func (mg *Workgroup) ResolveReferences(ctx context.Context, c client.Reader) err for i4 := 0; i4 < len(mg.Spec.ForProvider.Configuration[i3].ResultConfiguration); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.Configuration[i3].ResultConfiguration[i4].EncryptionConfiguration); i5++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Configuration[i3].ResultConfiguration[i4].EncryptionConfiguration[i5].KMSKeyArn), Extract: common.ARNExtractor(), @@ -223,15 +195,10 @@ func (mg *Workgroup) ResolveReferences(ctx context.Context, c client.Reader) err for i4 := 0; i4 < len(mg.Spec.InitProvider.Configuration[i3].ResultConfiguration); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.Configuration[i3].ResultConfiguration[i4].EncryptionConfiguration); i5++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Configuration[i3].ResultConfiguration[i4].EncryptionConfiguration[i5].KMSKeyArn), Extract: common.ARNExtractor(), diff --git a/apis/autoscaling/v1beta1/zz_generated.resolvers.go b/apis/autoscaling/v1beta1/zz_generated.resolvers.go index 2ad35d18be..62c2f5b534 100644 --- a/apis/autoscaling/v1beta1/zz_generated.resolvers.go +++ b/apis/autoscaling/v1beta1/zz_generated.resolvers.go @@ -22,17 +22,13 @@ func (mg *Attachment) ResolveReferences( // ResolveReferences of this Attachment ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", - - "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -50,13 +46,9 @@ func (mg *Attachment) ResolveReferences( // ResolveReferences of this Attachment mg.Spec.ForProvider.AutoscalingGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AutoscalingGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -73,9 +65,7 @@ func (mg *Attachment) ResolveReferences( // ResolveReferences of this Attachment mg.Spec.ForProvider.ELB = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ELBRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -94,11 +84,8 @@ func (mg *Attachment) ResolveReferences( // ResolveReferences of this Attachment mg.Spec.ForProvider.LBTargetGroupArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LBTargetGroupArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", - - "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -116,13 +103,9 @@ func (mg *Attachment) ResolveReferences( // ResolveReferences of this Attachment mg.Spec.InitProvider.AutoscalingGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.AutoscalingGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -139,9 +122,7 @@ func (mg *Attachment) ResolveReferences( // ResolveReferences of this Attachment mg.Spec.InitProvider.ELB = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ELBRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -167,16 +148,13 @@ func (mg *Attachment) ResolveReferences( // ResolveReferences of this Attachment func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", - - "v1beta1", "LaunchConfiguration", "LaunchConfigurationList") + m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", "v1beta1", "LaunchConfiguration", "LaunchConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -197,13 +175,10 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read for i3 := 0; i3 < len(mg.Spec.ForProvider.LaunchTemplate); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "LaunchTemplate", "LaunchTemplateList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "LaunchTemplate", "LaunchTemplateList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LaunchTemplate[i3].ID), Extract: resource.ExtractResourceID(), @@ -223,13 +198,10 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read for i4 := 0; i4 < len(mg.Spec.ForProvider.MixedInstancesPolicy[i3].LaunchTemplate); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.MixedInstancesPolicy[i3].LaunchTemplate[i4].LaunchTemplateSpecification); i5++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "LaunchTemplate", "LaunchTemplateList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "LaunchTemplate", "LaunchTemplateList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.MixedInstancesPolicy[i3].LaunchTemplate[i4].LaunchTemplateSpecification[i5].LaunchTemplateID), Extract: resource.ExtractResourceID(), @@ -252,13 +224,10 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read for i5 := 0; i5 < len(mg.Spec.ForProvider.MixedInstancesPolicy[i3].LaunchTemplate[i4].Override); i5++ { for i6 := 0; i6 < len(mg.Spec.ForProvider.MixedInstancesPolicy[i3].LaunchTemplate[i4].Override[i5].LaunchTemplateSpecification); i6++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "LaunchTemplate", "LaunchTemplateList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "LaunchTemplate", "LaunchTemplateList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.MixedInstancesPolicy[i3].LaunchTemplate[i4].Override[i5].LaunchTemplateSpecification[i6].LaunchTemplateID), Extract: resource.ExtractResourceID(), @@ -278,13 +247,10 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read } } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "PlacementGroup", "PlacementGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "PlacementGroup", "PlacementGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.PlacementGroup), Extract: resource.ExtractResourceID(), @@ -299,13 +265,9 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.PlacementGroup = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PlacementGroupRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -322,9 +284,7 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.ServiceLinkedRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServiceLinkedRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -343,9 +303,7 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.VPCZoneIdentifier = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.VPCZoneIdentifierRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", - - "v1beta1", "LaunchConfiguration", "LaunchConfigurationList") + m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", "v1beta1", "LaunchConfiguration", "LaunchConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -366,13 +324,10 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read for i3 := 0; i3 < len(mg.Spec.InitProvider.LaunchTemplate); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "LaunchTemplate", "LaunchTemplateList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "LaunchTemplate", "LaunchTemplateList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LaunchTemplate[i3].ID), Extract: resource.ExtractResourceID(), @@ -392,13 +347,10 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read for i4 := 0; i4 < len(mg.Spec.InitProvider.MixedInstancesPolicy[i3].LaunchTemplate); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.MixedInstancesPolicy[i3].LaunchTemplate[i4].LaunchTemplateSpecification); i5++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "LaunchTemplate", "LaunchTemplateList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "LaunchTemplate", "LaunchTemplateList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.MixedInstancesPolicy[i3].LaunchTemplate[i4].LaunchTemplateSpecification[i5].LaunchTemplateID), Extract: resource.ExtractResourceID(), @@ -421,13 +373,10 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read for i5 := 0; i5 < len(mg.Spec.InitProvider.MixedInstancesPolicy[i3].LaunchTemplate[i4].Override); i5++ { for i6 := 0; i6 < len(mg.Spec.InitProvider.MixedInstancesPolicy[i3].LaunchTemplate[i4].Override[i5].LaunchTemplateSpecification); i6++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "LaunchTemplate", "LaunchTemplateList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "LaunchTemplate", "LaunchTemplateList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.MixedInstancesPolicy[i3].LaunchTemplate[i4].Override[i5].LaunchTemplateSpecification[i6].LaunchTemplateID), Extract: resource.ExtractResourceID(), @@ -447,13 +396,10 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read } } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "PlacementGroup", "PlacementGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "PlacementGroup", "PlacementGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.PlacementGroup), Extract: resource.ExtractResourceID(), @@ -468,13 +414,9 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read mg.Spec.InitProvider.PlacementGroup = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PlacementGroupRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -491,9 +433,7 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read mg.Spec.InitProvider.ServiceLinkedRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ServiceLinkedRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -519,17 +459,13 @@ func (mg *AutoscalingGroup) ResolveReferences(ctx context.Context, c client.Read func (mg *GroupTag) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", - - "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -547,11 +483,8 @@ func (mg *GroupTag) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.AutoscalingGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AutoscalingGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", - - "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -576,17 +509,13 @@ func (mg *GroupTag) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *LifecycleHook) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", - - "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -604,13 +533,9 @@ func (mg *LifecycleHook) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.AutoscalingGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AutoscalingGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -627,13 +552,9 @@ func (mg *LifecycleHook) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -657,19 +578,14 @@ func (mg *LifecycleHook) ResolveReferences(ctx context.Context, c client.Reader) func (mg *Notification) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -686,13 +602,9 @@ func (mg *Notification) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.TopicArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TopicArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -716,17 +628,13 @@ func (mg *Notification) ResolveReferences(ctx context.Context, c client.Reader) func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", - - "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -751,17 +659,13 @@ func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *Schedule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", - - "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/backup/v1beta1/zz_generated.resolvers.go b/apis/backup/v1beta1/zz_generated.resolvers.go index 54115cf1b3..9ea0b8587c 100644 --- a/apis/backup/v1beta1/zz_generated.resolvers.go +++ b/apis/backup/v1beta1/zz_generated.resolvers.go @@ -11,18 +11,17 @@ import ( reference "github.com/crossplane/crossplane-runtime/pkg/reference" errors "github.com/pkg/errors" - xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" common "github.com/upbound/provider-aws/config/common" + apisresolver "github.com/upbound/provider-aws/internal/apis" client "sigs.k8s.io/controller-runtime/pkg/client" // ResolveReferences of this Plan. - apisresolver "github.com/upbound/provider-aws/internal/apis" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" ) func (mg *Plan) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -30,13 +29,10 @@ func (mg *Plan) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.ForProvider.Rule); i3++ { { - m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", - - "v1beta1", "Vault", "VaultList") + m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", "v1beta1", "Vault", "VaultList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Rule[i3].TargetVaultName), Extract: reference.ExternalName(), @@ -54,13 +50,10 @@ func (mg *Plan) ResolveReferences(ctx context.Context, c client.Reader) error { } for i3 := 0; i3 < len(mg.Spec.InitProvider.Rule); i3++ { { - m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", - - "v1beta1", "Vault", "VaultList") + m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", "v1beta1", "Vault", "VaultList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Rule[i3].TargetVaultName), Extract: reference.ExternalName(), @@ -84,19 +77,14 @@ func (mg *Plan) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *Selection) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -113,13 +101,9 @@ func (mg *Selection) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.IAMRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IAMRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", - - "v1beta1", "Plan", "PlanList") + m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", "v1beta1", "Plan", "PlanList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -136,13 +120,9 @@ func (mg *Selection) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.PlanID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PlanIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -159,13 +139,9 @@ func (mg *Selection) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.InitProvider.IAMRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.IAMRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", - - "v1beta1", "Plan", "PlanList") + m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", "v1beta1", "Plan", "PlanList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -189,19 +165,14 @@ func (mg *Selection) ResolveReferences(ctx context.Context, c client.Reader) err func (mg *Vault) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -218,13 +189,9 @@ func (mg *Vault) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -248,15 +215,12 @@ func (mg *Vault) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *VaultLockConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", - - "v1beta1", "Vault", "VaultList") + m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", "v1beta1", "Vault", "VaultList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -275,9 +239,7 @@ func (mg *VaultLockConfiguration) ResolveReferences(ctx context.Context, c clien mg.Spec.ForProvider.BackupVaultName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BackupVaultNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", - - "v1beta1", "Vault", "VaultList") + m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", "v1beta1", "Vault", "VaultList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -303,15 +265,12 @@ func (mg *VaultLockConfiguration) ResolveReferences(ctx context.Context, c clien func (mg *VaultNotifications) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", - - "v1beta1", "Vault", "VaultList") + m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", "v1beta1", "Vault", "VaultList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -330,13 +289,9 @@ func (mg *VaultNotifications) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.BackupVaultName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BackupVaultNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -353,9 +308,7 @@ func (mg *VaultNotifications) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.SnsTopicArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SnsTopicArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", - - "v1beta1", "Vault", "VaultList") + m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", "v1beta1", "Vault", "VaultList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -374,13 +327,9 @@ func (mg *VaultNotifications) ResolveReferences(ctx context.Context, c client.Re mg.Spec.InitProvider.BackupVaultName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.BackupVaultNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -404,15 +353,12 @@ func (mg *VaultNotifications) ResolveReferences(ctx context.Context, c client.Re func (mg *VaultPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", - - "v1beta1", "Vault", "VaultList") + m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", "v1beta1", "Vault", "VaultList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -431,9 +377,7 @@ func (mg *VaultPolicy) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.BackupVaultName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BackupVaultNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", - - "v1beta1", "Vault", "VaultList") + m, l, err = apisresolver.GetManagedResource("backup.aws.upbound.io", "v1beta1", "Vault", "VaultList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/budgets/v1beta1/zz_generated.resolvers.go b/apis/budgets/v1beta1/zz_generated.resolvers.go index 231b16a45e..7cfdc2445f 100644 --- a/apis/budgets/v1beta1/zz_generated.resolvers.go +++ b/apis/budgets/v1beta1/zz_generated.resolvers.go @@ -22,18 +22,14 @@ func (mg *BudgetAction) ResolveReferences( // ResolveReferences of this BudgetAc ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("budgets.aws.upbound.io", - - "v1beta1", "Budget", "BudgetList") + m, l, err = apisresolver.GetManagedResource("budgets.aws.upbound.io", "v1beta1", "Budget", "BudgetList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -53,13 +49,10 @@ func (mg *BudgetAction) ResolveReferences( // ResolveReferences of this BudgetAc for i3 := 0; i3 < len(mg.Spec.ForProvider.Definition); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Definition[i3].IAMActionDefinition); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Definition[i3].IAMActionDefinition[i4].PolicyArn), Extract: resource.ExtractParamPath("arn", true), @@ -77,15 +70,10 @@ func (mg *BudgetAction) ResolveReferences( // ResolveReferences of this BudgetAc } } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ExecutionRoleArn), Extract: common.ARNExtractor(), @@ -100,12 +88,9 @@ func (mg *BudgetAction) ResolveReferences( // ResolveReferences of this BudgetAc mg.Spec.ForProvider.ExecutionRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ExecutionRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("budgets.aws.upbound.io", - - "v1beta1", "Budget", "BudgetList") + m, l, err = apisresolver.GetManagedResource("budgets.aws.upbound.io", "v1beta1", "Budget", "BudgetList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -125,13 +110,10 @@ func (mg *BudgetAction) ResolveReferences( // ResolveReferences of this BudgetAc for i3 := 0; i3 < len(mg.Spec.InitProvider.Definition); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Definition[i3].IAMActionDefinition); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Definition[i3].IAMActionDefinition[i4].PolicyArn), Extract: resource.ExtractParamPath("arn", true), @@ -149,15 +131,10 @@ func (mg *BudgetAction) ResolveReferences( // ResolveReferences of this BudgetAc } } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ExecutionRoleArn), Extract: common.ARNExtractor(), diff --git a/apis/chime/v1beta1/zz_generated.resolvers.go b/apis/chime/v1beta1/zz_generated.resolvers.go index 12fd4790bd..11323b8279 100644 --- a/apis/chime/v1beta1/zz_generated.resolvers.go +++ b/apis/chime/v1beta1/zz_generated.resolvers.go @@ -20,7 +20,6 @@ func (mg *VoiceConnectorGroup) ResolveReferences( // ResolveReferences of this V ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -28,13 +27,10 @@ func (mg *VoiceConnectorGroup) ResolveReferences( // ResolveReferences of this V for i3 := 0; i3 < len(mg.Spec.ForProvider.Connector); i3++ { { - m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", - - "v1beta1", "VoiceConnector", "VoiceConnectorList") + m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", "v1beta1", "VoiceConnector", "VoiceConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Connector[i3].VoiceConnectorID), Extract: resource.ExtractResourceID(), @@ -52,13 +48,10 @@ func (mg *VoiceConnectorGroup) ResolveReferences( // ResolveReferences of this V } for i3 := 0; i3 < len(mg.Spec.InitProvider.Connector); i3++ { { - m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", - - "v1beta1", "VoiceConnector", "VoiceConnectorList") + m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", "v1beta1", "VoiceConnector", "VoiceConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Connector[i3].VoiceConnectorID), Extract: resource.ExtractResourceID(), @@ -82,15 +75,12 @@ func (mg *VoiceConnectorGroup) ResolveReferences( // ResolveReferences of this V func (mg *VoiceConnectorLogging) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", - - "v1beta1", "VoiceConnector", "VoiceConnectorList") + m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", "v1beta1", "VoiceConnector", "VoiceConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -109,9 +99,7 @@ func (mg *VoiceConnectorLogging) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.VoiceConnectorID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VoiceConnectorIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", - - "v1beta1", "VoiceConnector", "VoiceConnectorList") + m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", "v1beta1", "VoiceConnector", "VoiceConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -137,15 +125,12 @@ func (mg *VoiceConnectorLogging) ResolveReferences(ctx context.Context, c client func (mg *VoiceConnectorOrigination) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", - - "v1beta1", "VoiceConnector", "VoiceConnectorList") + m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", "v1beta1", "VoiceConnector", "VoiceConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -164,9 +149,7 @@ func (mg *VoiceConnectorOrigination) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.VoiceConnectorID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VoiceConnectorIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", - - "v1beta1", "VoiceConnector", "VoiceConnectorList") + m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", "v1beta1", "VoiceConnector", "VoiceConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -192,15 +175,12 @@ func (mg *VoiceConnectorOrigination) ResolveReferences(ctx context.Context, c cl func (mg *VoiceConnectorStreaming) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", - - "v1beta1", "VoiceConnector", "VoiceConnectorList") + m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", "v1beta1", "VoiceConnector", "VoiceConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -219,9 +199,7 @@ func (mg *VoiceConnectorStreaming) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.VoiceConnectorID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VoiceConnectorIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", - - "v1beta1", "VoiceConnector", "VoiceConnectorList") + m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", "v1beta1", "VoiceConnector", "VoiceConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -247,15 +225,12 @@ func (mg *VoiceConnectorStreaming) ResolveReferences(ctx context.Context, c clie func (mg *VoiceConnectorTermination) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", - - "v1beta1", "VoiceConnector", "VoiceConnectorList") + m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", "v1beta1", "VoiceConnector", "VoiceConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -274,9 +249,7 @@ func (mg *VoiceConnectorTermination) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.VoiceConnectorID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VoiceConnectorIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", - - "v1beta1", "VoiceConnector", "VoiceConnectorList") + m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", "v1beta1", "VoiceConnector", "VoiceConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -302,15 +275,12 @@ func (mg *VoiceConnectorTermination) ResolveReferences(ctx context.Context, c cl func (mg *VoiceConnectorTerminationCredentials) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", - - "v1beta1", "VoiceConnector", "VoiceConnectorList") + m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", "v1beta1", "VoiceConnector", "VoiceConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -329,9 +299,7 @@ func (mg *VoiceConnectorTerminationCredentials) ResolveReferences(ctx context.Co mg.Spec.ForProvider.VoiceConnectorID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VoiceConnectorIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", - - "v1beta1", "VoiceConnector", "VoiceConnectorList") + m, l, err = apisresolver.GetManagedResource("chime.aws.upbound.io", "v1beta1", "VoiceConnector", "VoiceConnectorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/cloud9/v1beta1/zz_generated.resolvers.go b/apis/cloud9/v1beta1/zz_generated.resolvers.go index c7bb6817d2..3397f9b3ce 100644 --- a/apis/cloud9/v1beta1/zz_generated.resolvers.go +++ b/apis/cloud9/v1beta1/zz_generated.resolvers.go @@ -21,15 +21,12 @@ func (mg *EnvironmentEC2) ResolveReferences( // ResolveReferences of this Enviro ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -48,9 +45,7 @@ func (mg *EnvironmentEC2) ResolveReferences( // ResolveReferences of this Enviro mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -76,15 +71,12 @@ func (mg *EnvironmentEC2) ResolveReferences( // ResolveReferences of this Enviro func (mg *EnvironmentMembership) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cloud9.aws.upbound.io", - - "v1beta1", "EnvironmentEC2", "EnvironmentEC2List") + m, l, err = apisresolver.GetManagedResource("cloud9.aws.upbound.io", "v1beta1", "EnvironmentEC2", "EnvironmentEC2List") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -103,13 +95,9 @@ func (mg *EnvironmentMembership) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.EnvironmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EnvironmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/cloudcontrol/v1beta1/zz_generated.resolvers.go b/apis/cloudcontrol/v1beta1/zz_generated.resolvers.go index 3f21227a8c..97faa9eeb5 100644 --- a/apis/cloudcontrol/v1beta1/zz_generated.resolvers.go +++ b/apis/cloudcontrol/v1beta1/zz_generated.resolvers.go @@ -13,28 +13,22 @@ import ( xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" common "github.com/upbound/provider-aws/config/common" - client "sigs.k8s.io/controller-runtime/pkg/client" - - // ResolveReferences of this Resource. apisresolver "github.com/upbound/provider-aws/internal/apis" + client "sigs.k8s.io/controller-runtime/pkg/client" ) -func (mg *Resource) ResolveReferences(ctx context.Context, c client.Reader) error { +func (mg *Resource) ResolveReferences( // ResolveReferences of this Resource. + ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -51,13 +45,9 @@ func (mg *Resource) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/cloudformation/v1beta1/zz_generated.resolvers.go b/apis/cloudformation/v1beta1/zz_generated.resolvers.go index e1c7b6c39c..33e9a89106 100644 --- a/apis/cloudformation/v1beta1/zz_generated.resolvers.go +++ b/apis/cloudformation/v1beta1/zz_generated.resolvers.go @@ -22,19 +22,14 @@ import ( func (mg *Stack) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -51,13 +46,9 @@ func (mg *Stack) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.IAMRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IAMRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -81,19 +72,14 @@ func (mg *Stack) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *StackSet) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -110,13 +96,9 @@ func (mg *StackSet) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.AdministrationRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AdministrationRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/cloudfront/v1beta1/zz_generated.resolvers.go b/apis/cloudfront/v1beta1/zz_generated.resolvers.go index 196a2434c0..547a17c8a0 100644 --- a/apis/cloudfront/v1beta1/zz_generated.resolvers.go +++ b/apis/cloudfront/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ func (mg *Distribution) ResolveReferences( // ResolveReferences of this Distribu ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -31,13 +30,10 @@ func (mg *Distribution) ResolveReferences( // ResolveReferences of this Distribu for i3 := 0; i3 < len(mg.Spec.ForProvider.OrderedCacheBehavior); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.OrderedCacheBehavior[i3].FunctionAssociation); i4++ { { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.OrderedCacheBehavior[i3].FunctionAssociation[i4].FunctionArn), Extract: resource.ExtractParamPath("arn", true), @@ -57,14 +53,10 @@ func (mg *Distribution) ResolveReferences( // ResolveReferences of this Distribu for i3 := 0; i3 < len(mg.Spec.ForProvider.OrderedCacheBehavior); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.OrderedCacheBehavior[i3].LambdaFunctionAssociation); i4++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.OrderedCacheBehavior[i3].LambdaFunctionAssociation[i4].LambdaArn), Extract: resource.ExtractParamPath("qualified_arn", true), @@ -83,13 +75,10 @@ func (mg *Distribution) ResolveReferences( // ResolveReferences of this Distribu } for i3 := 0; i3 < len(mg.Spec.ForProvider.Origin); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "OriginAccessControl", "OriginAccessControlList") + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "OriginAccessControl", "OriginAccessControlList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Origin[i3].OriginAccessControlID), Extract: resource.ExtractResourceID(), @@ -108,13 +97,10 @@ func (mg *Distribution) ResolveReferences( // ResolveReferences of this Distribu for i3 := 0; i3 < len(mg.Spec.ForProvider.Origin); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Origin[i3].S3OriginConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "OriginAccessIdentity", "OriginAccessIdentityList") + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "OriginAccessIdentity", "OriginAccessIdentityList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Origin[i3].S3OriginConfig[i4].OriginAccessIdentity), Extract: resource.ExtractParamPath("cloudfront_access_identity_path", true), @@ -134,13 +120,10 @@ func (mg *Distribution) ResolveReferences( // ResolveReferences of this Distribu for i3 := 0; i3 < len(mg.Spec.InitProvider.OrderedCacheBehavior); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.OrderedCacheBehavior[i3].FunctionAssociation); i4++ { { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.OrderedCacheBehavior[i3].FunctionAssociation[i4].FunctionArn), Extract: resource.ExtractParamPath("arn", true), @@ -160,14 +143,10 @@ func (mg *Distribution) ResolveReferences( // ResolveReferences of this Distribu for i3 := 0; i3 < len(mg.Spec.InitProvider.OrderedCacheBehavior); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.OrderedCacheBehavior[i3].LambdaFunctionAssociation); i4++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.OrderedCacheBehavior[i3].LambdaFunctionAssociation[i4].LambdaArn), Extract: resource.ExtractParamPath("qualified_arn", true), @@ -186,13 +165,10 @@ func (mg *Distribution) ResolveReferences( // ResolveReferences of this Distribu } for i3 := 0; i3 < len(mg.Spec.InitProvider.Origin); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "OriginAccessControl", "OriginAccessControlList") + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "OriginAccessControl", "OriginAccessControlList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Origin[i3].OriginAccessControlID), Extract: resource.ExtractResourceID(), @@ -211,13 +187,10 @@ func (mg *Distribution) ResolveReferences( // ResolveReferences of this Distribu for i3 := 0; i3 < len(mg.Spec.InitProvider.Origin); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Origin[i3].S3OriginConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "OriginAccessIdentity", "OriginAccessIdentityList") + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "OriginAccessIdentity", "OriginAccessIdentityList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Origin[i3].S3OriginConfig[i4].OriginAccessIdentity), Extract: resource.ExtractParamPath("cloudfront_access_identity_path", true), @@ -242,7 +215,6 @@ func (mg *Distribution) ResolveReferences( // ResolveReferences of this Distribu func (mg *FieldLevelEncryptionConfig) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -252,14 +224,10 @@ func (mg *FieldLevelEncryptionConfig) ResolveReferences(ctx context.Context, c c for i4 := 0; i4 < len(mg.Spec.ForProvider.QueryArgProfileConfig[i3].QueryArgProfiles); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.QueryArgProfileConfig[i3].QueryArgProfiles[i4].Items); i5++ { { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "FieldLevelEncryptionProfile", "FieldLevelEncryptionProfileList", - ) + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "FieldLevelEncryptionProfile", "FieldLevelEncryptionProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.QueryArgProfileConfig[i3].QueryArgProfiles[i4].Items[i5].ProfileID), Extract: resource.ExtractResourceID(), @@ -281,14 +249,10 @@ func (mg *FieldLevelEncryptionConfig) ResolveReferences(ctx context.Context, c c for i4 := 0; i4 < len(mg.Spec.InitProvider.QueryArgProfileConfig[i3].QueryArgProfiles); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.QueryArgProfileConfig[i3].QueryArgProfiles[i4].Items); i5++ { { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "FieldLevelEncryptionProfile", "FieldLevelEncryptionProfileList", - ) + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "FieldLevelEncryptionProfile", "FieldLevelEncryptionProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.QueryArgProfileConfig[i3].QueryArgProfiles[i4].Items[i5].ProfileID), Extract: resource.ExtractResourceID(), @@ -314,7 +278,6 @@ func (mg *FieldLevelEncryptionConfig) ResolveReferences(ctx context.Context, c c func (mg *FieldLevelEncryptionProfile) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -323,13 +286,10 @@ func (mg *FieldLevelEncryptionProfile) ResolveReferences(ctx context.Context, c for i3 := 0; i3 < len(mg.Spec.ForProvider.EncryptionEntities); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.EncryptionEntities[i3].Items); i4++ { { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "PublicKey", "PublicKeyList") + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "PublicKey", "PublicKeyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EncryptionEntities[i3].Items[i4].PublicKeyID), Extract: resource.ExtractResourceID(), @@ -349,13 +309,10 @@ func (mg *FieldLevelEncryptionProfile) ResolveReferences(ctx context.Context, c for i3 := 0; i3 < len(mg.Spec.InitProvider.EncryptionEntities); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.EncryptionEntities[i3].Items); i4++ { { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "PublicKey", "PublicKeyList") + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "PublicKey", "PublicKeyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EncryptionEntities[i3].Items[i4].PublicKeyID), Extract: resource.ExtractResourceID(), @@ -380,15 +337,12 @@ func (mg *FieldLevelEncryptionProfile) ResolveReferences(ctx context.Context, c func (mg *KeyGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "PublicKey", "PublicKeyList") + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "PublicKey", "PublicKeyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -407,9 +361,7 @@ func (mg *KeyGroup) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.Items = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.ItemRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "PublicKey", "PublicKeyList") + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "PublicKey", "PublicKeyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -435,15 +387,12 @@ func (mg *KeyGroup) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *MonitoringSubscription) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "Distribution", "DistributionList") + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "Distribution", "DistributionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -462,9 +411,7 @@ func (mg *MonitoringSubscription) ResolveReferences(ctx context.Context, c clien mg.Spec.ForProvider.DistributionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DistributionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", - - "v1beta1", "Distribution", "DistributionList") + m, l, err = apisresolver.GetManagedResource("cloudfront.aws.upbound.io", "v1beta1", "Distribution", "DistributionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -490,7 +437,6 @@ func (mg *MonitoringSubscription) ResolveReferences(ctx context.Context, c clien func (mg *RealtimeLogConfig) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -499,15 +445,10 @@ func (mg *RealtimeLogConfig) ResolveReferences(ctx context.Context, c client.Rea for i3 := 0; i3 < len(mg.Spec.ForProvider.Endpoint); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Endpoint[i3].KinesisStreamConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Endpoint[i3].KinesisStreamConfig[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -527,14 +468,10 @@ func (mg *RealtimeLogConfig) ResolveReferences(ctx context.Context, c client.Rea for i3 := 0; i3 < len(mg.Spec.ForProvider.Endpoint); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Endpoint[i3].KinesisStreamConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Endpoint[i3].KinesisStreamConfig[i4].StreamArn), Extract: common.TerraformID(), @@ -554,15 +491,10 @@ func (mg *RealtimeLogConfig) ResolveReferences(ctx context.Context, c client.Rea for i3 := 0; i3 < len(mg.Spec.InitProvider.Endpoint); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Endpoint[i3].KinesisStreamConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Endpoint[i3].KinesisStreamConfig[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -582,14 +514,10 @@ func (mg *RealtimeLogConfig) ResolveReferences(ctx context.Context, c client.Rea for i3 := 0; i3 < len(mg.Spec.InitProvider.Endpoint); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Endpoint[i3].KinesisStreamConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Endpoint[i3].KinesisStreamConfig[i4].StreamArn), Extract: common.TerraformID(), diff --git a/apis/cloudsearch/v1beta1/zz_generated.resolvers.go b/apis/cloudsearch/v1beta1/zz_generated.resolvers.go index 97f18fb157..9c85637de4 100644 --- a/apis/cloudsearch/v1beta1/zz_generated.resolvers.go +++ b/apis/cloudsearch/v1beta1/zz_generated.resolvers.go @@ -20,18 +20,14 @@ func (mg *DomainServiceAccessPolicy) ResolveReferences( // ResolveReferences of ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cloudsearch.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("cloudsearch.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -48,12 +44,9 @@ func (mg *DomainServiceAccessPolicy) ResolveReferences( // ResolveReferences of mg.Spec.ForProvider.DomainName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DomainNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudsearch.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("cloudsearch.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/cloudtrail/v1beta1/zz_generated.resolvers.go b/apis/cloudtrail/v1beta1/zz_generated.resolvers.go index 06d0ea1a4b..36a908d7ab 100644 --- a/apis/cloudtrail/v1beta1/zz_generated.resolvers.go +++ b/apis/cloudtrail/v1beta1/zz_generated.resolvers.go @@ -22,19 +22,14 @@ func (mg *EventDataStore) ResolveReferences( // ResolveReferences of this EventD ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -51,13 +46,9 @@ func (mg *EventDataStore) ResolveReferences( // ResolveReferences of this EventD mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -81,19 +72,14 @@ func (mg *EventDataStore) ResolveReferences( // ResolveReferences of this EventD func (mg *Trail) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -110,13 +96,9 @@ func (mg *Trail) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.CloudWatchLogsRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CloudWatchLogsRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -133,13 +115,9 @@ func (mg *Trail) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -156,13 +134,9 @@ func (mg *Trail) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.S3BucketName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.S3BucketNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -179,13 +153,9 @@ func (mg *Trail) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.CloudWatchLogsRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.CloudWatchLogsRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -202,13 +172,9 @@ func (mg *Trail) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/cloudwatch/v1beta1/zz_generated.resolvers.go b/apis/cloudwatch/v1beta1/zz_generated.resolvers.go index a8cea64e80..4960ff9960 100644 --- a/apis/cloudwatch/v1beta1/zz_generated.resolvers.go +++ b/apis/cloudwatch/v1beta1/zz_generated.resolvers.go @@ -22,19 +22,14 @@ func (mg *CompositeAlarm) ResolveReferences( // ResolveReferences of this Compos ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -51,13 +46,9 @@ func (mg *CompositeAlarm) ResolveReferences( // ResolveReferences of this Compos mg.Spec.ForProvider.AlarmActions = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.AlarmActionsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -74,13 +65,9 @@ func (mg *CompositeAlarm) ResolveReferences( // ResolveReferences of this Compos mg.Spec.ForProvider.OkActions = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.OkActionsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -97,13 +84,9 @@ func (mg *CompositeAlarm) ResolveReferences( // ResolveReferences of this Compos mg.Spec.InitProvider.AlarmActions = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.AlarmActionsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -127,15 +110,12 @@ func (mg *CompositeAlarm) ResolveReferences( // ResolveReferences of this Compos func (mg *MetricStream) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -154,13 +134,9 @@ func (mg *MetricStream) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.FirehoseArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FirehoseArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -177,9 +153,7 @@ func (mg *MetricStream) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -198,13 +172,9 @@ func (mg *MetricStream) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.FirehoseArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.FirehoseArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/cloudwatchevents/v1beta1/zz_generated.resolvers.go b/apis/cloudwatchevents/v1beta1/zz_generated.resolvers.go index fdaa29e09e..c0904fcc81 100644 --- a/apis/cloudwatchevents/v1beta1/zz_generated.resolvers.go +++ b/apis/cloudwatchevents/v1beta1/zz_generated.resolvers.go @@ -22,15 +22,12 @@ func (mg *APIDestination) ResolveReferences( // ResolveReferences of this APIDes ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -49,9 +46,7 @@ func (mg *APIDestination) ResolveReferences( // ResolveReferences of this APIDes mg.Spec.ForProvider.ConnectionArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConnectionArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -77,18 +72,14 @@ func (mg *APIDestination) ResolveReferences( // ResolveReferences of this APIDes func (mg *Archive) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Bus", "BusList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Bus", "BusList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -105,12 +96,9 @@ func (mg *Archive) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.EventSourceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EventSourceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Bus", "BusList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Bus", "BusList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -134,18 +122,14 @@ func (mg *Archive) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *BusPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Bus", "BusList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Bus", "BusList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -162,12 +146,9 @@ func (mg *BusPolicy) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.EventBusName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EventBusNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Bus", "BusList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Bus", "BusList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -191,7 +172,6 @@ func (mg *BusPolicy) ResolveReferences(ctx context.Context, c client.Reader) err func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -199,13 +179,10 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er for i3 := 0; i3 < len(mg.Spec.ForProvider.Condition); i3++ { { - m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", - - "v1beta1", "Organization", "OrganizationList") + m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", "v1beta1", "Organization", "OrganizationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Condition[i3].Value), Extract: resource.ExtractResourceID(), @@ -222,14 +199,10 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er } { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Bus", "BusList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Bus", "BusList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EventBusName), Extract: reference.ExternalName(), @@ -246,13 +219,10 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er for i3 := 0; i3 < len(mg.Spec.InitProvider.Condition); i3++ { { - m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", - - "v1beta1", "Organization", "OrganizationList") + m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", "v1beta1", "Organization", "OrganizationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Condition[i3].Value), Extract: resource.ExtractResourceID(), @@ -269,14 +239,10 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er } { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Bus", "BusList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Bus", "BusList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EventBusName), Extract: reference.ExternalName(), @@ -298,18 +264,14 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Bus", "BusList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Bus", "BusList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -326,13 +288,9 @@ func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.EventBusName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EventBusNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -349,12 +307,9 @@ func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Bus", "BusList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Bus", "BusList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -371,13 +326,9 @@ func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.EventBusName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.EventBusNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -401,7 +352,6 @@ func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *Target) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -409,13 +359,10 @@ func (mg *Target) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.EcsTarget); i3++ { { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "TaskDefinition", "TaskDefinitionList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "TaskDefinition", "TaskDefinitionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EcsTarget[i3].TaskDefinitionArn), Extract: resource.ExtractParamPath("arn", true), @@ -432,14 +379,10 @@ func (mg *Target) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Bus", "BusList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Bus", "BusList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EventBusName), Extract: reference.ExternalName(), @@ -454,13 +397,9 @@ func (mg *Target) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.EventBusName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EventBusNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -477,12 +416,9 @@ func (mg *Target) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Rule", "RuleList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Rule", "RuleList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -501,13 +437,10 @@ func (mg *Target) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.EcsTarget); i3++ { { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "TaskDefinition", "TaskDefinitionList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "TaskDefinition", "TaskDefinitionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EcsTarget[i3].TaskDefinitionArn), Extract: resource.ExtractParamPath("arn", true), @@ -524,14 +457,10 @@ func (mg *Target) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Bus", "BusList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Bus", "BusList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EventBusName), Extract: reference.ExternalName(), @@ -546,13 +475,9 @@ func (mg *Target) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.EventBusName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.EventBusNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -569,12 +494,9 @@ func (mg *Target) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Rule", "RuleList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Rule", "RuleList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/cloudwatchlogs/v1beta1/zz_generated.resolvers.go b/apis/cloudwatchlogs/v1beta1/zz_generated.resolvers.go index 785ed30bab..4f5106306c 100644 --- a/apis/cloudwatchlogs/v1beta1/zz_generated.resolvers.go +++ b/apis/cloudwatchlogs/v1beta1/zz_generated.resolvers.go @@ -21,19 +21,14 @@ func (mg *Destination) ResolveReferences( // ResolveReferences of this Destinati ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,12 +45,9 @@ func (mg *Destination) ResolveReferences( // ResolveReferences of this Destinati mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -72,13 +64,9 @@ func (mg *Destination) ResolveReferences( // ResolveReferences of this Destinati mg.Spec.ForProvider.TargetArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TargetArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -95,12 +83,9 @@ func (mg *Destination) ResolveReferences( // ResolveReferences of this Destinati mg.Spec.InitProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -124,19 +109,14 @@ func (mg *Destination) ResolveReferences( // ResolveReferences of this Destinati func (mg *Group) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -153,13 +133,9 @@ func (mg *Group) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -183,18 +159,14 @@ func (mg *Group) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *MetricFilter) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -211,12 +183,9 @@ func (mg *MetricFilter) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.LogGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LogGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -240,18 +209,14 @@ func (mg *MetricFilter) ResolveReferences(ctx context.Context, c client.Reader) func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -268,12 +233,9 @@ func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.LogGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LogGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -297,18 +259,14 @@ func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *SubscriptionFilter) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -325,13 +283,9 @@ func (mg *SubscriptionFilter) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.DestinationArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DestinationArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -348,12 +302,9 @@ func (mg *SubscriptionFilter) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -370,13 +321,9 @@ func (mg *SubscriptionFilter) ResolveReferences(ctx context.Context, c client.Re mg.Spec.InitProvider.DestinationArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DestinationArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/codecommit/v1beta1/zz_generated.resolvers.go b/apis/codecommit/v1beta1/zz_generated.resolvers.go index d5595a6130..986ed55dd0 100644 --- a/apis/codecommit/v1beta1/zz_generated.resolvers.go +++ b/apis/codecommit/v1beta1/zz_generated.resolvers.go @@ -21,15 +21,12 @@ func (mg *ApprovalRuleTemplateAssociation) ResolveReferences( // ResolveReferenc ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("codecommit.aws.upbound.io", - - "v1beta1", "ApprovalRuleTemplate", "ApprovalRuleTemplateList") + m, l, err = apisresolver.GetManagedResource("codecommit.aws.upbound.io", "v1beta1", "ApprovalRuleTemplate", "ApprovalRuleTemplateList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -48,9 +45,7 @@ func (mg *ApprovalRuleTemplateAssociation) ResolveReferences( // ResolveReferenc mg.Spec.ForProvider.ApprovalRuleTemplateName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ApprovalRuleTemplateNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("codecommit.aws.upbound.io", - - "v1beta1", "Repository", "RepositoryList") + m, l, err = apisresolver.GetManagedResource("codecommit.aws.upbound.io", "v1beta1", "Repository", "RepositoryList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -76,15 +71,12 @@ func (mg *ApprovalRuleTemplateAssociation) ResolveReferences( // ResolveReferenc func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("codecommit.aws.upbound.io", - - "v1beta1", "Repository", "RepositoryList") + m, l, err = apisresolver.GetManagedResource("codecommit.aws.upbound.io", "v1beta1", "Repository", "RepositoryList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -105,15 +97,10 @@ func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.Trigger); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Trigger[i3].DestinationArn), Extract: resource.ExtractParamPath("arn", true), @@ -130,13 +117,10 @@ func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("codecommit.aws.upbound.io", - - "v1beta1", "Repository", "RepositoryList") + m, l, err = apisresolver.GetManagedResource("codecommit.aws.upbound.io", "v1beta1", "Repository", "RepositoryList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RepositoryName), Extract: reference.ExternalName(), @@ -153,15 +137,10 @@ func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.Trigger); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Trigger[i3].DestinationArn), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/codepipeline/v1beta1/zz_generated.resolvers.go b/apis/codepipeline/v1beta1/zz_generated.resolvers.go index d1b4d94953..b7b7540908 100644 --- a/apis/codepipeline/v1beta1/zz_generated.resolvers.go +++ b/apis/codepipeline/v1beta1/zz_generated.resolvers.go @@ -21,7 +21,6 @@ func (mg *Codepipeline) ResolveReferences( // ResolveReferences of this Codepipe ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -29,15 +28,10 @@ func (mg *Codepipeline) ResolveReferences( // ResolveReferences of this Codepipe for i3 := 0; i3 < len(mg.Spec.ForProvider.ArtifactStore); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ArtifactStore[i3].Location), Extract: reference.ExternalName(), @@ -54,15 +48,10 @@ func (mg *Codepipeline) ResolveReferences( // ResolveReferences of this Codepipe } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RoleArn), Extract: common.ARNExtractor(), @@ -79,15 +68,10 @@ func (mg *Codepipeline) ResolveReferences( // ResolveReferences of this Codepipe for i3 := 0; i3 < len(mg.Spec.InitProvider.ArtifactStore); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ArtifactStore[i3].Location), Extract: reference.ExternalName(), @@ -104,15 +88,10 @@ func (mg *Codepipeline) ResolveReferences( // ResolveReferences of this Codepipe } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RoleArn), Extract: common.ARNExtractor(), @@ -134,15 +113,12 @@ func (mg *Codepipeline) ResolveReferences( // ResolveReferences of this Codepipe func (mg *Webhook) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("codepipeline.aws.upbound.io", - - "v1beta1", "Codepipeline", "CodepipelineList") + m, l, err = apisresolver.GetManagedResource("codepipeline.aws.upbound.io", "v1beta1", "Codepipeline", "CodepipelineList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -161,9 +137,7 @@ func (mg *Webhook) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.TargetPipeline = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TargetPipelineRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("codepipeline.aws.upbound.io", - - "v1beta1", "Codepipeline", "CodepipelineList") + m, l, err = apisresolver.GetManagedResource("codepipeline.aws.upbound.io", "v1beta1", "Codepipeline", "CodepipelineList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/codestarnotifications/v1beta1/zz_generated.resolvers.go b/apis/codestarnotifications/v1beta1/zz_generated.resolvers.go index cd8e16cfac..220efb9ad6 100644 --- a/apis/codestarnotifications/v1beta1/zz_generated.resolvers.go +++ b/apis/codestarnotifications/v1beta1/zz_generated.resolvers.go @@ -21,15 +21,12 @@ func (mg *NotificationRule) ResolveReferences( // ResolveReferences of this Noti ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("codecommit.aws.upbound.io", - - "v1beta1", "Repository", "RepositoryList") + m, l, err = apisresolver.GetManagedResource("codecommit.aws.upbound.io", "v1beta1", "Repository", "RepositoryList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -50,15 +47,10 @@ func (mg *NotificationRule) ResolveReferences( // ResolveReferences of this Noti for i3 := 0; i3 < len(mg.Spec.ForProvider.Target); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Target[i3].Address), Extract: resource.ExtractParamPath("arn", true), @@ -75,13 +67,10 @@ func (mg *NotificationRule) ResolveReferences( // ResolveReferences of this Noti } { - m, l, err = apisresolver.GetManagedResource("codecommit.aws.upbound.io", - - "v1beta1", "Repository", "RepositoryList") + m, l, err = apisresolver.GetManagedResource("codecommit.aws.upbound.io", "v1beta1", "Repository", "RepositoryList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Resource), Extract: resource.ExtractParamPath("arn", true), @@ -98,15 +87,10 @@ func (mg *NotificationRule) ResolveReferences( // ResolveReferences of this Noti for i3 := 0; i3 < len(mg.Spec.InitProvider.Target); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Target[i3].Address), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/cognitoidentity/v1beta1/zz_generated.resolvers.go b/apis/cognitoidentity/v1beta1/zz_generated.resolvers.go index bf7be1ae96..d04af665a7 100644 --- a/apis/cognitoidentity/v1beta1/zz_generated.resolvers.go +++ b/apis/cognitoidentity/v1beta1/zz_generated.resolvers.go @@ -22,18 +22,14 @@ func (mg *CognitoIdentityPoolProviderPrincipalTag) ResolveReferences( // Resolve ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cognitoidentity.aws.upbound.io", - - "v1beta1", "Pool", "PoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidentity.aws.upbound.io", "v1beta1", "Pool", "PoolList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,9 +46,7 @@ func (mg *CognitoIdentityPoolProviderPrincipalTag) ResolveReferences( // Resolve mg.Spec.ForProvider.IdentityPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IdentityPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -71,12 +65,9 @@ func (mg *CognitoIdentityPoolProviderPrincipalTag) ResolveReferences( // Resolve mg.Spec.ForProvider.IdentityProviderName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IdentityProviderNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidentity.aws.upbound.io", - - "v1beta1", "Pool", "PoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidentity.aws.upbound.io", "v1beta1", "Pool", "PoolList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -93,9 +84,7 @@ func (mg *CognitoIdentityPoolProviderPrincipalTag) ResolveReferences( // Resolve mg.Spec.InitProvider.IdentityPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.IdentityPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -121,7 +110,6 @@ func (mg *CognitoIdentityPoolProviderPrincipalTag) ResolveReferences( // Resolve func (mg *Pool) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -130,13 +118,10 @@ func (mg *Pool) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.ForProvider.CognitoIdentityProviders); i3++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolClient", "UserPoolClientList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolClient", "UserPoolClientList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.CognitoIdentityProviders[i3].ClientID), Extract: reference.ExternalName(), @@ -153,13 +138,10 @@ func (mg *Pool) ResolveReferences(ctx context.Context, c client.Reader) error { } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "SAMLProvider", "SAMLProviderList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "SAMLProvider", "SAMLProviderList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SAMLProviderArns), Extract: common.ARNExtractor(), @@ -176,13 +158,10 @@ func (mg *Pool) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.InitProvider.CognitoIdentityProviders); i3++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolClient", "UserPoolClientList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolClient", "UserPoolClientList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.CognitoIdentityProviders[i3].ClientID), Extract: reference.ExternalName(), @@ -199,13 +178,10 @@ func (mg *Pool) ResolveReferences(ctx context.Context, c client.Reader) error { } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "SAMLProvider", "SAMLProviderList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "SAMLProvider", "SAMLProviderList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.SAMLProviderArns), Extract: common.ARNExtractor(), @@ -227,18 +203,14 @@ func (mg *Pool) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *PoolRolesAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cognitoidentity.aws.upbound.io", - - "v1beta1", "Pool", "PoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidentity.aws.upbound.io", "v1beta1", "Pool", "PoolList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -258,15 +230,10 @@ func (mg *PoolRolesAttachment) ResolveReferences(ctx context.Context, c client.R for i3 := 0; i3 < len(mg.Spec.ForProvider.RoleMapping); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.RoleMapping[i3].MappingRule); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RoleMapping[i3].MappingRule[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -284,14 +251,10 @@ func (mg *PoolRolesAttachment) ResolveReferences(ctx context.Context, c client.R } } { - m, l, err = apisresolver.GetManagedResource("cognitoidentity.aws.upbound.io", - - "v1beta1", "Pool", "PoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidentity.aws.upbound.io", "v1beta1", "Pool", "PoolList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.IdentityPoolID), Extract: resource.ExtractResourceID(), @@ -309,15 +272,10 @@ func (mg *PoolRolesAttachment) ResolveReferences(ctx context.Context, c client.R for i3 := 0; i3 < len(mg.Spec.InitProvider.RoleMapping); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.RoleMapping[i3].MappingRule); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RoleMapping[i3].MappingRule[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/cognitoidp/v1beta1/zz_generated.resolvers.go b/apis/cognitoidp/v1beta1/zz_generated.resolvers.go index 2e25bf87c9..f40ffa302b 100644 --- a/apis/cognitoidp/v1beta1/zz_generated.resolvers.go +++ b/apis/cognitoidp/v1beta1/zz_generated.resolvers.go @@ -22,15 +22,12 @@ func (mg *IdentityProvider) ResolveReferences( // ResolveReferences of this Iden ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -49,9 +46,7 @@ func (mg *IdentityProvider) ResolveReferences( // ResolveReferences of this Iden mg.Spec.ForProvider.UserPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -77,15 +72,12 @@ func (mg *IdentityProvider) ResolveReferences( // ResolveReferences of this Iden func (mg *ResourceServer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -104,9 +96,7 @@ func (mg *ResourceServer) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.UserPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -132,15 +122,12 @@ func (mg *ResourceServer) ResolveReferences(ctx context.Context, c client.Reader func (mg *RiskConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -159,9 +146,7 @@ func (mg *RiskConfiguration) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.UserPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -187,15 +172,12 @@ func (mg *RiskConfiguration) ResolveReferences(ctx context.Context, c client.Rea func (mg *User) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -221,19 +203,14 @@ func (mg *User) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *UserGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -250,9 +227,7 @@ func (mg *UserGroup) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -271,13 +246,9 @@ func (mg *UserGroup) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.UserPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -294,9 +265,7 @@ func (mg *UserGroup) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.InitProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -322,15 +291,12 @@ func (mg *UserGroup) ResolveReferences(ctx context.Context, c client.Reader) err func (mg *UserInGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserGroup", "UserGroupList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserGroup", "UserGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -349,9 +315,7 @@ func (mg *UserInGroup) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.GroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -370,9 +334,7 @@ func (mg *UserInGroup) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.UserPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -391,9 +353,7 @@ func (mg *UserInGroup) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.Username = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UsernameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserGroup", "UserGroupList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserGroup", "UserGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -412,9 +372,7 @@ func (mg *UserInGroup) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.GroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.GroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -433,9 +391,7 @@ func (mg *UserInGroup) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.UserPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.UserPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -461,7 +417,6 @@ func (mg *UserInGroup) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -469,14 +424,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaConfig[i3].CreateAuthChallenge), Extract: common.ARNExtractor(), @@ -495,14 +446,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.LambdaConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.LambdaConfig[i3].CustomEmailSender); i4++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaConfig[i3].CustomEmailSender[i4].LambdaArn), Extract: common.ARNExtractor(), @@ -521,14 +468,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaConfig[i3].CustomMessage), Extract: common.ARNExtractor(), @@ -547,14 +490,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.LambdaConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.LambdaConfig[i3].CustomSMSSender); i4++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaConfig[i3].CustomSMSSender[i4].LambdaArn), Extract: common.ARNExtractor(), @@ -573,14 +512,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaConfig[i3].DefineAuthChallenge), Extract: common.ARNExtractor(), @@ -598,15 +533,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaConfig[i3].KMSKeyID), Extract: common.ARNExtractor(), @@ -624,14 +554,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaConfig[i3].PostAuthentication), Extract: common.ARNExtractor(), @@ -649,14 +575,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaConfig[i3].PostConfirmation), Extract: common.ARNExtractor(), @@ -674,14 +596,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaConfig[i3].PreAuthentication), Extract: common.ARNExtractor(), @@ -699,14 +617,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaConfig[i3].PreSignUp), Extract: common.ARNExtractor(), @@ -724,14 +638,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaConfig[i3].PreTokenGeneration), Extract: common.ARNExtractor(), @@ -749,14 +659,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaConfig[i3].UserMigration), Extract: common.ARNExtractor(), @@ -774,14 +680,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LambdaConfig[i3].VerifyAuthChallengeResponse), Extract: common.ARNExtractor(), @@ -799,15 +701,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.SMSConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SMSConfiguration[i3].SnsCallerArn), Extract: common.ARNExtractor(), @@ -825,14 +722,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LambdaConfig[i3].CreateAuthChallenge), Extract: common.ARNExtractor(), @@ -851,14 +744,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.InitProvider.LambdaConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.LambdaConfig[i3].CustomEmailSender); i4++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LambdaConfig[i3].CustomEmailSender[i4].LambdaArn), Extract: common.ARNExtractor(), @@ -877,14 +766,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LambdaConfig[i3].CustomMessage), Extract: common.ARNExtractor(), @@ -903,14 +788,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.InitProvider.LambdaConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.LambdaConfig[i3].CustomSMSSender); i4++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LambdaConfig[i3].CustomSMSSender[i4].LambdaArn), Extract: common.ARNExtractor(), @@ -929,14 +810,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LambdaConfig[i3].DefineAuthChallenge), Extract: common.ARNExtractor(), @@ -954,15 +831,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LambdaConfig[i3].KMSKeyID), Extract: common.ARNExtractor(), @@ -980,14 +852,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LambdaConfig[i3].PostAuthentication), Extract: common.ARNExtractor(), @@ -1005,14 +873,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LambdaConfig[i3].PostConfirmation), Extract: common.ARNExtractor(), @@ -1030,14 +894,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LambdaConfig[i3].PreAuthentication), Extract: common.ARNExtractor(), @@ -1055,14 +915,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LambdaConfig[i3].PreSignUp), Extract: common.ARNExtractor(), @@ -1080,14 +936,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LambdaConfig[i3].PreTokenGeneration), Extract: common.ARNExtractor(), @@ -1105,14 +957,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LambdaConfig[i3].UserMigration), Extract: common.ARNExtractor(), @@ -1130,14 +978,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.LambdaConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LambdaConfig[i3].VerifyAuthChallengeResponse), Extract: common.ARNExtractor(), @@ -1155,15 +999,10 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.SMSConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SMSConfiguration[i3].SnsCallerArn), Extract: common.ARNExtractor(), @@ -1187,7 +1026,6 @@ func (mg *UserPool) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *UserPoolClient) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -1195,15 +1033,10 @@ func (mg *UserPoolClient) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.ForProvider.AnalyticsConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("pinpoint.aws.upbound.io", - - "v1beta1", "App", "AppList") + m, l, err = apisresolver.GetManagedResource("pinpoint.aws.upbound.io", "v1beta1", "App", "AppList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.AnalyticsConfiguration[i3].ApplicationID), Extract: resource.ExtractParamPath("application_id", true), @@ -1221,15 +1054,10 @@ func (mg *UserPoolClient) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.ForProvider.AnalyticsConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.AnalyticsConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -1246,13 +1074,10 @@ func (mg *UserPoolClient) ResolveReferences(ctx context.Context, c client.Reader } { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.UserPoolID), Extract: reference.ExternalName(), @@ -1269,15 +1094,10 @@ func (mg *UserPoolClient) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.InitProvider.AnalyticsConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("pinpoint.aws.upbound.io", - - "v1beta1", "App", "AppList") + m, l, err = apisresolver.GetManagedResource("pinpoint.aws.upbound.io", "v1beta1", "App", "AppList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.AnalyticsConfiguration[i3].ApplicationID), Extract: resource.ExtractParamPath("application_id", true), @@ -1295,15 +1115,10 @@ func (mg *UserPoolClient) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.InitProvider.AnalyticsConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.AnalyticsConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -1320,13 +1135,10 @@ func (mg *UserPoolClient) ResolveReferences(ctx context.Context, c client.Reader } { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.UserPoolID), Extract: reference.ExternalName(), @@ -1348,18 +1160,14 @@ func (mg *UserPoolClient) ResolveReferences(ctx context.Context, c client.Reader func (mg *UserPoolDomain) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1376,9 +1184,7 @@ func (mg *UserPoolDomain) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.CertificateArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CertificateArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1397,12 +1203,9 @@ func (mg *UserPoolDomain) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.UserPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1419,9 +1222,7 @@ func (mg *UserPoolDomain) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.CertificateArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.CertificateArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1447,15 +1248,12 @@ func (mg *UserPoolDomain) ResolveReferences(ctx context.Context, c client.Reader func (mg *UserPoolUICustomization) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolClient", "UserPoolClientList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolClient", "UserPoolClientList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1474,9 +1272,7 @@ func (mg *UserPoolUICustomization) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.ClientID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClientIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1495,9 +1291,7 @@ func (mg *UserPoolUICustomization) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.UserPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolClient", "UserPoolClientList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolClient", "UserPoolClientList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1516,9 +1310,7 @@ func (mg *UserPoolUICustomization) ResolveReferences(ctx context.Context, c clie mg.Spec.InitProvider.ClientID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ClientIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/configservice/v1beta1/zz_generated.resolvers.go b/apis/configservice/v1beta1/zz_generated.resolvers.go index 4212bef860..bb6504f072 100644 --- a/apis/configservice/v1beta1/zz_generated.resolvers.go +++ b/apis/configservice/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ func (mg *ConfigRule) ResolveReferences( // ResolveReferences of this ConfigRule ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -30,14 +29,10 @@ func (mg *ConfigRule) ResolveReferences( // ResolveReferences of this ConfigRule for i3 := 0; i3 < len(mg.Spec.ForProvider.Source); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Source[i3].SourceIdentifier), Extract: resource.ExtractParamPath("arn", true), @@ -55,14 +50,10 @@ func (mg *ConfigRule) ResolveReferences( // ResolveReferences of this ConfigRule } for i3 := 0; i3 < len(mg.Spec.InitProvider.Source); i3++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Source[i3].SourceIdentifier), Extract: resource.ExtractParamPath("arn", true), @@ -86,7 +77,6 @@ func (mg *ConfigRule) ResolveReferences( // ResolveReferences of this ConfigRule func (mg *ConfigurationAggregator) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -94,15 +84,10 @@ func (mg *ConfigurationAggregator) ResolveReferences(ctx context.Context, c clie for i3 := 0; i3 < len(mg.Spec.ForProvider.OrganizationAggregationSource); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.OrganizationAggregationSource[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -120,15 +105,10 @@ func (mg *ConfigurationAggregator) ResolveReferences(ctx context.Context, c clie } for i3 := 0; i3 < len(mg.Spec.InitProvider.OrganizationAggregationSource); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.OrganizationAggregationSource[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -152,19 +132,14 @@ func (mg *ConfigurationAggregator) ResolveReferences(ctx context.Context, c clie func (mg *ConfigurationRecorder) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -181,13 +156,9 @@ func (mg *ConfigurationRecorder) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -211,19 +182,14 @@ func (mg *ConfigurationRecorder) ResolveReferences(ctx context.Context, c client func (mg *DeliveryChannel) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -240,13 +206,9 @@ func (mg *DeliveryChannel) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.S3BucketName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.S3BucketNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/connect/v1beta1/zz_generated.resolvers.go b/apis/connect/v1beta1/zz_generated.resolvers.go index d38c93e12f..d1b36e0f2f 100644 --- a/apis/connect/v1beta1/zz_generated.resolvers.go +++ b/apis/connect/v1beta1/zz_generated.resolvers.go @@ -21,18 +21,14 @@ func (mg *BotAssociation) ResolveReferences( // ResolveReferences of this BotAss ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -51,13 +47,10 @@ func (mg *BotAssociation) ResolveReferences( // ResolveReferences of this BotAss for i3 := 0; i3 < len(mg.Spec.ForProvider.LexBot); i3++ { { - m, l, err = apisresolver.GetManagedResource("lexmodels.aws.upbound.io", - - "v1beta1", "Bot", "BotList") + m, l, err = apisresolver.GetManagedResource("lexmodels.aws.upbound.io", "v1beta1", "Bot", "BotList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LexBot[i3].Name), Extract: reference.ExternalName(), @@ -75,13 +68,10 @@ func (mg *BotAssociation) ResolveReferences( // ResolveReferences of this BotAss } for i3 := 0; i3 < len(mg.Spec.InitProvider.LexBot); i3++ { { - m, l, err = apisresolver.GetManagedResource("lexmodels.aws.upbound.io", - - "v1beta1", "Bot", "BotList") + m, l, err = apisresolver.GetManagedResource("lexmodels.aws.upbound.io", "v1beta1", "Bot", "BotList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LexBot[i3].Name), Extract: reference.ExternalName(), @@ -105,18 +95,14 @@ func (mg *BotAssociation) ResolveReferences( // ResolveReferences of this BotAss func (mg *ContactFlow) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -133,12 +119,9 @@ func (mg *ContactFlow) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -162,18 +145,14 @@ func (mg *ContactFlow) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *ContactFlowModule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -190,12 +169,9 @@ func (mg *ContactFlowModule) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -219,18 +195,14 @@ func (mg *ContactFlowModule) ResolveReferences(ctx context.Context, c client.Rea func (mg *HoursOfOperation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -247,12 +219,9 @@ func (mg *HoursOfOperation) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -276,18 +245,14 @@ func (mg *HoursOfOperation) ResolveReferences(ctx context.Context, c client.Read func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", - - "v1beta1", "Directory", "DirectoryList") + m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", "v1beta1", "Directory", "DirectoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -304,12 +269,9 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.DirectoryID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DirectoryIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", - - "v1beta1", "Directory", "DirectoryList") + m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", "v1beta1", "Directory", "DirectoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -333,18 +295,14 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *InstanceStorageConfig) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -364,13 +322,10 @@ func (mg *InstanceStorageConfig) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.ForProvider.StorageConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.StorageConfig[i3].KinesisFirehoseConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.StorageConfig[i3].KinesisFirehoseConfig[i4].FirehoseArn), Extract: resource.ExtractParamPath("arn", false), @@ -390,14 +345,10 @@ func (mg *InstanceStorageConfig) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.ForProvider.StorageConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.StorageConfig[i3].KinesisStreamConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.StorageConfig[i3].KinesisStreamConfig[i4].StreamArn), Extract: resource.ExtractParamPath("arn", false), @@ -418,15 +369,10 @@ func (mg *InstanceStorageConfig) ResolveReferences(ctx context.Context, c client for i4 := 0; i4 < len(mg.Spec.ForProvider.StorageConfig[i3].KinesisVideoStreamConfig); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.StorageConfig[i3].KinesisVideoStreamConfig[i4].EncryptionConfig); i5++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.StorageConfig[i3].KinesisVideoStreamConfig[i4].EncryptionConfig[i5].KeyID), Extract: resource.ExtractParamPath("arn", true), @@ -447,15 +393,10 @@ func (mg *InstanceStorageConfig) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.ForProvider.StorageConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.StorageConfig[i3].S3Config); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.StorageConfig[i3].S3Config[i4].BucketName), Extract: resource.ExtractResourceID(), @@ -476,15 +417,10 @@ func (mg *InstanceStorageConfig) ResolveReferences(ctx context.Context, c client for i4 := 0; i4 < len(mg.Spec.ForProvider.StorageConfig[i3].S3Config); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.StorageConfig[i3].S3Config[i4].EncryptionConfig); i5++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.StorageConfig[i3].S3Config[i4].EncryptionConfig[i5].KeyID), Extract: resource.ExtractParamPath("arn", true), @@ -503,14 +439,10 @@ func (mg *InstanceStorageConfig) ResolveReferences(ctx context.Context, c client } } { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.InstanceID), Extract: resource.ExtractResourceID(), @@ -528,13 +460,10 @@ func (mg *InstanceStorageConfig) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.InitProvider.StorageConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.StorageConfig[i3].KinesisFirehoseConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.StorageConfig[i3].KinesisFirehoseConfig[i4].FirehoseArn), Extract: resource.ExtractParamPath("arn", false), @@ -554,14 +483,10 @@ func (mg *InstanceStorageConfig) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.InitProvider.StorageConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.StorageConfig[i3].KinesisStreamConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.StorageConfig[i3].KinesisStreamConfig[i4].StreamArn), Extract: resource.ExtractParamPath("arn", false), @@ -582,15 +507,10 @@ func (mg *InstanceStorageConfig) ResolveReferences(ctx context.Context, c client for i4 := 0; i4 < len(mg.Spec.InitProvider.StorageConfig[i3].KinesisVideoStreamConfig); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.StorageConfig[i3].KinesisVideoStreamConfig[i4].EncryptionConfig); i5++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.StorageConfig[i3].KinesisVideoStreamConfig[i4].EncryptionConfig[i5].KeyID), Extract: resource.ExtractParamPath("arn", true), @@ -611,15 +531,10 @@ func (mg *InstanceStorageConfig) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.InitProvider.StorageConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.StorageConfig[i3].S3Config); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.StorageConfig[i3].S3Config[i4].BucketName), Extract: resource.ExtractResourceID(), @@ -640,15 +555,10 @@ func (mg *InstanceStorageConfig) ResolveReferences(ctx context.Context, c client for i4 := 0; i4 < len(mg.Spec.InitProvider.StorageConfig[i3].S3Config); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.StorageConfig[i3].S3Config[i4].EncryptionConfig); i5++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.StorageConfig[i3].S3Config[i4].EncryptionConfig[i5].KeyID), Extract: resource.ExtractParamPath("arn", true), @@ -674,18 +584,14 @@ func (mg *InstanceStorageConfig) ResolveReferences(ctx context.Context, c client func (mg *LambdaFunctionAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -702,12 +608,9 @@ func (mg *LambdaFunctionAssociation) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.FunctionArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FunctionArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -731,18 +634,14 @@ func (mg *LambdaFunctionAssociation) ResolveReferences(ctx context.Context, c cl func (mg *PhoneNumber) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -759,12 +658,9 @@ func (mg *PhoneNumber) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.TargetArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TargetArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -788,15 +684,12 @@ func (mg *PhoneNumber) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *Queue) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "HoursOfOperation", "HoursOfOperationList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "HoursOfOperation", "HoursOfOperationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -815,12 +708,9 @@ func (mg *Queue) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.HoursOfOperationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.HoursOfOperationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -837,9 +727,7 @@ func (mg *Queue) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "HoursOfOperation", "HoursOfOperationList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "HoursOfOperation", "HoursOfOperationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -858,12 +746,9 @@ func (mg *Queue) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.HoursOfOperationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.HoursOfOperationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -887,18 +772,14 @@ func (mg *Queue) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *QuickConnect) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -915,12 +796,9 @@ func (mg *QuickConnect) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -944,15 +822,12 @@ func (mg *QuickConnect) ResolveReferences(ctx context.Context, c client.Reader) func (mg *RoutingProfile) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -971,12 +846,9 @@ func (mg *RoutingProfile) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.DefaultOutboundQueueID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DefaultOutboundQueueIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -993,9 +865,7 @@ func (mg *RoutingProfile) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1014,12 +884,9 @@ func (mg *RoutingProfile) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.DefaultOutboundQueueID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DefaultOutboundQueueIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1043,18 +910,14 @@ func (mg *RoutingProfile) ResolveReferences(ctx context.Context, c client.Reader func (mg *SecurityProfile) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1071,12 +934,9 @@ func (mg *SecurityProfile) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1100,18 +960,14 @@ func (mg *SecurityProfile) ResolveReferences(ctx context.Context, c client.Reade func (mg *User) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1128,9 +984,7 @@ func (mg *User) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "RoutingProfile", "RoutingProfileList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "RoutingProfile", "RoutingProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1149,12 +1003,9 @@ func (mg *User) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.RoutingProfileID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoutingProfileIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1171,9 +1022,7 @@ func (mg *User) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "RoutingProfile", "RoutingProfileList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "RoutingProfile", "RoutingProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1199,18 +1048,14 @@ func (mg *User) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *UserHierarchyStructure) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1227,12 +1072,9 @@ func (mg *UserHierarchyStructure) ResolveReferences(ctx context.Context, c clien mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1256,18 +1098,14 @@ func (mg *UserHierarchyStructure) ResolveReferences(ctx context.Context, c clien func (mg *Vocabulary) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1284,12 +1122,9 @@ func (mg *Vocabulary) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("connect.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/cur/v1beta1/zz_generated.resolvers.go b/apis/cur/v1beta1/zz_generated.resolvers.go index 30186f02e7..9f7d5a5359 100644 --- a/apis/cur/v1beta1/zz_generated.resolvers.go +++ b/apis/cur/v1beta1/zz_generated.resolvers.go @@ -20,19 +20,14 @@ func (mg *ReportDefinition) ResolveReferences( // ResolveReferences of this Repo ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -49,13 +44,9 @@ func (mg *ReportDefinition) ResolveReferences( // ResolveReferences of this Repo mg.Spec.ForProvider.S3Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.S3BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/dataexchange/v1beta1/zz_generated.resolvers.go b/apis/dataexchange/v1beta1/zz_generated.resolvers.go index 8cdd4dc78b..1671ff15f7 100644 --- a/apis/dataexchange/v1beta1/zz_generated.resolvers.go +++ b/apis/dataexchange/v1beta1/zz_generated.resolvers.go @@ -21,15 +21,12 @@ import ( func (mg *Revision) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("dataexchange.aws.upbound.io", - - "v1beta1", "DataSet", "DataSetList") + m, l, err = apisresolver.GetManagedResource("dataexchange.aws.upbound.io", "v1beta1", "DataSet", "DataSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -48,9 +45,7 @@ func (mg *Revision) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.DataSetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DataSetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("dataexchange.aws.upbound.io", - - "v1beta1", "DataSet", "DataSetList") + m, l, err = apisresolver.GetManagedResource("dataexchange.aws.upbound.io", "v1beta1", "DataSet", "DataSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/datasync/v1beta1/zz_generated.resolvers.go b/apis/datasync/v1beta1/zz_generated.resolvers.go index b1bfea6244..59ad67efb5 100644 --- a/apis/datasync/v1beta1/zz_generated.resolvers.go +++ b/apis/datasync/v1beta1/zz_generated.resolvers.go @@ -22,19 +22,14 @@ func (mg *LocationS3) ResolveReferences( // ResolveReferences of this LocationS3 ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -53,15 +48,10 @@ func (mg *LocationS3) ResolveReferences( // ResolveReferences of this LocationS3 for i3 := 0; i3 < len(mg.Spec.ForProvider.S3Config); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.S3Config[i3].BucketAccessRoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -78,15 +68,10 @@ func (mg *LocationS3) ResolveReferences( // ResolveReferences of this LocationS3 } { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.S3BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -103,15 +88,10 @@ func (mg *LocationS3) ResolveReferences( // ResolveReferences of this LocationS3 for i3 := 0; i3 < len(mg.Spec.InitProvider.S3Config); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.S3Config[i3].BucketAccessRoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -135,18 +115,14 @@ func (mg *LocationS3) ResolveReferences( // ResolveReferences of this LocationS3 func (mg *Task) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -163,9 +139,7 @@ func (mg *Task) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.CloudwatchLogGroupArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CloudwatchLogGroupArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("datasync.aws.upbound.io", - - "v1beta1", "LocationS3", "LocationS3List") + m, l, err = apisresolver.GetManagedResource("datasync.aws.upbound.io", "v1beta1", "LocationS3", "LocationS3List") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -184,9 +158,7 @@ func (mg *Task) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.DestinationLocationArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DestinationLocationArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("datasync.aws.upbound.io", - - "v1beta1", "LocationS3", "LocationS3List") + m, l, err = apisresolver.GetManagedResource("datasync.aws.upbound.io", "v1beta1", "LocationS3", "LocationS3List") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -205,12 +177,9 @@ func (mg *Task) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.SourceLocationArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceLocationArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -227,9 +196,7 @@ func (mg *Task) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.CloudwatchLogGroupArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.CloudwatchLogGroupArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("datasync.aws.upbound.io", - - "v1beta1", "LocationS3", "LocationS3List") + m, l, err = apisresolver.GetManagedResource("datasync.aws.upbound.io", "v1beta1", "LocationS3", "LocationS3List") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -248,9 +215,7 @@ func (mg *Task) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.DestinationLocationArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DestinationLocationArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("datasync.aws.upbound.io", - - "v1beta1", "LocationS3", "LocationS3List") + m, l, err = apisresolver.GetManagedResource("datasync.aws.upbound.io", "v1beta1", "LocationS3", "LocationS3List") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/dax/v1beta1/zz_generated.resolvers.go b/apis/dax/v1beta1/zz_generated.resolvers.go index f8365bd674..088658919a 100644 --- a/apis/dax/v1beta1/zz_generated.resolvers.go +++ b/apis/dax/v1beta1/zz_generated.resolvers.go @@ -22,20 +22,15 @@ import ( func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -52,9 +47,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.IAMRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IAMRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -73,13 +66,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -96,9 +85,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.IAMRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.IAMRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -124,15 +111,12 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -151,9 +135,7 @@ func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/deploy/v1beta1/zz_generated.resolvers.go b/apis/deploy/v1beta1/zz_generated.resolvers.go index daa6b5beb5..6123457309 100644 --- a/apis/deploy/v1beta1/zz_generated.resolvers.go +++ b/apis/deploy/v1beta1/zz_generated.resolvers.go @@ -22,19 +22,14 @@ func (mg *DeploymentGroup) ResolveReferences( // ResolveReferences of this Deplo ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("deploy.aws.upbound.io", - - "v1beta1", "App", "AppList") + m, l, err = apisresolver.GetManagedResource("deploy.aws.upbound.io", "v1beta1", "App", "AppList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -53,13 +48,10 @@ func (mg *DeploymentGroup) ResolveReferences( // ResolveReferences of this Deplo for i3 := 0; i3 < len(mg.Spec.ForProvider.EcsService); i3++ { { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EcsService[i3].ClusterName), Extract: reference.ExternalName(), @@ -77,13 +69,10 @@ func (mg *DeploymentGroup) ResolveReferences( // ResolveReferences of this Deplo } for i3 := 0; i3 < len(mg.Spec.ForProvider.EcsService); i3++ { { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "Service", "ServiceList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "Service", "ServiceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EcsService[i3].ServiceName), Extract: reference.ExternalName(), @@ -102,15 +91,10 @@ func (mg *DeploymentGroup) ResolveReferences( // ResolveReferences of this Deplo for i3 := 0; i3 < len(mg.Spec.ForProvider.LoadBalancerInfo); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.LoadBalancerInfo[i3].ELBInfo); i4++ { { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LoadBalancerInfo[i3].ELBInfo[i4].Name), Extract: reference.ExternalName(), @@ -131,13 +115,10 @@ func (mg *DeploymentGroup) ResolveReferences( // ResolveReferences of this Deplo for i4 := 0; i4 < len(mg.Spec.ForProvider.LoadBalancerInfo[i3].TargetGroupPairInfo); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.LoadBalancerInfo[i3].TargetGroupPairInfo[i4].TargetGroup); i5++ { { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LoadBalancerInfo[i3].TargetGroupPairInfo[i4].TargetGroup[i5].Name), Extract: resource.ExtractParamPath("name", false), @@ -156,15 +137,10 @@ func (mg *DeploymentGroup) ResolveReferences( // ResolveReferences of this Deplo } } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ServiceRoleArn), Extract: common.ARNExtractor(), @@ -181,15 +157,10 @@ func (mg *DeploymentGroup) ResolveReferences( // ResolveReferences of this Deplo for i3 := 0; i3 < len(mg.Spec.ForProvider.TriggerConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.TriggerConfiguration[i3].TriggerTargetArn), Extract: resource.ExtractParamPath("arn", true), @@ -207,13 +178,10 @@ func (mg *DeploymentGroup) ResolveReferences( // ResolveReferences of this Deplo } for i3 := 0; i3 < len(mg.Spec.InitProvider.EcsService); i3++ { { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EcsService[i3].ClusterName), Extract: reference.ExternalName(), @@ -231,13 +199,10 @@ func (mg *DeploymentGroup) ResolveReferences( // ResolveReferences of this Deplo } for i3 := 0; i3 < len(mg.Spec.InitProvider.EcsService); i3++ { { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "Service", "ServiceList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "Service", "ServiceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EcsService[i3].ServiceName), Extract: reference.ExternalName(), @@ -256,15 +221,10 @@ func (mg *DeploymentGroup) ResolveReferences( // ResolveReferences of this Deplo for i3 := 0; i3 < len(mg.Spec.InitProvider.LoadBalancerInfo); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.LoadBalancerInfo[i3].ELBInfo); i4++ { { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LoadBalancerInfo[i3].ELBInfo[i4].Name), Extract: reference.ExternalName(), @@ -285,13 +245,10 @@ func (mg *DeploymentGroup) ResolveReferences( // ResolveReferences of this Deplo for i4 := 0; i4 < len(mg.Spec.InitProvider.LoadBalancerInfo[i3].TargetGroupPairInfo); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.LoadBalancerInfo[i3].TargetGroupPairInfo[i4].TargetGroup); i5++ { { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LoadBalancerInfo[i3].TargetGroupPairInfo[i4].TargetGroup[i5].Name), Extract: resource.ExtractParamPath("name", false), @@ -310,15 +267,10 @@ func (mg *DeploymentGroup) ResolveReferences( // ResolveReferences of this Deplo } } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ServiceRoleArn), Extract: common.ARNExtractor(), @@ -335,15 +287,10 @@ func (mg *DeploymentGroup) ResolveReferences( // ResolveReferences of this Deplo for i3 := 0; i3 < len(mg.Spec.InitProvider.TriggerConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.TriggerConfiguration[i3].TriggerTargetArn), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/detective/v1beta1/zz_generated.resolvers.go b/apis/detective/v1beta1/zz_generated.resolvers.go index f4236dcc92..fdc41f915b 100644 --- a/apis/detective/v1beta1/zz_generated.resolvers.go +++ b/apis/detective/v1beta1/zz_generated.resolvers.go @@ -20,18 +20,14 @@ func (mg *InvitationAccepter) ResolveReferences( // ResolveReferences of this In ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("detective.aws.upbound.io", - - "v1beta1", "Graph", "GraphList") + m, l, err = apisresolver.GetManagedResource("detective.aws.upbound.io", "v1beta1", "Graph", "GraphList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -48,12 +44,9 @@ func (mg *InvitationAccepter) ResolveReferences( // ResolveReferences of this In mg.Spec.ForProvider.GraphArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GraphArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("detective.aws.upbound.io", - - "v1beta1", "Graph", "GraphList") + m, l, err = apisresolver.GetManagedResource("detective.aws.upbound.io", "v1beta1", "Graph", "GraphList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -77,18 +70,14 @@ func (mg *InvitationAccepter) ResolveReferences( // ResolveReferences of this In func (mg *Member) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("detective.aws.upbound.io", - - "v1beta1", "Graph", "GraphList") + m, l, err = apisresolver.GetManagedResource("detective.aws.upbound.io", "v1beta1", "Graph", "GraphList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -105,12 +94,9 @@ func (mg *Member) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.GraphArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GraphArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("detective.aws.upbound.io", - - "v1beta1", "Graph", "GraphList") + m, l, err = apisresolver.GetManagedResource("detective.aws.upbound.io", "v1beta1", "Graph", "GraphList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/devicefarm/v1beta1/zz_generated.resolvers.go b/apis/devicefarm/v1beta1/zz_generated.resolvers.go index 2f0b7635c7..4e1d1c0154 100644 --- a/apis/devicefarm/v1beta1/zz_generated.resolvers.go +++ b/apis/devicefarm/v1beta1/zz_generated.resolvers.go @@ -21,18 +21,14 @@ func (mg *DevicePool) ResolveReferences( // ResolveReferences of this DevicePool ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("devicefarm.aws.upbound.io", - - "v1beta1", "Project", "ProjectList") + m, l, err = apisresolver.GetManagedResource("devicefarm.aws.upbound.io", "v1beta1", "Project", "ProjectList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -49,12 +45,9 @@ func (mg *DevicePool) ResolveReferences( // ResolveReferences of this DevicePool mg.Spec.ForProvider.ProjectArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ProjectArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("devicefarm.aws.upbound.io", - - "v1beta1", "Project", "ProjectList") + m, l, err = apisresolver.GetManagedResource("devicefarm.aws.upbound.io", "v1beta1", "Project", "ProjectList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -78,18 +71,14 @@ func (mg *DevicePool) ResolveReferences( // ResolveReferences of this DevicePool func (mg *NetworkProfile) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("devicefarm.aws.upbound.io", - - "v1beta1", "Project", "ProjectList") + m, l, err = apisresolver.GetManagedResource("devicefarm.aws.upbound.io", "v1beta1", "Project", "ProjectList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -106,12 +95,9 @@ func (mg *NetworkProfile) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.ProjectArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ProjectArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("devicefarm.aws.upbound.io", - - "v1beta1", "Project", "ProjectList") + m, l, err = apisresolver.GetManagedResource("devicefarm.aws.upbound.io", "v1beta1", "Project", "ProjectList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -135,7 +121,6 @@ func (mg *NetworkProfile) ResolveReferences(ctx context.Context, c client.Reader func (mg *TestGridProject) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -144,13 +129,10 @@ func (mg *TestGridProject) ResolveReferences(ctx context.Context, c client.Reade for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCConfig[i3].SecurityGroupIds), Extract: reference.ExternalName(), @@ -168,13 +150,10 @@ func (mg *TestGridProject) ResolveReferences(ctx context.Context, c client.Reade } for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCConfig[i3].SubnetIds), Extract: reference.ExternalName(), @@ -192,15 +171,10 @@ func (mg *TestGridProject) ResolveReferences(ctx context.Context, c client.Reade } for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VPCConfig[i3].VPCID), Extract: resource.ExtractResourceID(), @@ -218,13 +192,10 @@ func (mg *TestGridProject) ResolveReferences(ctx context.Context, c client.Reade } for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCConfig[i3].SecurityGroupIds), Extract: reference.ExternalName(), @@ -242,13 +213,10 @@ func (mg *TestGridProject) ResolveReferences(ctx context.Context, c client.Reade } for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCConfig[i3].SubnetIds), Extract: reference.ExternalName(), @@ -266,15 +234,10 @@ func (mg *TestGridProject) ResolveReferences(ctx context.Context, c client.Reade } for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.VPCConfig[i3].VPCID), Extract: resource.ExtractResourceID(), @@ -298,18 +261,14 @@ func (mg *TestGridProject) ResolveReferences(ctx context.Context, c client.Reade func (mg *Upload) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("devicefarm.aws.upbound.io", - - "v1beta1", "Project", "ProjectList") + m, l, err = apisresolver.GetManagedResource("devicefarm.aws.upbound.io", "v1beta1", "Project", "ProjectList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -326,12 +285,9 @@ func (mg *Upload) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.ProjectArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ProjectArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("devicefarm.aws.upbound.io", - - "v1beta1", "Project", "ProjectList") + m, l, err = apisresolver.GetManagedResource("devicefarm.aws.upbound.io", "v1beta1", "Project", "ProjectList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/directconnect/v1beta1/zz_generated.resolvers.go b/apis/directconnect/v1beta1/zz_generated.resolvers.go index 6505018031..e2ee18463a 100644 --- a/apis/directconnect/v1beta1/zz_generated.resolvers.go +++ b/apis/directconnect/v1beta1/zz_generated.resolvers.go @@ -22,16 +22,12 @@ import ( func (mg *BGPPeer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "PrivateVirtualInterface", "PrivateVirtualInterfaceList", - ) + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "PrivateVirtualInterface", "PrivateVirtualInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -50,10 +46,7 @@ func (mg *BGPPeer) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.VirtualInterfaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VirtualInterfaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "PrivateVirtualInterface", "PrivateVirtualInterfaceList", - ) + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "PrivateVirtualInterface", "PrivateVirtualInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -79,15 +72,12 @@ func (mg *BGPPeer) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *ConnectionAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -106,12 +96,9 @@ func (mg *ConnectionAssociation) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Lag", "LagList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Lag", "LagList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -128,9 +115,7 @@ func (mg *ConnectionAssociation) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.LagID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LagIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -149,12 +134,9 @@ func (mg *ConnectionAssociation) ResolveReferences(ctx context.Context, c client mg.Spec.InitProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Lag", "LagList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Lag", "LagList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -178,18 +160,14 @@ func (mg *ConnectionAssociation) ResolveReferences(ctx context.Context, c client func (mg *GatewayAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -206,9 +184,7 @@ func (mg *GatewayAssociation) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.AssociatedGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AssociatedGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Gateway", "GatewayList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Gateway", "GatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -227,12 +203,9 @@ func (mg *GatewayAssociation) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.DxGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DxGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -249,9 +222,7 @@ func (mg *GatewayAssociation) ResolveReferences(ctx context.Context, c client.Re mg.Spec.InitProvider.AssociatedGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.AssociatedGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Gateway", "GatewayList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Gateway", "GatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -277,18 +248,14 @@ func (mg *GatewayAssociation) ResolveReferences(ctx context.Context, c client.Re func (mg *GatewayAssociationProposal) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -305,9 +272,7 @@ func (mg *GatewayAssociationProposal) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.AssociatedGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AssociatedGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Gateway", "GatewayList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Gateway", "GatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -326,9 +291,7 @@ func (mg *GatewayAssociationProposal) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.DxGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DxGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Gateway", "GatewayList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Gateway", "GatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -347,12 +310,9 @@ func (mg *GatewayAssociationProposal) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.DxGatewayOwnerAccountID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DxGatewayOwnerAccountIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -369,9 +329,7 @@ func (mg *GatewayAssociationProposal) ResolveReferences(ctx context.Context, c c mg.Spec.InitProvider.AssociatedGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.AssociatedGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Gateway", "GatewayList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Gateway", "GatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -390,9 +348,7 @@ func (mg *GatewayAssociationProposal) ResolveReferences(ctx context.Context, c c mg.Spec.InitProvider.DxGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DxGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Gateway", "GatewayList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Gateway", "GatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -418,15 +374,12 @@ func (mg *GatewayAssociationProposal) ResolveReferences(ctx context.Context, c c func (mg *HostedPrivateVirtualInterface) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -445,9 +398,7 @@ func (mg *HostedPrivateVirtualInterface) ResolveReferences(ctx context.Context, mg.Spec.ForProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -473,18 +424,14 @@ func (mg *HostedPrivateVirtualInterface) ResolveReferences(ctx context.Context, func (mg *HostedPrivateVirtualInterfaceAccepter) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -501,10 +448,7 @@ func (mg *HostedPrivateVirtualInterfaceAccepter) ResolveReferences(ctx context.C mg.Spec.ForProvider.VPNGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPNGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "HostedPrivateVirtualInterface", "HostedPrivateVirtualInterfaceList", - ) + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "HostedPrivateVirtualInterface", "HostedPrivateVirtualInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -523,12 +467,9 @@ func (mg *HostedPrivateVirtualInterfaceAccepter) ResolveReferences(ctx context.C mg.Spec.ForProvider.VirtualInterfaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VirtualInterfaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -545,10 +486,7 @@ func (mg *HostedPrivateVirtualInterfaceAccepter) ResolveReferences(ctx context.C mg.Spec.InitProvider.VPNGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.VPNGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "HostedPrivateVirtualInterface", "HostedPrivateVirtualInterfaceList", - ) + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "HostedPrivateVirtualInterface", "HostedPrivateVirtualInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -574,15 +512,12 @@ func (mg *HostedPrivateVirtualInterfaceAccepter) ResolveReferences(ctx context.C func (mg *HostedPublicVirtualInterface) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -601,9 +536,7 @@ func (mg *HostedPublicVirtualInterface) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -629,16 +562,12 @@ func (mg *HostedPublicVirtualInterface) ResolveReferences(ctx context.Context, c func (mg *HostedPublicVirtualInterfaceAccepter) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "HostedPublicVirtualInterface", "HostedPublicVirtualInterfaceList", - ) + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "HostedPublicVirtualInterface", "HostedPublicVirtualInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -657,10 +586,7 @@ func (mg *HostedPublicVirtualInterfaceAccepter) ResolveReferences(ctx context.Co mg.Spec.ForProvider.VirtualInterfaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VirtualInterfaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "HostedPublicVirtualInterface", "HostedPublicVirtualInterfaceList", - ) + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "HostedPublicVirtualInterface", "HostedPublicVirtualInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -686,15 +612,12 @@ func (mg *HostedPublicVirtualInterfaceAccepter) ResolveReferences(ctx context.Co func (mg *HostedTransitVirtualInterface) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -713,9 +636,7 @@ func (mg *HostedTransitVirtualInterface) ResolveReferences(ctx context.Context, mg.Spec.ForProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -741,15 +662,12 @@ func (mg *HostedTransitVirtualInterface) ResolveReferences(ctx context.Context, func (mg *HostedTransitVirtualInterfaceAccepter) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Gateway", "GatewayList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Gateway", "GatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -768,10 +686,7 @@ func (mg *HostedTransitVirtualInterfaceAccepter) ResolveReferences(ctx context.C mg.Spec.ForProvider.DxGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DxGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "HostedTransitVirtualInterface", "HostedTransitVirtualInterfaceList", - ) + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "HostedTransitVirtualInterface", "HostedTransitVirtualInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -790,9 +705,7 @@ func (mg *HostedTransitVirtualInterfaceAccepter) ResolveReferences(ctx context.C mg.Spec.ForProvider.VirtualInterfaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VirtualInterfaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Gateway", "GatewayList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Gateway", "GatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -811,10 +724,7 @@ func (mg *HostedTransitVirtualInterfaceAccepter) ResolveReferences(ctx context.C mg.Spec.InitProvider.DxGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DxGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "HostedTransitVirtualInterface", "HostedTransitVirtualInterfaceList", - ) + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "HostedTransitVirtualInterface", "HostedTransitVirtualInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -840,15 +750,12 @@ func (mg *HostedTransitVirtualInterfaceAccepter) ResolveReferences(ctx context.C func (mg *PrivateVirtualInterface) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -867,12 +774,9 @@ func (mg *PrivateVirtualInterface) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -889,9 +793,7 @@ func (mg *PrivateVirtualInterface) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.VPNGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPNGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -910,12 +812,9 @@ func (mg *PrivateVirtualInterface) ResolveReferences(ctx context.Context, c clie mg.Spec.InitProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -939,15 +838,12 @@ func (mg *PrivateVirtualInterface) ResolveReferences(ctx context.Context, c clie func (mg *PublicVirtualInterface) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -966,9 +862,7 @@ func (mg *PublicVirtualInterface) ResolveReferences(ctx context.Context, c clien mg.Spec.ForProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -994,15 +888,12 @@ func (mg *PublicVirtualInterface) ResolveReferences(ctx context.Context, c clien func (mg *TransitVirtualInterface) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1021,9 +912,7 @@ func (mg *TransitVirtualInterface) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Gateway", "GatewayList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Gateway", "GatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1042,9 +931,7 @@ func (mg *TransitVirtualInterface) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.DxGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DxGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1063,9 +950,7 @@ func (mg *TransitVirtualInterface) ResolveReferences(ctx context.Context, c clie mg.Spec.InitProvider.ConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", - - "v1beta1", "Gateway", "GatewayList") + m, l, err = apisresolver.GetManagedResource("directconnect.aws.upbound.io", "v1beta1", "Gateway", "GatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/dlm/v1beta1/zz_generated.resolvers.go b/apis/dlm/v1beta1/zz_generated.resolvers.go index 2ec37b414b..6fe1fef970 100644 --- a/apis/dlm/v1beta1/zz_generated.resolvers.go +++ b/apis/dlm/v1beta1/zz_generated.resolvers.go @@ -22,19 +22,14 @@ func (mg *LifecyclePolicy) ResolveReferences( // ResolveReferences of this Lifec ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -55,15 +50,10 @@ func (mg *LifecyclePolicy) ResolveReferences( // ResolveReferences of this Lifec for i4 := 0; i4 < len(mg.Spec.ForProvider.PolicyDetails[i3].Schedule); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.PolicyDetails[i3].Schedule[i4].CrossRegionCopyRule); i5++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.PolicyDetails[i3].Schedule[i4].CrossRegionCopyRule[i5].CmkArn), Extract: resource.ExtractParamPath("arn", true), @@ -82,15 +72,10 @@ func (mg *LifecyclePolicy) ResolveReferences( // ResolveReferences of this Lifec } } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ExecutionRoleArn), Extract: common.ARNExtractor(), @@ -109,15 +94,10 @@ func (mg *LifecyclePolicy) ResolveReferences( // ResolveReferences of this Lifec for i4 := 0; i4 < len(mg.Spec.InitProvider.PolicyDetails[i3].Schedule); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.PolicyDetails[i3].Schedule[i4].CrossRegionCopyRule); i5++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.PolicyDetails[i3].Schedule[i4].CrossRegionCopyRule[i5].CmkArn), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/dms/v1beta1/zz_generated.resolvers.go b/apis/dms/v1beta1/zz_generated.resolvers.go index 44909e25d0..adfe66237d 100644 --- a/apis/dms/v1beta1/zz_generated.resolvers.go +++ b/apis/dms/v1beta1/zz_generated.resolvers.go @@ -23,19 +23,14 @@ import ( func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -52,13 +47,9 @@ func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -75,13 +66,9 @@ func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.SecretsManagerAccessRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SecretsManagerAccessRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -98,13 +85,9 @@ func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.ServiceAccessRole = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServiceAccessRoleRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -121,13 +104,9 @@ func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -144,13 +123,9 @@ func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.SecretsManagerAccessRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.SecretsManagerAccessRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -174,19 +149,14 @@ func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -203,13 +173,9 @@ func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.SnsTopicArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SnsTopicArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -233,20 +199,15 @@ func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Rea func (mg *ReplicationInstance) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -263,11 +224,8 @@ func (mg *ReplicationInstance) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", - - "v1beta1", "ReplicationSubnetGroup", "ReplicationSubnetGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", "v1beta1", "ReplicationSubnetGroup", "ReplicationSubnetGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -285,9 +243,7 @@ func (mg *ReplicationInstance) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.ReplicationSubnetGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ReplicationSubnetGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -306,13 +262,9 @@ func (mg *ReplicationInstance) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -329,11 +281,8 @@ func (mg *ReplicationInstance) ResolveReferences(ctx context.Context, c client.R mg.Spec.InitProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", - - "v1beta1", "ReplicationSubnetGroup", "ReplicationSubnetGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", "v1beta1", "ReplicationSubnetGroup", "ReplicationSubnetGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -351,9 +300,7 @@ func (mg *ReplicationInstance) ResolveReferences(ctx context.Context, c client.R mg.Spec.InitProvider.ReplicationSubnetGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ReplicationSubnetGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -379,15 +326,12 @@ func (mg *ReplicationInstance) ResolveReferences(ctx context.Context, c client.R func (mg *ReplicationSubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -406,9 +350,7 @@ func (mg *ReplicationSubnetGroup) ResolveReferences(ctx context.Context, c clien mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -434,17 +376,13 @@ func (mg *ReplicationSubnetGroup) ResolveReferences(ctx context.Context, c clien func (mg *ReplicationTask) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", - - "v1beta1", "ReplicationInstance", "ReplicationInstanceList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", "v1beta1", "ReplicationInstance", "ReplicationInstanceList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -462,12 +400,9 @@ func (mg *ReplicationTask) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.ReplicationInstanceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ReplicationInstanceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", - - "v1beta1", "Endpoint", "EndpointList") + m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", "v1beta1", "Endpoint", "EndpointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -484,12 +419,9 @@ func (mg *ReplicationTask) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.SourceEndpointArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceEndpointArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", - - "v1beta1", "Endpoint", "EndpointList") + m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", "v1beta1", "Endpoint", "EndpointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -506,11 +438,8 @@ func (mg *ReplicationTask) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.TargetEndpointArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TargetEndpointArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", - - "v1beta1", "ReplicationInstance", "ReplicationInstanceList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", "v1beta1", "ReplicationInstance", "ReplicationInstanceList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -528,12 +457,9 @@ func (mg *ReplicationTask) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.ReplicationInstanceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ReplicationInstanceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", - - "v1beta1", "Endpoint", "EndpointList") + m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", "v1beta1", "Endpoint", "EndpointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -550,12 +476,9 @@ func (mg *ReplicationTask) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.SourceEndpointArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.SourceEndpointArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", - - "v1beta1", "Endpoint", "EndpointList") + m, l, err = apisresolver.GetManagedResource("dms.aws.upbound.io", "v1beta1", "Endpoint", "EndpointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -579,19 +502,14 @@ func (mg *ReplicationTask) ResolveReferences(ctx context.Context, c client.Reade func (mg *S3Endpoint) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -608,13 +526,9 @@ func (mg *S3Endpoint) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -631,13 +545,9 @@ func (mg *S3Endpoint) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.ServerSideEncryptionKMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServerSideEncryptionKMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -654,13 +564,9 @@ func (mg *S3Endpoint) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.ServiceAccessRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServiceAccessRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -677,13 +583,9 @@ func (mg *S3Endpoint) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -700,13 +602,9 @@ func (mg *S3Endpoint) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.ServerSideEncryptionKMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ServerSideEncryptionKMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/docdb/v1beta1/zz_generated.resolvers.go b/apis/docdb/v1beta1/zz_generated.resolvers.go index 71e33ccf41..3058196c40 100644 --- a/apis/docdb/v1beta1/zz_generated.resolvers.go +++ b/apis/docdb/v1beta1/zz_generated.resolvers.go @@ -22,18 +22,14 @@ import ( func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", - - "v1beta1", "ClusterParameterGroup", "ClusterParameterGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", "v1beta1", "ClusterParameterGroup", "ClusterParameterGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -51,13 +47,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.DBClusterParameterGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBClusterParameterGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -74,9 +66,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -95,11 +85,8 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", - - "v1beta1", "ClusterParameterGroup", "ClusterParameterGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", "v1beta1", "ClusterParameterGroup", "ClusterParameterGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -117,13 +104,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.DBClusterParameterGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DBClusterParameterGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -140,9 +123,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -168,18 +149,14 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -196,12 +173,9 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.ClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -225,18 +199,14 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade func (mg *ClusterSnapshot) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -253,12 +223,9 @@ func (mg *ClusterSnapshot) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.DBClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -282,19 +249,14 @@ func (mg *ClusterSnapshot) ResolveReferences(ctx context.Context, c client.Reade func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -311,13 +273,9 @@ func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.SnsTopicArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SnsTopicArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -341,18 +299,14 @@ func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Rea func (mg *GlobalCluster) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -369,12 +323,9 @@ func (mg *GlobalCluster) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.SourceDBClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceDBClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("docdb.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -398,15 +349,12 @@ func (mg *GlobalCluster) ResolveReferences(ctx context.Context, c client.Reader) func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -425,9 +373,7 @@ func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIdsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/ds/v1beta1/zz_generated.resolvers.go b/apis/ds/v1beta1/zz_generated.resolvers.go index e8cf810a98..a101b2c307 100644 --- a/apis/ds/v1beta1/zz_generated.resolvers.go +++ b/apis/ds/v1beta1/zz_generated.resolvers.go @@ -21,18 +21,14 @@ func (mg *ConditionalForwarder) ResolveReferences( // ResolveReferences of this ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", - - "v1beta1", "Directory", "DirectoryList") + m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", "v1beta1", "Directory", "DirectoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -56,7 +52,6 @@ func (mg *ConditionalForwarder) ResolveReferences( // ResolveReferences of this func (mg *Directory) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -65,13 +60,10 @@ func (mg *Directory) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.ForProvider.ConnectSettings); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.ConnectSettings[i3].SubnetIds), Extract: reference.ExternalName(), @@ -89,15 +81,10 @@ func (mg *Directory) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.ForProvider.ConnectSettings); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ConnectSettings[i3].VPCID), Extract: resource.ExtractResourceID(), @@ -115,13 +102,10 @@ func (mg *Directory) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCSettings); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCSettings[i3].SubnetIds), Extract: reference.ExternalName(), @@ -139,15 +123,10 @@ func (mg *Directory) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCSettings); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VPCSettings[i3].VPCID), Extract: resource.ExtractResourceID(), @@ -165,13 +144,10 @@ func (mg *Directory) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.InitProvider.ConnectSettings); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.ConnectSettings[i3].SubnetIds), Extract: reference.ExternalName(), @@ -189,15 +165,10 @@ func (mg *Directory) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.InitProvider.ConnectSettings); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ConnectSettings[i3].VPCID), Extract: resource.ExtractResourceID(), @@ -215,13 +186,10 @@ func (mg *Directory) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCSettings); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCSettings[i3].SubnetIds), Extract: reference.ExternalName(), @@ -239,15 +207,10 @@ func (mg *Directory) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCSettings); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.VPCSettings[i3].VPCID), Extract: resource.ExtractResourceID(), @@ -271,18 +234,14 @@ func (mg *Directory) ResolveReferences(ctx context.Context, c client.Reader) err func (mg *SharedDirectory) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", - - "v1beta1", "Directory", "DirectoryList") + m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", "v1beta1", "Directory", "DirectoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -299,12 +258,9 @@ func (mg *SharedDirectory) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.DirectoryID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DirectoryIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", - - "v1beta1", "Directory", "DirectoryList") + m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", "v1beta1", "Directory", "DirectoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/dynamodb/v1beta1/zz_generated.resolvers.go b/apis/dynamodb/v1beta1/zz_generated.resolvers.go index aa41fbb62e..4fb3ab962d 100644 --- a/apis/dynamodb/v1beta1/zz_generated.resolvers.go +++ b/apis/dynamodb/v1beta1/zz_generated.resolvers.go @@ -22,15 +22,12 @@ func (mg *ContributorInsights) ResolveReferences( // ResolveReferences of this C ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", - - "v1beta1", "Table", "TableList") + m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", "v1beta1", "Table", "TableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -49,9 +46,7 @@ func (mg *ContributorInsights) ResolveReferences( // ResolveReferences of this C mg.Spec.ForProvider.TableName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TableNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", - - "v1beta1", "Table", "TableList") + m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", "v1beta1", "Table", "TableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -77,18 +72,14 @@ func (mg *ContributorInsights) ResolveReferences( // ResolveReferences of this C func (mg *KinesisStreamingDestination) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -105,9 +96,7 @@ func (mg *KinesisStreamingDestination) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.StreamArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StreamArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", - - "v1beta1", "Table", "TableList") + m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", "v1beta1", "Table", "TableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -126,12 +115,9 @@ func (mg *KinesisStreamingDestination) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.TableName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TableNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -148,9 +134,7 @@ func (mg *KinesisStreamingDestination) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.StreamArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.StreamArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", - - "v1beta1", "Table", "TableList") + m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", "v1beta1", "Table", "TableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -176,15 +160,12 @@ func (mg *KinesisStreamingDestination) ResolveReferences(ctx context.Context, c func (mg *TableItem) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", - - "v1beta1", "Table", "TableList") + m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", "v1beta1", "Table", "TableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -203,9 +184,7 @@ func (mg *TableItem) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.TableName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TableNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", - - "v1beta1", "Table", "TableList") + m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", "v1beta1", "Table", "TableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -231,15 +210,12 @@ func (mg *TableItem) ResolveReferences(ctx context.Context, c client.Reader) err func (mg *TableReplica) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", - - "v1beta1", "Table", "TableList") + m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", "v1beta1", "Table", "TableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -258,13 +234,9 @@ func (mg *TableReplica) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.GlobalTableArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GlobalTableArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -281,9 +253,7 @@ func (mg *TableReplica) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", - - "v1beta1", "Table", "TableList") + m, l, err = apisresolver.GetManagedResource("dynamodb.aws.upbound.io", "v1beta1", "Table", "TableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -302,13 +272,9 @@ func (mg *TableReplica) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.GlobalTableArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.GlobalTableArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/ec2/v1beta1/zz_generated.resolvers.go b/apis/ec2/v1beta1/zz_generated.resolvers.go index 391e55e11b..15b9d90200 100644 --- a/apis/ec2/v1beta1/zz_generated.resolvers.go +++ b/apis/ec2/v1beta1/zz_generated.resolvers.go @@ -23,7 +23,6 @@ import ( func (mg *AMI) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -31,14 +30,10 @@ func (mg *AMI) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.ForProvider.EBSBlockDevice); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EBSSnapshot", "EBSSnapshotList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EBSSnapshot", "EBSSnapshotList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EBSBlockDevice[i3].SnapshotID), Extract: reference.ExternalName(), @@ -56,14 +51,10 @@ func (mg *AMI) ResolveReferences(ctx context.Context, c client.Reader) error { } for i3 := 0; i3 < len(mg.Spec.InitProvider.EBSBlockDevice); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EBSSnapshot", "EBSSnapshotList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EBSSnapshot", "EBSSnapshotList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EBSBlockDevice[i3].SnapshotID), Extract: reference.ExternalName(), @@ -87,19 +78,14 @@ func (mg *AMI) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *AMICopy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -116,13 +102,9 @@ func (mg *AMICopy) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "AMI", "AMIList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "AMI", "AMIList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -139,13 +121,9 @@ func (mg *AMICopy) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.SourceAMIID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceAMIIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -162,13 +140,9 @@ func (mg *AMICopy) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "AMI", "AMIList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "AMI", "AMIList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -192,19 +166,14 @@ func (mg *AMICopy) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *AMILaunchPermission) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "AMI", "AMIList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "AMI", "AMIList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -221,13 +190,9 @@ func (mg *AMILaunchPermission) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.ImageID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ImageIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "AMI", "AMIList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "AMI", "AMIList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -251,19 +216,14 @@ func (mg *AMILaunchPermission) ResolveReferences(ctx context.Context, c client.R func (mg *CarrierGateway) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -280,13 +240,9 @@ func (mg *CarrierGateway) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -310,20 +266,15 @@ func (mg *CarrierGateway) ResolveReferences(ctx context.Context, c client.Reader func (mg *DefaultNetworkACL) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -342,14 +293,10 @@ func (mg *DefaultNetworkACL) ResolveReferences(ctx context.Context, c client.Rea for i3 := 0; i3 < len(mg.Spec.ForProvider.Ingress); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "DefaultVPC", "DefaultVPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "DefaultVPC", "DefaultVPCList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Ingress[i3].CidrBlock), Extract: resource.ExtractParamPath("cidr_block", true), @@ -366,13 +313,10 @@ func (mg *DefaultNetworkACL) ResolveReferences(ctx context.Context, c client.Rea } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SubnetIds), Extract: reference.ExternalName(), @@ -387,13 +331,9 @@ func (mg *DefaultNetworkACL) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -412,14 +352,10 @@ func (mg *DefaultNetworkACL) ResolveReferences(ctx context.Context, c client.Rea for i3 := 0; i3 < len(mg.Spec.InitProvider.Ingress); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "DefaultVPC", "DefaultVPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "DefaultVPC", "DefaultVPCList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Ingress[i3].CidrBlock), Extract: resource.ExtractParamPath("cidr_block", true), @@ -436,13 +372,10 @@ func (mg *DefaultNetworkACL) ResolveReferences(ctx context.Context, c client.Rea } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.SubnetIds), Extract: reference.ExternalName(), @@ -464,19 +397,14 @@ func (mg *DefaultNetworkACL) ResolveReferences(ctx context.Context, c client.Rea func (mg *DefaultRouteTable) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -495,13 +423,10 @@ func (mg *DefaultRouteTable) ResolveReferences(ctx context.Context, c client.Rea for i3 := 0; i3 < len(mg.Spec.ForProvider.Route); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EgressOnlyInternetGateway", "EgressOnlyInternetGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EgressOnlyInternetGateway", "EgressOnlyInternetGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Route[i3].EgressOnlyGatewayID), Extract: resource.ExtractResourceID(), @@ -519,13 +444,10 @@ func (mg *DefaultRouteTable) ResolveReferences(ctx context.Context, c client.Rea } for i3 := 0; i3 < len(mg.Spec.ForProvider.Route); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "InternetGateway", "InternetGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "InternetGateway", "InternetGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Route[i3].GatewayID), Extract: resource.ExtractResourceID(), @@ -542,15 +464,10 @@ func (mg *DefaultRouteTable) ResolveReferences(ctx context.Context, c client.Rea } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DefaultRouteTableID), Extract: resource.ExtractParamPath("default_route_table_id", true), @@ -567,13 +484,10 @@ func (mg *DefaultRouteTable) ResolveReferences(ctx context.Context, c client.Rea for i3 := 0; i3 < len(mg.Spec.InitProvider.Route); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EgressOnlyInternetGateway", "EgressOnlyInternetGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EgressOnlyInternetGateway", "EgressOnlyInternetGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Route[i3].EgressOnlyGatewayID), Extract: resource.ExtractResourceID(), @@ -591,13 +505,10 @@ func (mg *DefaultRouteTable) ResolveReferences(ctx context.Context, c client.Rea } for i3 := 0; i3 < len(mg.Spec.InitProvider.Route); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "InternetGateway", "InternetGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "InternetGateway", "InternetGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Route[i3].GatewayID), Extract: resource.ExtractResourceID(), @@ -621,19 +532,14 @@ func (mg *DefaultRouteTable) ResolveReferences(ctx context.Context, c client.Rea func (mg *DefaultSecurityGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -650,13 +556,9 @@ func (mg *DefaultSecurityGroup) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -680,19 +582,14 @@ func (mg *DefaultSecurityGroup) ResolveReferences(ctx context.Context, c client. func (mg *EBSDefaultKMSKey) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -709,13 +606,9 @@ func (mg *EBSDefaultKMSKey) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.KeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -739,18 +632,14 @@ func (mg *EBSDefaultKMSKey) ResolveReferences(ctx context.Context, c client.Read func (mg *EBSSnapshot) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EBSVolume", "EBSVolumeList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EBSVolume", "EBSVolumeList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -767,12 +656,9 @@ func (mg *EBSSnapshot) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.VolumeID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VolumeIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EBSVolume", "EBSVolumeList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EBSVolume", "EBSVolumeList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -796,19 +682,14 @@ func (mg *EBSSnapshot) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *EBSSnapshotCopy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -825,12 +706,9 @@ func (mg *EBSSnapshotCopy) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EBSSnapshot", "EBSSnapshotList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EBSSnapshot", "EBSSnapshotList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -847,13 +725,9 @@ func (mg *EBSSnapshotCopy) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.SourceSnapshotID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceSnapshotIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -870,12 +744,9 @@ func (mg *EBSSnapshotCopy) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EBSSnapshot", "EBSSnapshotList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EBSSnapshot", "EBSSnapshotList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -899,19 +770,14 @@ func (mg *EBSSnapshotCopy) ResolveReferences(ctx context.Context, c client.Reade func (mg *EBSSnapshotImport) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -928,13 +794,9 @@ func (mg *EBSSnapshotImport) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -958,19 +820,14 @@ func (mg *EBSSnapshotImport) ResolveReferences(ctx context.Context, c client.Rea func (mg *EBSVolume) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -987,13 +844,9 @@ func (mg *EBSVolume) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1017,18 +870,14 @@ func (mg *EBSVolume) ResolveReferences(ctx context.Context, c client.Reader) err func (mg *EIP) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1045,9 +894,7 @@ func (mg *EIP) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.Instance = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1066,12 +913,9 @@ func (mg *EIP) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.NetworkInterface = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NetworkInterfaceRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1088,9 +932,7 @@ func (mg *EIP) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.Instance = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.InstanceRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1116,19 +958,14 @@ func (mg *EIP) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *EIPAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EIP", "EIPList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EIP", "EIPList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1145,12 +982,9 @@ func (mg *EIPAssociation) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.AllocationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AllocationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1167,13 +1001,9 @@ func (mg *EIPAssociation) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EIP", "EIPList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EIP", "EIPList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1190,12 +1020,9 @@ func (mg *EIPAssociation) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.AllocationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.AllocationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1219,19 +1046,14 @@ func (mg *EIPAssociation) ResolveReferences(ctx context.Context, c client.Reader func (mg *EgressOnlyInternetGateway) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1248,13 +1070,9 @@ func (mg *EgressOnlyInternetGateway) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1278,19 +1096,14 @@ func (mg *EgressOnlyInternetGateway) ResolveReferences(ctx context.Context, c cl func (mg *FlowLog) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1307,12 +1120,9 @@ func (mg *FlowLog) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.IAMRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IAMRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1329,9 +1139,7 @@ func (mg *FlowLog) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.LogDestination = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LogDestinationRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1350,13 +1158,9 @@ func (mg *FlowLog) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1373,13 +1177,9 @@ func (mg *FlowLog) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1396,12 +1196,9 @@ func (mg *FlowLog) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.IAMRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.IAMRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1418,9 +1215,7 @@ func (mg *FlowLog) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.LogDestination = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.LogDestinationRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1439,13 +1234,9 @@ func (mg *FlowLog) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1469,7 +1260,6 @@ func (mg *FlowLog) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -1478,15 +1268,10 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.EBSBlockDevice); i3++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EBSBlockDevice[i3].KMSKeyID), Extract: reference.ExternalName(), @@ -1504,13 +1289,10 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.NetworkInterface); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.NetworkInterface[i3].NetworkInterfaceID), Extract: reference.ExternalName(), @@ -1528,15 +1310,10 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.RootBlockDevice); i3++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RootBlockDevice[i3].KMSKeyID), Extract: reference.ExternalName(), @@ -1553,13 +1330,10 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SubnetID), Extract: reference.ExternalName(), @@ -1574,9 +1348,7 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1597,15 +1369,10 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.InitProvider.EBSBlockDevice); i3++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EBSBlockDevice[i3].KMSKeyID), Extract: reference.ExternalName(), @@ -1623,13 +1390,10 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.NetworkInterface); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.NetworkInterface[i3].NetworkInterfaceID), Extract: reference.ExternalName(), @@ -1647,15 +1411,10 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.RootBlockDevice); i3++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RootBlockDevice[i3].KMSKeyID), Extract: reference.ExternalName(), @@ -1672,13 +1431,10 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SubnetID), Extract: reference.ExternalName(), @@ -1693,9 +1449,7 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1721,18 +1475,14 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *InstanceState) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1749,12 +1499,9 @@ func (mg *InstanceState) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1778,19 +1525,14 @@ func (mg *InstanceState) ResolveReferences(ctx context.Context, c client.Reader) func (mg *InternetGateway) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1807,13 +1549,9 @@ func (mg *InternetGateway) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1837,7 +1575,6 @@ func (mg *InternetGateway) ResolveReferences(ctx context.Context, c client.Reade func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -1847,15 +1584,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.ForProvider.BlockDeviceMappings); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.BlockDeviceMappings[i3].EBS); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.BlockDeviceMappings[i3].EBS[i4].KMSKeyID), Extract: common.ARNExtractor(), @@ -1874,13 +1606,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.ForProvider.IAMInstanceProfile); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "InstanceProfile", "InstanceProfileList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "InstanceProfile", "InstanceProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.IAMInstanceProfile[i3].Arn), Extract: common.ARNExtractor(), @@ -1898,13 +1627,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.ForProvider.IAMInstanceProfile); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "InstanceProfile", "InstanceProfileList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "InstanceProfile", "InstanceProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.IAMInstanceProfile[i3].Name), Extract: reference.ExternalName(), @@ -1922,13 +1648,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.ForProvider.NetworkInterfaces); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.NetworkInterfaces[i3].NetworkInterfaceID), Extract: reference.ExternalName(), @@ -1946,13 +1669,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.ForProvider.NetworkInterfaces); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.NetworkInterfaces[i3].SecurityGroups), Extract: reference.ExternalName(), @@ -1970,13 +1690,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.ForProvider.NetworkInterfaces); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.NetworkInterfaces[i3].SubnetID), Extract: reference.ExternalName(), @@ -1993,13 +1710,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SecurityGroupNames), Extract: reference.ExternalName(), @@ -2014,9 +1728,7 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.SecurityGroupNames = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupNameRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2038,15 +1750,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.InitProvider.BlockDeviceMappings); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.BlockDeviceMappings[i3].EBS); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.BlockDeviceMappings[i3].EBS[i4].KMSKeyID), Extract: common.ARNExtractor(), @@ -2065,13 +1772,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.InitProvider.IAMInstanceProfile); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "InstanceProfile", "InstanceProfileList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "InstanceProfile", "InstanceProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.IAMInstanceProfile[i3].Arn), Extract: common.ARNExtractor(), @@ -2089,13 +1793,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.InitProvider.IAMInstanceProfile); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "InstanceProfile", "InstanceProfileList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "InstanceProfile", "InstanceProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.IAMInstanceProfile[i3].Name), Extract: reference.ExternalName(), @@ -2113,13 +1814,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.InitProvider.NetworkInterfaces); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.NetworkInterfaces[i3].NetworkInterfaceID), Extract: reference.ExternalName(), @@ -2137,13 +1835,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.InitProvider.NetworkInterfaces); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.NetworkInterfaces[i3].SecurityGroups), Extract: reference.ExternalName(), @@ -2161,13 +1856,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.InitProvider.NetworkInterfaces); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.NetworkInterfaces[i3].SubnetID), Extract: reference.ExternalName(), @@ -2184,13 +1876,10 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.SecurityGroupNames), Extract: reference.ExternalName(), @@ -2205,9 +1894,7 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.SecurityGroupNames = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupNameRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2233,18 +1920,14 @@ func (mg *LaunchTemplate) ResolveReferences(ctx context.Context, c client.Reader func (mg *MainRouteTableAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "RouteTable", "RouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "RouteTable", "RouteTableList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2261,13 +1944,9 @@ func (mg *MainRouteTableAssociation) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.RouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2284,12 +1963,9 @@ func (mg *MainRouteTableAssociation) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "RouteTable", "RouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "RouteTable", "RouteTableList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2306,13 +1982,9 @@ func (mg *MainRouteTableAssociation) ResolveReferences(ctx context.Context, c cl mg.Spec.InitProvider.RouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2336,7 +2008,6 @@ func (mg *MainRouteTableAssociation) ResolveReferences(ctx context.Context, c cl func (mg *ManagedPrefixList) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -2344,15 +2015,10 @@ func (mg *ManagedPrefixList) ResolveReferences(ctx context.Context, c client.Rea for i3 := 0; i3 < len(mg.Spec.ForProvider.Entry); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIPv4CidrBlockAssociation", "VPCIPv4CidrBlockAssociationList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIPv4CidrBlockAssociation", "VPCIPv4CidrBlockAssociationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Entry[i3].Cidr), Extract: resource.ExtractParamPath("cidr_block", false), @@ -2370,15 +2036,10 @@ func (mg *ManagedPrefixList) ResolveReferences(ctx context.Context, c client.Rea } for i3 := 0; i3 < len(mg.Spec.InitProvider.Entry); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIPv4CidrBlockAssociation", "VPCIPv4CidrBlockAssociationList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIPv4CidrBlockAssociation", "VPCIPv4CidrBlockAssociationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Entry[i3].Cidr), Extract: resource.ExtractParamPath("cidr_block", false), @@ -2402,19 +2063,14 @@ func (mg *ManagedPrefixList) ResolveReferences(ctx context.Context, c client.Rea func (mg *ManagedPrefixListEntry) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2431,9 +2087,7 @@ func (mg *ManagedPrefixListEntry) ResolveReferences(ctx context.Context, c clien mg.Spec.ForProvider.Cidr = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CidrRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2452,13 +2106,9 @@ func (mg *ManagedPrefixListEntry) ResolveReferences(ctx context.Context, c clien mg.Spec.ForProvider.PrefixListID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PrefixListIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2475,9 +2125,7 @@ func (mg *ManagedPrefixListEntry) ResolveReferences(ctx context.Context, c clien mg.Spec.InitProvider.Cidr = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.CidrRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2503,19 +2151,14 @@ func (mg *ManagedPrefixListEntry) ResolveReferences(ctx context.Context, c clien func (mg *NATGateway) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EIP", "EIPList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EIP", "EIPList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2532,9 +2175,7 @@ func (mg *NATGateway) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.AllocationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AllocationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2553,13 +2194,9 @@ func (mg *NATGateway) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EIP", "EIPList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EIP", "EIPList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2576,9 +2213,7 @@ func (mg *NATGateway) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.AllocationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.AllocationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2604,16 +2239,13 @@ func (mg *NATGateway) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *NetworkACL) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2632,13 +2264,9 @@ func (mg *NetworkACL) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2655,9 +2283,7 @@ func (mg *NetworkACL) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2676,13 +2302,9 @@ func (mg *NetworkACL) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2706,18 +2328,14 @@ func (mg *NetworkACL) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *NetworkACLRule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkACL", "NetworkACLList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkACL", "NetworkACLList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2734,12 +2352,9 @@ func (mg *NetworkACLRule) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.NetworkACLID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NetworkACLIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkACL", "NetworkACLList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkACL", "NetworkACLList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2763,17 +2378,13 @@ func (mg *NetworkACLRule) ResolveReferences(ctx context.Context, c client.Reader func (mg *NetworkInsightsAnalysis) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInsightsPath", "NetworkInsightsPathList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInsightsPath", "NetworkInsightsPathList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2791,11 +2402,8 @@ func (mg *NetworkInsightsAnalysis) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.NetworkInsightsPathID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NetworkInsightsPathIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInsightsPath", "NetworkInsightsPathList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInsightsPath", "NetworkInsightsPathList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2820,15 +2428,12 @@ func (mg *NetworkInsightsAnalysis) ResolveReferences(ctx context.Context, c clie func (mg *NetworkInsightsPath) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2847,9 +2452,7 @@ func (mg *NetworkInsightsPath) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.Destination = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DestinationRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2868,9 +2471,7 @@ func (mg *NetworkInsightsPath) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.Source = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2889,9 +2490,7 @@ func (mg *NetworkInsightsPath) ResolveReferences(ctx context.Context, c client.R mg.Spec.InitProvider.Destination = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DestinationRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2917,16 +2516,13 @@ func (mg *NetworkInsightsPath) ResolveReferences(ctx context.Context, c client.R func (mg *NetworkInterface) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2945,9 +2541,7 @@ func (mg *NetworkInterface) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.SecurityGroups = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2966,9 +2560,7 @@ func (mg *NetworkInterface) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2987,9 +2579,7 @@ func (mg *NetworkInterface) ResolveReferences(ctx context.Context, c client.Read mg.Spec.InitProvider.SecurityGroups = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3015,18 +2605,14 @@ func (mg *NetworkInterface) ResolveReferences(ctx context.Context, c client.Read func (mg *NetworkInterfaceAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3043,9 +2629,7 @@ func (mg *NetworkInterfaceAttachment) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3064,12 +2648,9 @@ func (mg *NetworkInterfaceAttachment) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.NetworkInterfaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NetworkInterfaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3086,9 +2667,7 @@ func (mg *NetworkInterfaceAttachment) ResolveReferences(ctx context.Context, c c mg.Spec.InitProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3114,18 +2693,14 @@ func (mg *NetworkInterfaceAttachment) ResolveReferences(ctx context.Context, c c func (mg *NetworkInterfaceSgAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3142,9 +2717,7 @@ func (mg *NetworkInterfaceSgAttachment) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.NetworkInterfaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NetworkInterfaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3163,12 +2736,9 @@ func (mg *NetworkInterfaceSgAttachment) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.SecurityGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SecurityGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3185,9 +2755,7 @@ func (mg *NetworkInterfaceSgAttachment) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.NetworkInterfaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.NetworkInterfaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3213,15 +2781,12 @@ func (mg *NetworkInterfaceSgAttachment) ResolveReferences(ctx context.Context, c func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3240,9 +2805,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.DestinationPrefixListID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DestinationPrefixListIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EgressOnlyInternetGateway", "EgressOnlyInternetGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EgressOnlyInternetGateway", "EgressOnlyInternetGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3261,9 +2824,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.EgressOnlyGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EgressOnlyGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "InternetGateway", "InternetGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "InternetGateway", "InternetGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3282,12 +2843,9 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.GatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NATGateway", "NATGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NATGateway", "NATGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3304,9 +2862,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.NATGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NATGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3325,12 +2881,9 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.NetworkInterfaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NetworkInterfaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "RouteTable", "RouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "RouteTable", "RouteTableList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3347,9 +2900,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.RouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3368,12 +2919,9 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.TransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpoint", "VPCEndpointList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpoint", "VPCEndpointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3390,11 +2938,8 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.VPCEndpointID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCEndpointIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCPeeringConnection", "VPCPeeringConnectionList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCPeeringConnection", "VPCPeeringConnectionList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3412,9 +2957,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.VPCPeeringConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCPeeringConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3433,9 +2976,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.DestinationPrefixListID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DestinationPrefixListIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EgressOnlyInternetGateway", "EgressOnlyInternetGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EgressOnlyInternetGateway", "EgressOnlyInternetGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3454,9 +2995,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.EgressOnlyGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.EgressOnlyGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "InternetGateway", "InternetGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "InternetGateway", "InternetGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3475,12 +3014,9 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.GatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.GatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NATGateway", "NATGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NATGateway", "NATGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3497,9 +3033,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.NATGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.NATGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3518,12 +3052,9 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.NetworkInterfaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.NetworkInterfaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "RouteTable", "RouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "RouteTable", "RouteTableList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3540,9 +3071,7 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.RouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3561,12 +3090,9 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.TransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.TransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpoint", "VPCEndpointList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpoint", "VPCEndpointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3583,11 +3109,8 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.VPCEndpointID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.VPCEndpointIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCPeeringConnection", "VPCPeeringConnectionList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCPeeringConnection", "VPCPeeringConnectionList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3612,19 +3135,14 @@ func (mg *Route) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *RouteTable) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3641,13 +3159,9 @@ func (mg *RouteTable) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3671,15 +3185,12 @@ func (mg *RouteTable) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *RouteTableAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "InternetGateway", "InternetGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "InternetGateway", "InternetGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3698,12 +3209,9 @@ func (mg *RouteTableAssociation) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.GatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "RouteTable", "RouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "RouteTable", "RouteTableList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3720,9 +3228,7 @@ func (mg *RouteTableAssociation) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.RouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3741,9 +3247,7 @@ func (mg *RouteTableAssociation) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "InternetGateway", "InternetGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "InternetGateway", "InternetGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3762,12 +3266,9 @@ func (mg *RouteTableAssociation) ResolveReferences(ctx context.Context, c client mg.Spec.InitProvider.GatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.GatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "RouteTable", "RouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "RouteTable", "RouteTableList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3784,9 +3285,7 @@ func (mg *RouteTableAssociation) ResolveReferences(ctx context.Context, c client mg.Spec.InitProvider.RouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3812,19 +3311,14 @@ func (mg *RouteTableAssociation) ResolveReferences(ctx context.Context, c client func (mg *SecurityGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3841,13 +3335,9 @@ func (mg *SecurityGroup) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -3871,15 +3361,12 @@ func (mg *SecurityGroup) ResolveReferences(ctx context.Context, c client.Reader) func (mg *SecurityGroupEgressRule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3898,9 +3385,7 @@ func (mg *SecurityGroupEgressRule) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.PrefixListID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PrefixListIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3919,9 +3404,7 @@ func (mg *SecurityGroupEgressRule) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.ReferencedSecurityGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ReferencedSecurityGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3940,9 +3423,7 @@ func (mg *SecurityGroupEgressRule) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.SecurityGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SecurityGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3961,9 +3442,7 @@ func (mg *SecurityGroupEgressRule) ResolveReferences(ctx context.Context, c clie mg.Spec.InitProvider.PrefixListID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PrefixListIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -3982,9 +3461,7 @@ func (mg *SecurityGroupEgressRule) ResolveReferences(ctx context.Context, c clie mg.Spec.InitProvider.ReferencedSecurityGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ReferencedSecurityGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4010,15 +3487,12 @@ func (mg *SecurityGroupEgressRule) ResolveReferences(ctx context.Context, c clie func (mg *SecurityGroupIngressRule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4037,9 +3511,7 @@ func (mg *SecurityGroupIngressRule) ResolveReferences(ctx context.Context, c cli mg.Spec.ForProvider.PrefixListID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PrefixListIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4058,9 +3530,7 @@ func (mg *SecurityGroupIngressRule) ResolveReferences(ctx context.Context, c cli mg.Spec.ForProvider.ReferencedSecurityGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ReferencedSecurityGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4079,9 +3549,7 @@ func (mg *SecurityGroupIngressRule) ResolveReferences(ctx context.Context, c cli mg.Spec.ForProvider.SecurityGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SecurityGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4100,9 +3568,7 @@ func (mg *SecurityGroupIngressRule) ResolveReferences(ctx context.Context, c cli mg.Spec.InitProvider.PrefixListID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PrefixListIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4121,9 +3587,7 @@ func (mg *SecurityGroupIngressRule) ResolveReferences(ctx context.Context, c cli mg.Spec.InitProvider.ReferencedSecurityGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ReferencedSecurityGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4149,16 +3613,13 @@ func (mg *SecurityGroupIngressRule) ResolveReferences(ctx context.Context, c cli func (mg *SecurityGroupRule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4177,9 +3638,7 @@ func (mg *SecurityGroupRule) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.PrefixListIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.PrefixListIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4198,9 +3657,7 @@ func (mg *SecurityGroupRule) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.SecurityGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SecurityGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4219,9 +3676,7 @@ func (mg *SecurityGroupRule) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.SourceSecurityGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceSecurityGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4240,9 +3695,7 @@ func (mg *SecurityGroupRule) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.InitProvider.PrefixListIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.PrefixListIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4261,9 +3714,7 @@ func (mg *SecurityGroupRule) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.InitProvider.SecurityGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.SecurityGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4289,18 +3740,14 @@ func (mg *SecurityGroupRule) ResolveReferences(ctx context.Context, c client.Rea func (mg *SnapshotCreateVolumePermission) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EBSSnapshot", "EBSSnapshotList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EBSSnapshot", "EBSSnapshotList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -4317,12 +3764,9 @@ func (mg *SnapshotCreateVolumePermission) ResolveReferences(ctx context.Context, mg.Spec.ForProvider.SnapshotID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SnapshotIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EBSSnapshot", "EBSSnapshotList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EBSSnapshot", "EBSSnapshotList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -4346,7 +3790,6 @@ func (mg *SnapshotCreateVolumePermission) ResolveReferences(ctx context.Context, func (mg *SpotFleetRequest) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -4354,13 +3797,10 @@ func (mg *SpotFleetRequest) ResolveReferences(ctx context.Context, c client.Read for i3 := 0; i3 < len(mg.Spec.ForProvider.LaunchSpecification); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "InstanceProfile", "InstanceProfileList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "InstanceProfile", "InstanceProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LaunchSpecification[i3].IAMInstanceProfileArn), Extract: resource.ExtractParamPath("arn", true), @@ -4379,13 +3819,10 @@ func (mg *SpotFleetRequest) ResolveReferences(ctx context.Context, c client.Read for i3 := 0; i3 < len(mg.Spec.ForProvider.LaunchTemplateConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.LaunchTemplateConfig[i3].LaunchTemplateSpecification); i4++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "LaunchTemplate", "LaunchTemplateList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "LaunchTemplate", "LaunchTemplateList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LaunchTemplateConfig[i3].LaunchTemplateSpecification[i4].ID), Extract: resource.ExtractResourceID(), @@ -4405,13 +3842,10 @@ func (mg *SpotFleetRequest) ResolveReferences(ctx context.Context, c client.Read for i3 := 0; i3 < len(mg.Spec.ForProvider.LaunchTemplateConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.LaunchTemplateConfig[i3].LaunchTemplateSpecification); i4++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "LaunchTemplate", "LaunchTemplateList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "LaunchTemplate", "LaunchTemplateList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LaunchTemplateConfig[i3].LaunchTemplateSpecification[i4].Version), Extract: resource.ExtractParamPath("latest_version", true), @@ -4430,13 +3864,10 @@ func (mg *SpotFleetRequest) ResolveReferences(ctx context.Context, c client.Read } for i3 := 0; i3 < len(mg.Spec.InitProvider.LaunchSpecification); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "InstanceProfile", "InstanceProfileList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "InstanceProfile", "InstanceProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LaunchSpecification[i3].IAMInstanceProfileArn), Extract: resource.ExtractParamPath("arn", true), @@ -4455,13 +3886,10 @@ func (mg *SpotFleetRequest) ResolveReferences(ctx context.Context, c client.Read for i3 := 0; i3 < len(mg.Spec.InitProvider.LaunchTemplateConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.LaunchTemplateConfig[i3].LaunchTemplateSpecification); i4++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "LaunchTemplate", "LaunchTemplateList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "LaunchTemplate", "LaunchTemplateList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LaunchTemplateConfig[i3].LaunchTemplateSpecification[i4].ID), Extract: resource.ExtractResourceID(), @@ -4481,13 +3909,10 @@ func (mg *SpotFleetRequest) ResolveReferences(ctx context.Context, c client.Read for i3 := 0; i3 < len(mg.Spec.InitProvider.LaunchTemplateConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.LaunchTemplateConfig[i3].LaunchTemplateSpecification); i4++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "LaunchTemplate", "LaunchTemplateList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "LaunchTemplate", "LaunchTemplateList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LaunchTemplateConfig[i3].LaunchTemplateSpecification[i4].Version), Extract: resource.ExtractParamPath("latest_version", true), @@ -4512,16 +3937,13 @@ func (mg *SpotFleetRequest) ResolveReferences(ctx context.Context, c client.Read func (mg *SpotInstanceRequest) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4540,9 +3962,7 @@ func (mg *SpotInstanceRequest) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4561,9 +3981,7 @@ func (mg *SpotInstanceRequest) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4582,9 +4000,7 @@ func (mg *SpotInstanceRequest) ResolveReferences(ctx context.Context, c client.R mg.Spec.InitProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4610,19 +4026,14 @@ func (mg *SpotInstanceRequest) ResolveReferences(ctx context.Context, c client.R func (mg *Subnet) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -4639,13 +4050,9 @@ func (mg *Subnet) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -4669,15 +4076,12 @@ func (mg *Subnet) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *SubnetCidrReservation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4696,9 +4100,7 @@ func (mg *SubnetCidrReservation) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4724,17 +4126,13 @@ func (mg *SubnetCidrReservation) ResolveReferences(ctx context.Context, c client func (mg *TrafficMirrorFilterRule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TrafficMirrorFilter", "TrafficMirrorFilterList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TrafficMirrorFilter", "TrafficMirrorFilterList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4752,11 +4150,8 @@ func (mg *TrafficMirrorFilterRule) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.TrafficMirrorFilterID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TrafficMirrorFilterIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TrafficMirrorFilter", "TrafficMirrorFilterList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TrafficMirrorFilter", "TrafficMirrorFilterList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4781,15 +4176,12 @@ func (mg *TrafficMirrorFilterRule) ResolveReferences(ctx context.Context, c clie func (mg *TransitGatewayConnect) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4808,13 +4200,9 @@ func (mg *TransitGatewayConnect) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.TransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -4831,9 +4219,7 @@ func (mg *TransitGatewayConnect) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.TransportAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransportAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4852,13 +4238,9 @@ func (mg *TransitGatewayConnect) ResolveReferences(ctx context.Context, c client mg.Spec.InitProvider.TransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.TransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -4882,17 +4264,13 @@ func (mg *TransitGatewayConnect) ResolveReferences(ctx context.Context, c client func (mg *TransitGatewayConnectPeer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayConnect", "TransitGatewayConnectList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayConnect", "TransitGatewayConnectList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4910,11 +4288,8 @@ func (mg *TransitGatewayConnectPeer) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.TransitGatewayAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayConnect", "TransitGatewayConnectList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayConnect", "TransitGatewayConnectList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4939,15 +4314,12 @@ func (mg *TransitGatewayConnectPeer) ResolveReferences(ctx context.Context, c cl func (mg *TransitGatewayMulticastDomain) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4966,9 +4338,7 @@ func (mg *TransitGatewayMulticastDomain) ResolveReferences(ctx context.Context, mg.Spec.ForProvider.TransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -4994,15 +4364,12 @@ func (mg *TransitGatewayMulticastDomain) ResolveReferences(ctx context.Context, func (mg *TransitGatewayMulticastDomainAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5021,13 +4388,9 @@ func (mg *TransitGatewayMulticastDomainAssociation) ResolveReferences(ctx contex mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -5044,10 +4407,7 @@ func (mg *TransitGatewayMulticastDomainAssociation) ResolveReferences(ctx contex mg.Spec.ForProvider.TransitGatewayAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayMulticastDomain", "TransitGatewayMulticastDomainList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayMulticastDomain", "TransitGatewayMulticastDomainList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5066,9 +4426,7 @@ func (mg *TransitGatewayMulticastDomainAssociation) ResolveReferences(ctx contex mg.Spec.ForProvider.TransitGatewayMulticastDomainID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayMulticastDomainIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5087,13 +4445,9 @@ func (mg *TransitGatewayMulticastDomainAssociation) ResolveReferences(ctx contex mg.Spec.InitProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -5110,10 +4464,7 @@ func (mg *TransitGatewayMulticastDomainAssociation) ResolveReferences(ctx contex mg.Spec.InitProvider.TransitGatewayAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.TransitGatewayAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayMulticastDomain", "TransitGatewayMulticastDomainList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayMulticastDomain", "TransitGatewayMulticastDomainList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5139,15 +4490,12 @@ func (mg *TransitGatewayMulticastDomainAssociation) ResolveReferences(ctx contex func (mg *TransitGatewayMulticastGroupMember) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5166,10 +4514,7 @@ func (mg *TransitGatewayMulticastGroupMember) ResolveReferences(ctx context.Cont mg.Spec.ForProvider.NetworkInterfaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NetworkInterfaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayMulticastDomain", "TransitGatewayMulticastDomainList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayMulticastDomain", "TransitGatewayMulticastDomainList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5188,9 +4533,7 @@ func (mg *TransitGatewayMulticastGroupMember) ResolveReferences(ctx context.Cont mg.Spec.ForProvider.TransitGatewayMulticastDomainID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayMulticastDomainIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5209,10 +4552,7 @@ func (mg *TransitGatewayMulticastGroupMember) ResolveReferences(ctx context.Cont mg.Spec.InitProvider.NetworkInterfaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.NetworkInterfaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayMulticastDomain", "TransitGatewayMulticastDomainList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayMulticastDomain", "TransitGatewayMulticastDomainList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5238,15 +4578,12 @@ func (mg *TransitGatewayMulticastGroupMember) ResolveReferences(ctx context.Cont func (mg *TransitGatewayMulticastGroupSource) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5265,10 +4602,7 @@ func (mg *TransitGatewayMulticastGroupSource) ResolveReferences(ctx context.Cont mg.Spec.ForProvider.NetworkInterfaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NetworkInterfaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayMulticastDomain", "TransitGatewayMulticastDomainList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayMulticastDomain", "TransitGatewayMulticastDomainList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5287,9 +4621,7 @@ func (mg *TransitGatewayMulticastGroupSource) ResolveReferences(ctx context.Cont mg.Spec.ForProvider.TransitGatewayMulticastDomainID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayMulticastDomainIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "NetworkInterface", "NetworkInterfaceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "NetworkInterface", "NetworkInterfaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5308,10 +4640,7 @@ func (mg *TransitGatewayMulticastGroupSource) ResolveReferences(ctx context.Cont mg.Spec.InitProvider.NetworkInterfaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.NetworkInterfaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayMulticastDomain", "TransitGatewayMulticastDomainList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayMulticastDomain", "TransitGatewayMulticastDomainList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5337,15 +4666,12 @@ func (mg *TransitGatewayMulticastGroupSource) ResolveReferences(ctx context.Cont func (mg *TransitGatewayPeeringAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5364,9 +4690,7 @@ func (mg *TransitGatewayPeeringAttachment) ResolveReferences(ctx context.Context mg.Spec.ForProvider.PeerTransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PeerTransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5385,9 +4709,7 @@ func (mg *TransitGatewayPeeringAttachment) ResolveReferences(ctx context.Context mg.Spec.ForProvider.TransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5406,9 +4728,7 @@ func (mg *TransitGatewayPeeringAttachment) ResolveReferences(ctx context.Context mg.Spec.InitProvider.PeerTransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PeerTransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5434,16 +4754,12 @@ func (mg *TransitGatewayPeeringAttachment) ResolveReferences(ctx context.Context func (mg *TransitGatewayPeeringAttachmentAccepter) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayPeeringAttachment", "TransitGatewayPeeringAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayPeeringAttachment", "TransitGatewayPeeringAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5462,10 +4778,7 @@ func (mg *TransitGatewayPeeringAttachmentAccepter) ResolveReferences(ctx context mg.Spec.ForProvider.TransitGatewayAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayPeeringAttachment", "TransitGatewayPeeringAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayPeeringAttachment", "TransitGatewayPeeringAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5491,15 +4804,12 @@ func (mg *TransitGatewayPeeringAttachmentAccepter) ResolveReferences(ctx context func (mg *TransitGatewayPolicyTable) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5518,9 +4828,7 @@ func (mg *TransitGatewayPolicyTable) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.TransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5546,15 +4854,12 @@ func (mg *TransitGatewayPolicyTable) ResolveReferences(ctx context.Context, c cl func (mg *TransitGatewayPrefixListReference) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5573,13 +4878,9 @@ func (mg *TransitGatewayPrefixListReference) ResolveReferences(ctx context.Conte mg.Spec.ForProvider.PrefixListID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PrefixListIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -5596,9 +4897,7 @@ func (mg *TransitGatewayPrefixListReference) ResolveReferences(ctx context.Conte mg.Spec.ForProvider.TransitGatewayAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5617,9 +4916,7 @@ func (mg *TransitGatewayPrefixListReference) ResolveReferences(ctx context.Conte mg.Spec.ForProvider.TransitGatewayRouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayRouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5638,13 +4935,9 @@ func (mg *TransitGatewayPrefixListReference) ResolveReferences(ctx context.Conte mg.Spec.InitProvider.PrefixListID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PrefixListIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -5661,9 +4954,7 @@ func (mg *TransitGatewayPrefixListReference) ResolveReferences(ctx context.Conte mg.Spec.InitProvider.TransitGatewayAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.TransitGatewayAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5689,19 +4980,14 @@ func (mg *TransitGatewayPrefixListReference) ResolveReferences(ctx context.Conte func (mg *TransitGatewayRoute) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -5718,9 +5004,7 @@ func (mg *TransitGatewayRoute) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.TransitGatewayAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayRouteTable", "TransitGatewayRouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayRouteTable", "TransitGatewayRouteTableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5739,13 +5023,9 @@ func (mg *TransitGatewayRoute) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.TransitGatewayRouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayRouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -5762,9 +5042,7 @@ func (mg *TransitGatewayRoute) ResolveReferences(ctx context.Context, c client.R mg.Spec.InitProvider.TransitGatewayAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.TransitGatewayAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayRouteTable", "TransitGatewayRouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayRouteTable", "TransitGatewayRouteTableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5790,15 +5068,12 @@ func (mg *TransitGatewayRoute) ResolveReferences(ctx context.Context, c client.R func (mg *TransitGatewayRouteTable) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5817,9 +5092,7 @@ func (mg *TransitGatewayRouteTable) ResolveReferences(ctx context.Context, c cli mg.Spec.ForProvider.TransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5845,19 +5118,14 @@ func (mg *TransitGatewayRouteTable) ResolveReferences(ctx context.Context, c cli func (mg *TransitGatewayRouteTableAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -5874,9 +5142,7 @@ func (mg *TransitGatewayRouteTableAssociation) ResolveReferences(ctx context.Con mg.Spec.ForProvider.TransitGatewayAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayRouteTable", "TransitGatewayRouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayRouteTable", "TransitGatewayRouteTableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5895,13 +5161,9 @@ func (mg *TransitGatewayRouteTableAssociation) ResolveReferences(ctx context.Con mg.Spec.ForProvider.TransitGatewayRouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayRouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -5918,9 +5180,7 @@ func (mg *TransitGatewayRouteTableAssociation) ResolveReferences(ctx context.Con mg.Spec.InitProvider.TransitGatewayAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.TransitGatewayAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayRouteTable", "TransitGatewayRouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayRouteTable", "TransitGatewayRouteTableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5946,19 +5206,14 @@ func (mg *TransitGatewayRouteTableAssociation) ResolveReferences(ctx context.Con func (mg *TransitGatewayRouteTablePropagation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -5975,9 +5230,7 @@ func (mg *TransitGatewayRouteTablePropagation) ResolveReferences(ctx context.Con mg.Spec.ForProvider.TransitGatewayAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayRouteTable", "TransitGatewayRouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayRouteTable", "TransitGatewayRouteTableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -5996,13 +5249,9 @@ func (mg *TransitGatewayRouteTablePropagation) ResolveReferences(ctx context.Con mg.Spec.ForProvider.TransitGatewayRouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayRouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6019,9 +5268,7 @@ func (mg *TransitGatewayRouteTablePropagation) ResolveReferences(ctx context.Con mg.Spec.InitProvider.TransitGatewayAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.TransitGatewayAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayRouteTable", "TransitGatewayRouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayRouteTable", "TransitGatewayRouteTableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6047,16 +5294,13 @@ func (mg *TransitGatewayRouteTablePropagation) ResolveReferences(ctx context.Con func (mg *TransitGatewayVPCAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6075,9 +5319,7 @@ func (mg *TransitGatewayVPCAttachment) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6096,13 +5338,9 @@ func (mg *TransitGatewayVPCAttachment) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.TransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6119,9 +5357,7 @@ func (mg *TransitGatewayVPCAttachment) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6140,9 +5376,7 @@ func (mg *TransitGatewayVPCAttachment) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6161,13 +5395,9 @@ func (mg *TransitGatewayVPCAttachment) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.TransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.TransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6191,19 +5421,14 @@ func (mg *TransitGatewayVPCAttachment) ResolveReferences(ctx context.Context, c func (mg *TransitGatewayVPCAttachmentAccepter) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6220,13 +5445,9 @@ func (mg *TransitGatewayVPCAttachmentAccepter) ResolveReferences(ctx context.Con mg.Spec.ForProvider.TransitGatewayAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList", - ) + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayVPCAttachment", "TransitGatewayVPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") - } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6250,18 +5471,14 @@ func (mg *TransitGatewayVPCAttachmentAccepter) ResolveReferences(ctx context.Con func (mg *VPC) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIpamPool", "VPCIpamPoolList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIpamPool", "VPCIpamPoolList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6278,12 +5495,9 @@ func (mg *VPC) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.IPv4IpamPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IPv4IpamPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIpamPool", "VPCIpamPoolList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIpamPool", "VPCIpamPoolList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6307,15 +5521,12 @@ func (mg *VPC) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *VPCDHCPOptionsAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCDHCPOptions", "VPCDHCPOptionsList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCDHCPOptions", "VPCDHCPOptionsList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6334,13 +5545,9 @@ func (mg *VPCDHCPOptionsAssociation) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.DHCPOptionsID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DHCPOptionsIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6357,9 +5564,7 @@ func (mg *VPCDHCPOptionsAssociation) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCDHCPOptions", "VPCDHCPOptionsList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCDHCPOptions", "VPCDHCPOptionsList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6378,13 +5583,9 @@ func (mg *VPCDHCPOptionsAssociation) ResolveReferences(ctx context.Context, c cl mg.Spec.InitProvider.DHCPOptionsID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DHCPOptionsIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6408,15 +5609,12 @@ func (mg *VPCDHCPOptionsAssociation) ResolveReferences(ctx context.Context, c cl func (mg *VPCEndpoint) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpointService", "VPCEndpointServiceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpointService", "VPCEndpointServiceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6435,13 +5633,9 @@ func (mg *VPCEndpoint) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.ServiceName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServiceNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6458,9 +5652,7 @@ func (mg *VPCEndpoint) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpointService", "VPCEndpointServiceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpointService", "VPCEndpointServiceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6479,13 +5671,9 @@ func (mg *VPCEndpoint) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.ServiceName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ServiceNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6509,19 +5697,14 @@ func (mg *VPCEndpoint) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *VPCEndpointConnectionNotification) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6538,9 +5721,7 @@ func (mg *VPCEndpointConnectionNotification) ResolveReferences(ctx context.Conte mg.Spec.ForProvider.ConnectionNotificationArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConnectionNotificationArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpointService", "VPCEndpointServiceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpointService", "VPCEndpointServiceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6559,13 +5740,9 @@ func (mg *VPCEndpointConnectionNotification) ResolveReferences(ctx context.Conte mg.Spec.ForProvider.VPCEndpointServiceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCEndpointServiceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6582,9 +5759,7 @@ func (mg *VPCEndpointConnectionNotification) ResolveReferences(ctx context.Conte mg.Spec.InitProvider.ConnectionNotificationArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ConnectionNotificationArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpointService", "VPCEndpointServiceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpointService", "VPCEndpointServiceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6610,18 +5785,14 @@ func (mg *VPCEndpointConnectionNotification) ResolveReferences(ctx context.Conte func (mg *VPCEndpointRouteTableAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "RouteTable", "RouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "RouteTable", "RouteTableList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6638,12 +5809,9 @@ func (mg *VPCEndpointRouteTableAssociation) ResolveReferences(ctx context.Contex mg.Spec.ForProvider.RouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpoint", "VPCEndpointList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpoint", "VPCEndpointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6660,12 +5828,9 @@ func (mg *VPCEndpointRouteTableAssociation) ResolveReferences(ctx context.Contex mg.Spec.ForProvider.VPCEndpointID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCEndpointIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "RouteTable", "RouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "RouteTable", "RouteTableList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6682,12 +5847,9 @@ func (mg *VPCEndpointRouteTableAssociation) ResolveReferences(ctx context.Contex mg.Spec.InitProvider.RouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpoint", "VPCEndpointList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpoint", "VPCEndpointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6711,15 +5873,12 @@ func (mg *VPCEndpointRouteTableAssociation) ResolveReferences(ctx context.Contex func (mg *VPCEndpointSecurityGroupAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6738,12 +5897,9 @@ func (mg *VPCEndpointSecurityGroupAssociation) ResolveReferences(ctx context.Con mg.Spec.ForProvider.SecurityGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SecurityGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpoint", "VPCEndpointList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpoint", "VPCEndpointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6760,9 +5916,7 @@ func (mg *VPCEndpointSecurityGroupAssociation) ResolveReferences(ctx context.Con mg.Spec.ForProvider.VPCEndpointID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCEndpointIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6781,12 +5935,9 @@ func (mg *VPCEndpointSecurityGroupAssociation) ResolveReferences(ctx context.Con mg.Spec.InitProvider.SecurityGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.SecurityGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpoint", "VPCEndpointList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpoint", "VPCEndpointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6810,15 +5961,12 @@ func (mg *VPCEndpointSecurityGroupAssociation) ResolveReferences(ctx context.Con func (mg *VPCEndpointServiceAllowedPrincipal) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpointService", "VPCEndpointServiceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpointService", "VPCEndpointServiceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6837,9 +5985,7 @@ func (mg *VPCEndpointServiceAllowedPrincipal) ResolveReferences(ctx context.Cont mg.Spec.ForProvider.VPCEndpointServiceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCEndpointServiceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpointService", "VPCEndpointServiceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpointService", "VPCEndpointServiceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6865,15 +6011,12 @@ func (mg *VPCEndpointServiceAllowedPrincipal) ResolveReferences(ctx context.Cont func (mg *VPCEndpointSubnetAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6892,12 +6035,9 @@ func (mg *VPCEndpointSubnetAssociation) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpoint", "VPCEndpointList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpoint", "VPCEndpointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6914,9 +6054,7 @@ func (mg *VPCEndpointSubnetAssociation) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.VPCEndpointID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCEndpointIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -6935,12 +6073,9 @@ func (mg *VPCEndpointSubnetAssociation) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCEndpoint", "VPCEndpointList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCEndpoint", "VPCEndpointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6964,19 +6099,14 @@ func (mg *VPCEndpointSubnetAssociation) ResolveReferences(ctx context.Context, c func (mg *VPCIPv4CidrBlockAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -6993,13 +6123,9 @@ func (mg *VPCIPv4CidrBlockAssociation) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7023,15 +6149,12 @@ func (mg *VPCIPv4CidrBlockAssociation) ResolveReferences(ctx context.Context, c func (mg *VPCIpamPool) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIpamScope", "VPCIpamScopeList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIpamScope", "VPCIpamScopeList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7050,12 +6173,9 @@ func (mg *VPCIpamPool) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.IpamScopeID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IpamScopeIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIpamPool", "VPCIpamPoolList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIpamPool", "VPCIpamPoolList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7072,9 +6192,7 @@ func (mg *VPCIpamPool) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.SourceIpamPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceIpamPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIpamScope", "VPCIpamScopeList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIpamScope", "VPCIpamScopeList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7093,12 +6211,9 @@ func (mg *VPCIpamPool) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.IpamScopeID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.IpamScopeIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIpamPool", "VPCIpamPoolList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIpamPool", "VPCIpamPoolList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7122,18 +6237,14 @@ func (mg *VPCIpamPool) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *VPCIpamPoolCidr) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIpamPool", "VPCIpamPoolList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIpamPool", "VPCIpamPoolList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7150,12 +6261,9 @@ func (mg *VPCIpamPoolCidr) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.IpamPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IpamPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIpamPool", "VPCIpamPoolList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIpamPool", "VPCIpamPoolList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7179,18 +6287,14 @@ func (mg *VPCIpamPoolCidr) ResolveReferences(ctx context.Context, c client.Reade func (mg *VPCIpamPoolCidrAllocation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIpamPool", "VPCIpamPoolList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIpamPool", "VPCIpamPoolList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7207,12 +6311,9 @@ func (mg *VPCIpamPoolCidrAllocation) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.IpamPoolID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IpamPoolIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIpamPool", "VPCIpamPoolList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIpamPool", "VPCIpamPoolList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7236,15 +6337,12 @@ func (mg *VPCIpamPoolCidrAllocation) ResolveReferences(ctx context.Context, c cl func (mg *VPCIpamScope) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIpam", "VPCIpamList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIpam", "VPCIpamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7263,9 +6361,7 @@ func (mg *VPCIpamScope) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.IpamID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IpamIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCIpam", "VPCIpamList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCIpam", "VPCIpamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7291,19 +6387,14 @@ func (mg *VPCIpamScope) ResolveReferences(ctx context.Context, c client.Reader) func (mg *VPCPeeringConnection) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7320,13 +6411,9 @@ func (mg *VPCPeeringConnection) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.PeerVPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PeerVPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7343,13 +6430,9 @@ func (mg *VPCPeeringConnection) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7366,13 +6449,9 @@ func (mg *VPCPeeringConnection) ResolveReferences(ctx context.Context, c client. mg.Spec.InitProvider.PeerVPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PeerVPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7396,17 +6475,13 @@ func (mg *VPCPeeringConnection) ResolveReferences(ctx context.Context, c client. func (mg *VPCPeeringConnectionAccepter) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCPeeringConnection", "VPCPeeringConnectionList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCPeeringConnection", "VPCPeeringConnectionList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7424,11 +6499,8 @@ func (mg *VPCPeeringConnectionAccepter) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.VPCPeeringConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCPeeringConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCPeeringConnection", "VPCPeeringConnectionList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCPeeringConnection", "VPCPeeringConnectionList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7453,17 +6525,13 @@ func (mg *VPCPeeringConnectionAccepter) ResolveReferences(ctx context.Context, c func (mg *VPCPeeringConnectionOptions) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCPeeringConnection", "VPCPeeringConnectionList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCPeeringConnection", "VPCPeeringConnectionList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7481,11 +6549,8 @@ func (mg *VPCPeeringConnectionOptions) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.VPCPeeringConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCPeeringConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPCPeeringConnection", "VPCPeeringConnectionList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPCPeeringConnection", "VPCPeeringConnectionList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7510,15 +6575,12 @@ func (mg *VPCPeeringConnectionOptions) ResolveReferences(ctx context.Context, c func (mg *VPNConnection) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "CustomerGateway", "CustomerGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "CustomerGateway", "CustomerGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7537,9 +6599,7 @@ func (mg *VPNConnection) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.CustomerGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CustomerGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7558,9 +6618,7 @@ func (mg *VPNConnection) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.TransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "CustomerGateway", "CustomerGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "CustomerGateway", "CustomerGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7579,12 +6637,9 @@ func (mg *VPNConnection) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.Type = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TypeRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7601,9 +6656,7 @@ func (mg *VPNConnection) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.VPNGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPNGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "CustomerGateway", "CustomerGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "CustomerGateway", "CustomerGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7622,9 +6675,7 @@ func (mg *VPNConnection) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.CustomerGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.CustomerGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7643,9 +6694,7 @@ func (mg *VPNConnection) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.TransitGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.TransitGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "CustomerGateway", "CustomerGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "CustomerGateway", "CustomerGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7664,12 +6713,9 @@ func (mg *VPNConnection) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.Type = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.TypeRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7693,15 +6739,12 @@ func (mg *VPNConnection) ResolveReferences(ctx context.Context, c client.Reader) func (mg *VPNConnectionRoute) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNConnection", "VPNConnectionList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNConnection", "VPNConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7720,9 +6763,7 @@ func (mg *VPNConnectionRoute) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.VPNConnectionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPNConnectionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNConnection", "VPNConnectionList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNConnection", "VPNConnectionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -7748,19 +6789,14 @@ func (mg *VPNConnectionRoute) ResolveReferences(ctx context.Context, c client.Re func (mg *VPNGateway) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7777,13 +6813,9 @@ func (mg *VPNGateway) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7807,19 +6839,14 @@ func (mg *VPNGateway) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *VPNGatewayAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7836,12 +6863,9 @@ func (mg *VPNGatewayAttachment) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7858,13 +6882,9 @@ func (mg *VPNGatewayAttachment) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.VPNGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPNGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7881,12 +6901,9 @@ func (mg *VPNGatewayAttachment) ResolveReferences(ctx context.Context, c client. mg.Spec.InitProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7910,18 +6927,14 @@ func (mg *VPNGatewayAttachment) ResolveReferences(ctx context.Context, c client. func (mg *VPNGatewayRoutePropagation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "RouteTable", "RouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "RouteTable", "RouteTableList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7938,12 +6951,9 @@ func (mg *VPNGatewayRoutePropagation) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.RouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7960,12 +6970,9 @@ func (mg *VPNGatewayRoutePropagation) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.VPNGatewayID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPNGatewayIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "RouteTable", "RouteTableList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "RouteTable", "RouteTableList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -7982,12 +6989,9 @@ func (mg *VPNGatewayRoutePropagation) ResolveReferences(ctx context.Context, c c mg.Spec.InitProvider.RouteTableID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RouteTableIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPNGateway", "VPNGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPNGateway", "VPNGatewayList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -8011,18 +7015,14 @@ func (mg *VPNGatewayRoutePropagation) ResolveReferences(ctx context.Context, c c func (mg *VolumeAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -8039,12 +7039,9 @@ func (mg *VolumeAttachment) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EBSVolume", "EBSVolumeList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EBSVolume", "EBSVolumeList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -8061,12 +7058,9 @@ func (mg *VolumeAttachment) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.VolumeID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VolumeIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -8083,12 +7077,9 @@ func (mg *VolumeAttachment) ResolveReferences(ctx context.Context, c client.Read mg.Spec.InitProvider.InstanceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.InstanceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "EBSVolume", "EBSVolumeList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "EBSVolume", "EBSVolumeList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/ecr/v1beta1/zz_generated.resolvers.go b/apis/ecr/v1beta1/zz_generated.resolvers.go index 27d8af08ef..8da87052fe 100644 --- a/apis/ecr/v1beta1/zz_generated.resolvers.go +++ b/apis/ecr/v1beta1/zz_generated.resolvers.go @@ -21,18 +21,14 @@ func (mg *LifecyclePolicy) ResolveReferences( // ResolveReferences of this Lifec ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ecr.aws.upbound.io", - - "v1beta1", "Repository", "RepositoryList") + m, l, err = apisresolver.GetManagedResource("ecr.aws.upbound.io", "v1beta1", "Repository", "RepositoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -49,12 +45,9 @@ func (mg *LifecyclePolicy) ResolveReferences( // ResolveReferences of this Lifec mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ecr.aws.upbound.io", - - "v1beta1", "Repository", "RepositoryList") + m, l, err = apisresolver.GetManagedResource("ecr.aws.upbound.io", "v1beta1", "Repository", "RepositoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -78,7 +71,6 @@ func (mg *LifecyclePolicy) ResolveReferences( // ResolveReferences of this Lifec func (mg *Repository) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -86,15 +78,10 @@ func (mg *Repository) ResolveReferences(ctx context.Context, c client.Reader) er for i3 := 0; i3 < len(mg.Spec.ForProvider.EncryptionConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EncryptionConfiguration[i3].KMSKey), Extract: common.ARNExtractor(), @@ -112,15 +99,10 @@ func (mg *Repository) ResolveReferences(ctx context.Context, c client.Reader) er } for i3 := 0; i3 < len(mg.Spec.InitProvider.EncryptionConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EncryptionConfiguration[i3].KMSKey), Extract: common.ARNExtractor(), @@ -144,18 +126,14 @@ func (mg *Repository) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *RepositoryPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ecr.aws.upbound.io", - - "v1beta1", "Repository", "RepositoryList") + m, l, err = apisresolver.GetManagedResource("ecr.aws.upbound.io", "v1beta1", "Repository", "RepositoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -172,12 +150,9 @@ func (mg *RepositoryPolicy) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ecr.aws.upbound.io", - - "v1beta1", "Repository", "RepositoryList") + m, l, err = apisresolver.GetManagedResource("ecr.aws.upbound.io", "v1beta1", "Repository", "RepositoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/ecrpublic/v1beta1/zz_generated.resolvers.go b/apis/ecrpublic/v1beta1/zz_generated.resolvers.go index 9007d51383..abd39e4198 100644 --- a/apis/ecrpublic/v1beta1/zz_generated.resolvers.go +++ b/apis/ecrpublic/v1beta1/zz_generated.resolvers.go @@ -19,15 +19,12 @@ func (mg *RepositoryPolicy) ResolveReferences( // ResolveReferences of this Repo ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ecrpublic.aws.upbound.io", - - "v1beta1", "Repository", "RepositoryList") + m, l, err = apisresolver.GetManagedResource("ecrpublic.aws.upbound.io", "v1beta1", "Repository", "RepositoryList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -46,9 +43,7 @@ func (mg *RepositoryPolicy) ResolveReferences( // ResolveReferences of this Repo mg.Spec.ForProvider.RepositoryName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RepositoryNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ecrpublic.aws.upbound.io", - - "v1beta1", "Repository", "RepositoryList") + m, l, err = apisresolver.GetManagedResource("ecrpublic.aws.upbound.io", "v1beta1", "Repository", "RepositoryList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/ecs/v1beta1/zz_generated.resolvers.go b/apis/ecs/v1beta1/zz_generated.resolvers.go index 578d02c55d..3796b2fcef 100644 --- a/apis/ecs/v1beta1/zz_generated.resolvers.go +++ b/apis/ecs/v1beta1/zz_generated.resolvers.go @@ -21,7 +21,6 @@ func (mg *CapacityProvider) ResolveReferences( // ResolveReferences of this Capa ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -29,14 +28,10 @@ func (mg *CapacityProvider) ResolveReferences( // ResolveReferences of this Capa for i3 := 0; i3 < len(mg.Spec.ForProvider.AutoScalingGroupProvider); i3++ { { - m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", - - "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.AutoScalingGroupProvider[i3].AutoScalingGroupArn), Extract: common.ARNExtractor(), @@ -54,14 +49,10 @@ func (mg *CapacityProvider) ResolveReferences( // ResolveReferences of this Capa } for i3 := 0; i3 < len(mg.Spec.InitProvider.AutoScalingGroupProvider); i3++ { { - m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", - - "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("autoscaling.aws.upbound.io", "v1beta1", "AutoscalingGroup", "AutoscalingGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.AutoScalingGroupProvider[i3].AutoScalingGroupArn), Extract: common.ARNExtractor(), @@ -85,15 +76,12 @@ func (mg *CapacityProvider) ResolveReferences( // ResolveReferences of this Capa func (mg *ClusterCapacityProviders) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -112,9 +100,7 @@ func (mg *ClusterCapacityProviders) ResolveReferences(ctx context.Context, c cli mg.Spec.ForProvider.ClusterName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -140,16 +126,13 @@ func (mg *ClusterCapacityProviders) ResolveReferences(ctx context.Context, c cli func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -168,13 +151,9 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.Cluster = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -193,13 +172,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.LoadBalancer); i3++ { { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LoadBalancer[i3].TargetGroupArn), Extract: reference.ExternalName(), @@ -217,13 +193,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.NetworkConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.NetworkConfiguration[i3].SecurityGroups), Extract: reference.ExternalName(), @@ -241,13 +214,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.NetworkConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.NetworkConfiguration[i3].Subnets), Extract: reference.ExternalName(), @@ -264,13 +234,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "TaskDefinition", "TaskDefinitionList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "TaskDefinition", "TaskDefinitionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.TaskDefinition), Extract: reference.ExternalName(), @@ -285,9 +252,7 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.TaskDefinition = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TaskDefinitionRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -306,13 +271,9 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.Cluster = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ClusterRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -331,13 +292,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.LoadBalancer); i3++ { { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LoadBalancer[i3].TargetGroupArn), Extract: reference.ExternalName(), @@ -355,13 +313,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.NetworkConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.NetworkConfiguration[i3].SecurityGroups), Extract: reference.ExternalName(), @@ -379,13 +334,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.NetworkConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.NetworkConfiguration[i3].Subnets), Extract: reference.ExternalName(), @@ -402,13 +354,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "TaskDefinition", "TaskDefinitionList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "TaskDefinition", "TaskDefinitionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.TaskDefinition), Extract: reference.ExternalName(), @@ -430,19 +379,14 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *TaskDefinition) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -459,13 +403,9 @@ func (mg *TaskDefinition) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.ExecutionRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ExecutionRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/efs/v1beta1/zz_generated.resolvers.go b/apis/efs/v1beta1/zz_generated.resolvers.go index 52877704a5..623f9be390 100644 --- a/apis/efs/v1beta1/zz_generated.resolvers.go +++ b/apis/efs/v1beta1/zz_generated.resolvers.go @@ -22,18 +22,14 @@ func (mg *AccessPoint) ResolveReferences( // ResolveReferences of this AccessPoi ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", - - "v1beta1", "FileSystem", "FileSystemList") + m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", "v1beta1", "FileSystem", "FileSystemList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,12 +46,9 @@ func (mg *AccessPoint) ResolveReferences( // ResolveReferences of this AccessPoi mg.Spec.ForProvider.FileSystemID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FileSystemIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", - - "v1beta1", "FileSystem", "FileSystemList") + m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", "v1beta1", "FileSystem", "FileSystemList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -79,18 +72,14 @@ func (mg *AccessPoint) ResolveReferences( // ResolveReferences of this AccessPoi func (mg *BackupPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", - - "v1beta1", "FileSystem", "FileSystemList") + m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", "v1beta1", "FileSystem", "FileSystemList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -107,12 +96,9 @@ func (mg *BackupPolicy) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.FileSystemID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FileSystemIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", - - "v1beta1", "FileSystem", "FileSystemList") + m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", "v1beta1", "FileSystem", "FileSystemList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -136,19 +122,14 @@ func (mg *BackupPolicy) ResolveReferences(ctx context.Context, c client.Reader) func (mg *FileSystem) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -165,13 +146,9 @@ func (mg *FileSystem) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -195,18 +172,14 @@ func (mg *FileSystem) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *FileSystemPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", - - "v1beta1", "FileSystem", "FileSystemList") + m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", "v1beta1", "FileSystem", "FileSystemList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -223,12 +196,9 @@ func (mg *FileSystemPolicy) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.FileSystemID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FileSystemIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", - - "v1beta1", "FileSystem", "FileSystemList") + m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", "v1beta1", "FileSystem", "FileSystemList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -252,19 +222,15 @@ func (mg *FileSystemPolicy) ResolveReferences(ctx context.Context, c client.Read func (mg *MountTarget) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", - - "v1beta1", "FileSystem", "FileSystemList") + m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", "v1beta1", "FileSystem", "FileSystemList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -281,9 +247,7 @@ func (mg *MountTarget) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.FileSystemID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FileSystemIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -302,9 +266,7 @@ func (mg *MountTarget) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.SecurityGroups = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -323,12 +285,9 @@ func (mg *MountTarget) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", - - "v1beta1", "FileSystem", "FileSystemList") + m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", "v1beta1", "FileSystem", "FileSystemList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -345,9 +304,7 @@ func (mg *MountTarget) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.FileSystemID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.FileSystemIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -366,9 +323,7 @@ func (mg *MountTarget) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.SecurityGroups = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -394,18 +349,14 @@ func (mg *MountTarget) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *ReplicationConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", - - "v1beta1", "FileSystem", "FileSystemList") + m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", "v1beta1", "FileSystem", "FileSystemList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -422,12 +373,9 @@ func (mg *ReplicationConfiguration) ResolveReferences(ctx context.Context, c cli mg.Spec.ForProvider.SourceFileSystemID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceFileSystemIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", - - "v1beta1", "FileSystem", "FileSystemList") + m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", "v1beta1", "FileSystem", "FileSystemList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/eks/v1beta1/zz_generated.resolvers.go b/apis/eks/v1beta1/zz_generated.resolvers.go index 2479b31b59..ced67a28c9 100644 --- a/apis/eks/v1beta1/zz_generated.resolvers.go +++ b/apis/eks/v1beta1/zz_generated.resolvers.go @@ -23,15 +23,12 @@ import ( func (mg *Addon) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -50,13 +47,9 @@ func (mg *Addon) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.ClusterName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -73,9 +66,7 @@ func (mg *Addon) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.ServiceAccountRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServiceAccountRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -94,13 +85,9 @@ func (mg *Addon) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.ClusterName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ClusterNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -124,20 +111,15 @@ func (mg *Addon) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -156,13 +138,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCConfig[i3].SecurityGroupIds), Extract: reference.ExternalName(), @@ -180,13 +159,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCConfig[i3].SubnetIds), Extract: reference.ExternalName(), @@ -203,15 +179,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RoleArn), Extract: common.ARNExtractor(), @@ -228,13 +199,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCConfig[i3].SecurityGroupIds), Extract: reference.ExternalName(), @@ -252,13 +220,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCConfig[i3].SubnetIds), Extract: reference.ExternalName(), @@ -282,15 +247,12 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *ClusterAuth) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -316,16 +278,13 @@ func (mg *ClusterAuth) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *FargateProfile) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -344,13 +303,9 @@ func (mg *FargateProfile) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.ClusterName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -367,9 +322,7 @@ func (mg *FargateProfile) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.PodExecutionRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PodExecutionRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -388,9 +341,7 @@ func (mg *FargateProfile) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -409,13 +360,9 @@ func (mg *FargateProfile) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.ClusterName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ClusterNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -432,9 +379,7 @@ func (mg *FargateProfile) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.PodExecutionRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PodExecutionRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -460,15 +405,12 @@ func (mg *FargateProfile) ResolveReferences(ctx context.Context, c client.Reader func (mg *IdentityProviderConfig) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -487,9 +429,7 @@ func (mg *IdentityProviderConfig) ResolveReferences(ctx context.Context, c clien mg.Spec.ForProvider.ClusterName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -515,16 +455,13 @@ func (mg *IdentityProviderConfig) ResolveReferences(ctx context.Context, c clien func (mg *NodeGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -543,13 +480,9 @@ func (mg *NodeGroup) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.ClusterName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -568,13 +501,10 @@ func (mg *NodeGroup) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.ForProvider.RemoteAccess); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.RemoteAccess[i3].SourceSecurityGroupIds), Extract: reference.ExternalName(), @@ -591,13 +521,10 @@ func (mg *NodeGroup) ResolveReferences(ctx context.Context, c client.Reader) err } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SubnetIds), Extract: reference.ExternalName(), @@ -612,9 +539,7 @@ func (mg *NodeGroup) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -633,13 +558,9 @@ func (mg *NodeGroup) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.Version = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VersionRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -658,13 +579,10 @@ func (mg *NodeGroup) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.InitProvider.RemoteAccess); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.RemoteAccess[i3].SourceSecurityGroupIds), Extract: reference.ExternalName(), @@ -681,13 +599,10 @@ func (mg *NodeGroup) ResolveReferences(ctx context.Context, c client.Reader) err } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.SubnetIds), Extract: reference.ExternalName(), @@ -702,9 +617,7 @@ func (mg *NodeGroup) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.InitProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("eks.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/elasticache/v1beta1/zz_generated.resolvers.go b/apis/elasticache/v1beta1/zz_generated.resolvers.go index 4b308c4330..d70e1daa28 100644 --- a/apis/elasticache/v1beta1/zz_generated.resolvers.go +++ b/apis/elasticache/v1beta1/zz_generated.resolvers.go @@ -22,16 +22,13 @@ import ( func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", - - "v1beta1", "ParameterGroup", "ParameterGroupList") + m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", "v1beta1", "ParameterGroup", "ParameterGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -50,11 +47,8 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.ParameterGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ParameterGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", - - "v1beta1", "ReplicationGroup", "ReplicationGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", "v1beta1", "ReplicationGroup", "ReplicationGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -72,9 +66,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.ReplicationGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ReplicationGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -93,9 +85,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -114,9 +104,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.SubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", - - "v1beta1", "ParameterGroup", "ParameterGroupList") + m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", "v1beta1", "ParameterGroup", "ParameterGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -135,11 +123,8 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.ParameterGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ParameterGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", - - "v1beta1", "ReplicationGroup", "ReplicationGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", "v1beta1", "ReplicationGroup", "ReplicationGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -157,9 +142,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.ReplicationGroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ReplicationGroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -178,9 +161,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -206,20 +187,15 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *ReplicationGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -236,9 +212,7 @@ func (mg *ReplicationGroup) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -257,9 +231,7 @@ func (mg *ReplicationGroup) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -278,13 +250,9 @@ func (mg *ReplicationGroup) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.SubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -301,9 +269,7 @@ func (mg *ReplicationGroup) ResolveReferences(ctx context.Context, c client.Read mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -322,9 +288,7 @@ func (mg *ReplicationGroup) ResolveReferences(ctx context.Context, c client.Read mg.Spec.InitProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -350,15 +314,12 @@ func (mg *ReplicationGroup) ResolveReferences(ctx context.Context, c client.Read func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -377,9 +338,7 @@ func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -405,18 +364,14 @@ func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *UserGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -433,12 +388,9 @@ func (mg *UserGroup) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.UserIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.UserIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("elasticache.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ diff --git a/apis/elasticbeanstalk/v1beta1/zz_generated.resolvers.go b/apis/elasticbeanstalk/v1beta1/zz_generated.resolvers.go index d2ebfece48..c4cecc0e45 100644 --- a/apis/elasticbeanstalk/v1beta1/zz_generated.resolvers.go +++ b/apis/elasticbeanstalk/v1beta1/zz_generated.resolvers.go @@ -21,7 +21,6 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -29,15 +28,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i3 := 0; i3 < len(mg.Spec.ForProvider.AppversionLifecycle); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.AppversionLifecycle[i3].ServiceRole), Extract: resource.ExtractParamPath("arn", true), @@ -55,15 +49,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati } for i3 := 0; i3 < len(mg.Spec.InitProvider.AppversionLifecycle); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.AppversionLifecycle[i3].ServiceRole), Extract: resource.ExtractParamPath("arn", true), @@ -87,19 +76,14 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati func (mg *ApplicationVersion) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -116,13 +100,9 @@ func (mg *ApplicationVersion) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Object", "ObjectList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Object", "ObjectList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -139,13 +119,9 @@ func (mg *ApplicationVersion) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.Key = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KeyRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -162,13 +138,9 @@ func (mg *ApplicationVersion) ResolveReferences(ctx context.Context, c client.Re mg.Spec.InitProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Object", "ObjectList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Object", "ObjectList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -192,15 +164,12 @@ func (mg *ApplicationVersion) ResolveReferences(ctx context.Context, c client.Re func (mg *ConfigurationTemplate) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elasticbeanstalk.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("elasticbeanstalk.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -219,9 +188,7 @@ func (mg *ConfigurationTemplate) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.Application = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ApplicationRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elasticbeanstalk.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("elasticbeanstalk.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/elasticsearch/v1beta1/zz_generated.resolvers.go b/apis/elasticsearch/v1beta1/zz_generated.resolvers.go index 72163e3419..a0a9e915b8 100644 --- a/apis/elasticsearch/v1beta1/zz_generated.resolvers.go +++ b/apis/elasticsearch/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ import ( func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -30,14 +29,10 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.LogPublishingOptions); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LogPublishingOptions[i3].CloudwatchLogGroupArn), Extract: resource.ExtractParamPath("arn", true), @@ -55,14 +50,10 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.LogPublishingOptions); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LogPublishingOptions[i3].CloudwatchLogGroupArn), Extract: resource.ExtractParamPath("arn", true), @@ -86,18 +77,14 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *DomainPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elasticsearch.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("elasticsearch.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -114,12 +101,9 @@ func (mg *DomainPolicy) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.DomainName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DomainNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elasticsearch.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("elasticsearch.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/elastictranscoder/v1beta1/zz_generated.resolvers.go b/apis/elastictranscoder/v1beta1/zz_generated.resolvers.go index ff5695a19a..7e8d4a522c 100644 --- a/apis/elastictranscoder/v1beta1/zz_generated.resolvers.go +++ b/apis/elastictranscoder/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ import ( func (mg *Pipeline) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -30,15 +29,10 @@ func (mg *Pipeline) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.ContentConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ContentConfig[i3].Bucket), Extract: resource.ExtractResourceID(), @@ -55,15 +49,10 @@ func (mg *Pipeline) ResolveReferences(ctx context.Context, c client.Reader) erro } { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.InputBucket), Extract: resource.ExtractResourceID(), @@ -78,13 +67,9 @@ func (mg *Pipeline) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.InputBucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InputBucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -103,15 +88,10 @@ func (mg *Pipeline) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.ThumbnailConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ThumbnailConfig[i3].Bucket), Extract: resource.ExtractResourceID(), @@ -129,15 +109,10 @@ func (mg *Pipeline) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.ContentConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ContentConfig[i3].Bucket), Extract: resource.ExtractResourceID(), @@ -154,15 +129,10 @@ func (mg *Pipeline) ResolveReferences(ctx context.Context, c client.Reader) erro } { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.InputBucket), Extract: resource.ExtractResourceID(), @@ -177,13 +147,9 @@ func (mg *Pipeline) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.InputBucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.InputBucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -202,15 +168,10 @@ func (mg *Pipeline) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.InitProvider.ThumbnailConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ThumbnailConfig[i3].Bucket), Extract: resource.ExtractResourceID(), diff --git a/apis/elb/v1beta1/zz_generated.resolvers.go b/apis/elb/v1beta1/zz_generated.resolvers.go index ae743fc6bc..93d714b9d3 100644 --- a/apis/elb/v1beta1/zz_generated.resolvers.go +++ b/apis/elb/v1beta1/zz_generated.resolvers.go @@ -21,19 +21,14 @@ func (mg *AppCookieStickinessPolicy) ResolveReferences( // ResolveReferences of ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -57,19 +52,14 @@ func (mg *AppCookieStickinessPolicy) ResolveReferences( // ResolveReferences of func (mg *Attachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -86,12 +76,9 @@ func (mg *Attachment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.ELB = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ELBRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -108,13 +95,9 @@ func (mg *Attachment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.Instance = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -131,12 +114,9 @@ func (mg *Attachment) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.ELB = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ELBRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -160,19 +140,14 @@ func (mg *Attachment) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *BackendServerPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -189,13 +164,9 @@ func (mg *BackendServerPolicy) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.LoadBalancerName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LoadBalancerNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -219,18 +190,14 @@ func (mg *BackendServerPolicy) ResolveReferences(ctx context.Context, c client.R func (mg *ELB) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -247,9 +214,7 @@ func (mg *ELB) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.Instances = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.InstancesRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -268,12 +233,9 @@ func (mg *ELB) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.Subnets = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -290,9 +252,7 @@ func (mg *ELB) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.Instances = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.InstancesRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -318,19 +278,14 @@ func (mg *ELB) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *LBCookieStickinessPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -347,13 +302,9 @@ func (mg *LBCookieStickinessPolicy) ResolveReferences(ctx context.Context, c cli mg.Spec.ForProvider.LoadBalancer = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LoadBalancerRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -377,19 +328,14 @@ func (mg *LBCookieStickinessPolicy) ResolveReferences(ctx context.Context, c cli func (mg *LBSSLNegotiationPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -406,13 +352,9 @@ func (mg *LBSSLNegotiationPolicy) ResolveReferences(ctx context.Context, c clien mg.Spec.ForProvider.LoadBalancer = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LoadBalancerRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -436,19 +378,14 @@ func (mg *LBSSLNegotiationPolicy) ResolveReferences(ctx context.Context, c clien func (mg *ListenerPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -465,13 +402,9 @@ func (mg *ListenerPolicy) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.LoadBalancerName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LoadBalancerNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -495,19 +428,14 @@ func (mg *ListenerPolicy) ResolveReferences(ctx context.Context, c client.Reader func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -526,13 +454,10 @@ func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.PolicyAttribute); i3++ { { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.PolicyAttribute[i3].Value), Extract: resource.ExtractParamPath("policy_name", false), @@ -549,15 +474,10 @@ func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LoadBalancerName), Extract: reference.ExternalName(), @@ -574,13 +494,10 @@ func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.PolicyAttribute); i3++ { { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.PolicyAttribute[i3].Value), Extract: resource.ExtractParamPath("policy_name", false), @@ -604,19 +521,14 @@ func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *ProxyProtocolPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -633,13 +545,9 @@ func (mg *ProxyProtocolPolicy) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.LoadBalancer = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LoadBalancerRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", - - "v1beta1", "ELB", "ELBList") + m, l, err = apisresolver.GetManagedResource("elb.aws.upbound.io", "v1beta1", "ELB", "ELBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/elbv2/v1beta1/zz_generated.resolvers.go b/apis/elbv2/v1beta1/zz_generated.resolvers.go index 8b31caf7cd..693b4464cd 100644 --- a/apis/elbv2/v1beta1/zz_generated.resolvers.go +++ b/apis/elbv2/v1beta1/zz_generated.resolvers.go @@ -12,17 +12,16 @@ import ( resource "github.com/crossplane/upjet/pkg/resource" errors "github.com/pkg/errors" - apisresolver "github.com/upbound/provider-aws/internal/apis" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" client "sigs.k8s.io/controller-runtime/pkg/client" // ResolveReferences of this LB. - xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + apisresolver "github.com/upbound/provider-aws/internal/apis" ) func (mg *LB) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -31,15 +30,10 @@ func (mg *LB) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.ForProvider.AccessLogs); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.AccessLogs[i3].Bucket), Extract: reference.ExternalName(), @@ -56,13 +50,10 @@ func (mg *LB) ResolveReferences(ctx context.Context, c client.Reader) error { } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SecurityGroups), Extract: reference.ExternalName(), @@ -79,13 +70,10 @@ func (mg *LB) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.ForProvider.SubnetMapping); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SubnetMapping[i3].SubnetID), Extract: reference.ExternalName(), @@ -102,13 +90,10 @@ func (mg *LB) ResolveReferences(ctx context.Context, c client.Reader) error { } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.Subnets), Extract: reference.ExternalName(), @@ -125,15 +110,10 @@ func (mg *LB) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.InitProvider.AccessLogs); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.AccessLogs[i3].Bucket), Extract: reference.ExternalName(), @@ -150,13 +130,10 @@ func (mg *LB) ResolveReferences(ctx context.Context, c client.Reader) error { } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.SecurityGroups), Extract: reference.ExternalName(), @@ -173,13 +150,10 @@ func (mg *LB) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.InitProvider.SubnetMapping); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SubnetMapping[i3].SubnetID), Extract: reference.ExternalName(), @@ -196,13 +170,10 @@ func (mg *LB) ResolveReferences(ctx context.Context, c client.Reader) error { } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.Subnets), Extract: reference.ExternalName(), @@ -224,7 +195,6 @@ func (mg *LB) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *LBListener) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -234,13 +204,10 @@ func (mg *LBListener) ResolveReferences(ctx context.Context, c client.Reader) er for i4 := 0; i4 < len(mg.Spec.ForProvider.DefaultAction[i3].Forward); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.DefaultAction[i3].Forward[i4].TargetGroup); i5++ { { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DefaultAction[i3].Forward[i4].TargetGroup[i5].Arn), Extract: reference.ExternalName(), @@ -260,13 +227,10 @@ func (mg *LBListener) ResolveReferences(ctx context.Context, c client.Reader) er } for i3 := 0; i3 < len(mg.Spec.ForProvider.DefaultAction); i3++ { { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DefaultAction[i3].TargetGroupArn), Extract: reference.ExternalName(), @@ -283,15 +247,10 @@ func (mg *LBListener) ResolveReferences(ctx context.Context, c client.Reader) er } { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LB", "LBList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LB", "LBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LoadBalancerArn), Extract: reference.ExternalName(), @@ -310,13 +269,10 @@ func (mg *LBListener) ResolveReferences(ctx context.Context, c client.Reader) er for i4 := 0; i4 < len(mg.Spec.InitProvider.DefaultAction[i3].Forward); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.DefaultAction[i3].Forward[i4].TargetGroup); i5++ { { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DefaultAction[i3].Forward[i4].TargetGroup[i5].Arn), Extract: reference.ExternalName(), @@ -336,13 +292,10 @@ func (mg *LBListener) ResolveReferences(ctx context.Context, c client.Reader) er } for i3 := 0; i3 < len(mg.Spec.InitProvider.DefaultAction); i3++ { { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DefaultAction[i3].TargetGroupArn), Extract: reference.ExternalName(), @@ -359,15 +312,10 @@ func (mg *LBListener) ResolveReferences(ctx context.Context, c client.Reader) er } { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LB", "LBList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LB", "LBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LoadBalancerArn), Extract: reference.ExternalName(), @@ -389,18 +337,14 @@ func (mg *LBListener) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *LBListenerCertificate) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -417,12 +361,9 @@ func (mg *LBListenerCertificate) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.CertificateArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CertificateArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBListener", "LBListenerList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBListener", "LBListenerList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -439,12 +380,9 @@ func (mg *LBListenerCertificate) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.ListenerArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ListenerArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -461,12 +399,9 @@ func (mg *LBListenerCertificate) ResolveReferences(ctx context.Context, c client mg.Spec.InitProvider.CertificateArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.CertificateArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBListener", "LBListenerList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBListener", "LBListenerList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -490,7 +425,6 @@ func (mg *LBListenerCertificate) ResolveReferences(ctx context.Context, c client func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -499,13 +433,10 @@ func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.ForProvider.Action); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Action[i3].AuthenticateCognito); i4++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Action[i3].AuthenticateCognito[i4].UserPoolArn), Extract: resource.ExtractParamPath("arn", true), @@ -525,13 +456,10 @@ func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.ForProvider.Action); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Action[i3].AuthenticateCognito); i4++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolClient", "UserPoolClientList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolClient", "UserPoolClientList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Action[i3].AuthenticateCognito[i4].UserPoolClientID), Extract: resource.ExtractResourceID(), @@ -551,13 +479,10 @@ func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.ForProvider.Action); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Action[i3].AuthenticateCognito); i4++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolDomain", "UserPoolDomainList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolDomain", "UserPoolDomainList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Action[i3].AuthenticateCognito[i4].UserPoolDomain), Extract: resource.ExtractParamPath("domain", false), @@ -578,13 +503,10 @@ func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader for i4 := 0; i4 < len(mg.Spec.ForProvider.Action[i3].Forward); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.Action[i3].Forward[i4].TargetGroup); i5++ { { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Action[i3].Forward[i4].TargetGroup[i5].Arn), Extract: resource.ExtractParamPath("arn", true), @@ -604,13 +526,10 @@ func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.ForProvider.Action); i3++ { { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Action[i3].TargetGroupArn), Extract: resource.ExtractParamPath("arn", true), @@ -627,14 +546,10 @@ func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader } { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBListener", "LBListenerList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBListener", "LBListenerList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ListenerArn), Extract: resource.ExtractParamPath("arn", true), @@ -652,13 +567,10 @@ func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.InitProvider.Action); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Action[i3].AuthenticateCognito); i4++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPool", "UserPoolList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPool", "UserPoolList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Action[i3].AuthenticateCognito[i4].UserPoolArn), Extract: resource.ExtractParamPath("arn", true), @@ -678,13 +590,10 @@ func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.InitProvider.Action); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Action[i3].AuthenticateCognito); i4++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolClient", "UserPoolClientList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolClient", "UserPoolClientList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Action[i3].AuthenticateCognito[i4].UserPoolClientID), Extract: resource.ExtractResourceID(), @@ -704,13 +613,10 @@ func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.InitProvider.Action); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Action[i3].AuthenticateCognito); i4++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolDomain", "UserPoolDomainList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolDomain", "UserPoolDomainList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Action[i3].AuthenticateCognito[i4].UserPoolDomain), Extract: resource.ExtractParamPath("domain", false), @@ -731,13 +637,10 @@ func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader for i4 := 0; i4 < len(mg.Spec.InitProvider.Action[i3].Forward); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.Action[i3].Forward[i4].TargetGroup); i5++ { { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Action[i3].Forward[i4].TargetGroup[i5].Arn), Extract: resource.ExtractParamPath("arn", true), @@ -757,13 +660,10 @@ func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.InitProvider.Action); i3++ { { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Action[i3].TargetGroupArn), Extract: resource.ExtractParamPath("arn", true), @@ -780,14 +680,10 @@ func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader } { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBListener", "LBListenerList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBListener", "LBListenerList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ListenerArn), Extract: resource.ExtractParamPath("arn", true), @@ -809,19 +705,14 @@ func (mg *LBListenerRule) ResolveReferences(ctx context.Context, c client.Reader func (mg *LBTargetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -838,13 +729,9 @@ func (mg *LBTargetGroup) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -868,15 +755,12 @@ func (mg *LBTargetGroup) ResolveReferences(ctx context.Context, c client.Reader) func (mg *LBTargetGroupAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -895,9 +779,7 @@ func (mg *LBTargetGroupAttachment) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.TargetGroupArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TargetGroupArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", - - "v1beta1", "LBTargetGroup", "LBTargetGroupList") + m, l, err = apisresolver.GetManagedResource("elbv2.aws.upbound.io", "v1beta1", "LBTargetGroup", "LBTargetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/evidently/v1beta1/zz_generated.resolvers.go b/apis/evidently/v1beta1/zz_generated.resolvers.go index c565b4c725..5a6d95e10f 100644 --- a/apis/evidently/v1beta1/zz_generated.resolvers.go +++ b/apis/evidently/v1beta1/zz_generated.resolvers.go @@ -21,18 +21,14 @@ import ( func (mg *Feature) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("evidently.aws.upbound.io", - - "v1beta1", "Project", "ProjectList") + m, l, err = apisresolver.GetManagedResource("evidently.aws.upbound.io", "v1beta1", "Project", "ProjectList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/firehose/v1beta1/zz_generated.resolvers.go b/apis/firehose/v1beta1/zz_generated.resolvers.go index 520ccd7aed..b548017493 100644 --- a/apis/firehose/v1beta1/zz_generated.resolvers.go +++ b/apis/firehose/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -30,14 +29,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.ElasticsearchConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("elasticsearch.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("elasticsearch.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ElasticsearchConfiguration[i3].DomainArn), Extract: resource.ExtractParamPath("arn", true), @@ -55,15 +50,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.ForProvider.ElasticsearchConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ElasticsearchConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -82,15 +72,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.ElasticsearchConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.ElasticsearchConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ElasticsearchConfiguration[i3].S3Configuration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -110,15 +95,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.ElasticsearchConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.ElasticsearchConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ElasticsearchConfiguration[i3].S3Configuration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -138,15 +118,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.ElasticsearchConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.ElasticsearchConfiguration[i3].VPCConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ElasticsearchConfiguration[i3].VPCConfig[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -165,15 +140,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.ForProvider.ExtendedS3Configuration); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ExtendedS3Configuration[i3].BucketArn), Extract: common.ARNExtractor(), @@ -193,15 +163,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i4 := 0; i4 < len(mg.Spec.ForProvider.ExtendedS3Configuration[i3].DataFormatConversionConfiguration); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.ExtendedS3Configuration[i3].DataFormatConversionConfiguration[i4].SchemaConfiguration); i5++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ExtendedS3Configuration[i3].DataFormatConversionConfiguration[i4].SchemaConfiguration[i5].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -223,13 +188,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i4 := 0; i4 < len(mg.Spec.ForProvider.ExtendedS3Configuration[i3].DataFormatConversionConfiguration); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.ExtendedS3Configuration[i3].DataFormatConversionConfiguration[i4].SchemaConfiguration); i5++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "CatalogTable", "CatalogTableList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "CatalogTable", "CatalogTableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ExtendedS3Configuration[i3].DataFormatConversionConfiguration[i4].SchemaConfiguration[i5].TableName), Extract: reference.ExternalName(), @@ -249,15 +211,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.ForProvider.ExtendedS3Configuration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ExtendedS3Configuration[i3].RoleArn), Extract: common.ARNExtractor(), @@ -275,15 +232,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.ForProvider.HTTPEndpointConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.HTTPEndpointConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -302,15 +254,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.HTTPEndpointConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.HTTPEndpointConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.HTTPEndpointConfiguration[i3].S3Configuration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -330,15 +277,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.HTTPEndpointConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.HTTPEndpointConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.HTTPEndpointConfiguration[i3].S3Configuration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -357,14 +299,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.ForProvider.OpensearchConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("opensearch.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("opensearch.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.OpensearchConfiguration[i3].DomainArn), Extract: resource.ExtractParamPath("arn", true), @@ -382,15 +320,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.ForProvider.OpensearchConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.OpensearchConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -409,15 +342,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.OpensearchConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.OpensearchConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.OpensearchConfiguration[i3].S3Configuration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -437,15 +365,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.OpensearchConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.OpensearchConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.OpensearchConfiguration[i3].S3Configuration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -465,15 +388,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.OpensearchConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.OpensearchConfiguration[i3].VPCConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.OpensearchConfiguration[i3].VPCConfig[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -492,15 +410,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.ForProvider.OpensearchserverlessConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.OpensearchserverlessConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -519,15 +432,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.OpensearchserverlessConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.OpensearchserverlessConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.OpensearchserverlessConfiguration[i3].S3Configuration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -547,15 +455,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.OpensearchserverlessConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.OpensearchserverlessConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.OpensearchserverlessConfiguration[i3].S3Configuration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -574,15 +477,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.ForProvider.RedshiftConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RedshiftConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -601,15 +499,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.RedshiftConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.RedshiftConfiguration[i3].S3BackupConfiguration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RedshiftConfiguration[i3].S3BackupConfiguration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -629,15 +522,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.RedshiftConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.RedshiftConfiguration[i3].S3BackupConfiguration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RedshiftConfiguration[i3].S3BackupConfiguration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -657,15 +545,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.RedshiftConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.RedshiftConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RedshiftConfiguration[i3].S3Configuration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -685,15 +568,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.RedshiftConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.RedshiftConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RedshiftConfiguration[i3].S3Configuration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -713,15 +591,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.SplunkConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.SplunkConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SplunkConfiguration[i3].S3Configuration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -741,15 +614,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.ForProvider.SplunkConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.SplunkConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SplunkConfiguration[i3].S3Configuration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -768,14 +636,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.InitProvider.ElasticsearchConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("elasticsearch.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("elasticsearch.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ElasticsearchConfiguration[i3].DomainArn), Extract: resource.ExtractParamPath("arn", true), @@ -793,15 +657,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.InitProvider.ElasticsearchConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ElasticsearchConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -820,15 +679,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.ElasticsearchConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.ElasticsearchConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ElasticsearchConfiguration[i3].S3Configuration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -848,15 +702,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.ElasticsearchConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.ElasticsearchConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ElasticsearchConfiguration[i3].S3Configuration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -876,15 +725,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.ElasticsearchConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.ElasticsearchConfiguration[i3].VPCConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ElasticsearchConfiguration[i3].VPCConfig[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -903,15 +747,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.InitProvider.ExtendedS3Configuration); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ExtendedS3Configuration[i3].BucketArn), Extract: common.ARNExtractor(), @@ -931,15 +770,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i4 := 0; i4 < len(mg.Spec.InitProvider.ExtendedS3Configuration[i3].DataFormatConversionConfiguration); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.ExtendedS3Configuration[i3].DataFormatConversionConfiguration[i4].SchemaConfiguration); i5++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ExtendedS3Configuration[i3].DataFormatConversionConfiguration[i4].SchemaConfiguration[i5].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -961,13 +795,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i4 := 0; i4 < len(mg.Spec.InitProvider.ExtendedS3Configuration[i3].DataFormatConversionConfiguration); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.ExtendedS3Configuration[i3].DataFormatConversionConfiguration[i4].SchemaConfiguration); i5++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "CatalogTable", "CatalogTableList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "CatalogTable", "CatalogTableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ExtendedS3Configuration[i3].DataFormatConversionConfiguration[i4].SchemaConfiguration[i5].TableName), Extract: reference.ExternalName(), @@ -987,15 +818,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.InitProvider.ExtendedS3Configuration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ExtendedS3Configuration[i3].RoleArn), Extract: common.ARNExtractor(), @@ -1013,15 +839,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.InitProvider.HTTPEndpointConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.HTTPEndpointConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -1040,15 +861,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.HTTPEndpointConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.HTTPEndpointConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.HTTPEndpointConfiguration[i3].S3Configuration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -1068,15 +884,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.HTTPEndpointConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.HTTPEndpointConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.HTTPEndpointConfiguration[i3].S3Configuration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -1095,14 +906,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.InitProvider.OpensearchConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("opensearch.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("opensearch.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.OpensearchConfiguration[i3].DomainArn), Extract: resource.ExtractParamPath("arn", true), @@ -1120,15 +927,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.InitProvider.OpensearchConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.OpensearchConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -1147,15 +949,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.OpensearchConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.OpensearchConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.OpensearchConfiguration[i3].S3Configuration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -1175,15 +972,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.OpensearchConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.OpensearchConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.OpensearchConfiguration[i3].S3Configuration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -1203,15 +995,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.OpensearchConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.OpensearchConfiguration[i3].VPCConfig); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.OpensearchConfiguration[i3].VPCConfig[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -1230,15 +1017,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.InitProvider.OpensearchserverlessConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.OpensearchserverlessConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -1257,15 +1039,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.OpensearchserverlessConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.OpensearchserverlessConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.OpensearchserverlessConfiguration[i3].S3Configuration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -1285,15 +1062,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.OpensearchserverlessConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.OpensearchserverlessConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.OpensearchserverlessConfiguration[i3].S3Configuration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -1312,15 +1084,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive } for i3 := 0; i3 < len(mg.Spec.InitProvider.RedshiftConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RedshiftConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -1339,15 +1106,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.RedshiftConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.RedshiftConfiguration[i3].S3BackupConfiguration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RedshiftConfiguration[i3].S3BackupConfiguration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -1367,15 +1129,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.RedshiftConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.RedshiftConfiguration[i3].S3BackupConfiguration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RedshiftConfiguration[i3].S3BackupConfiguration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -1395,15 +1152,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.RedshiftConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.RedshiftConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RedshiftConfiguration[i3].S3Configuration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -1423,15 +1175,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.RedshiftConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.RedshiftConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RedshiftConfiguration[i3].S3Configuration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -1451,15 +1198,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.SplunkConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.SplunkConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SplunkConfiguration[i3].S3Configuration[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -1479,15 +1221,10 @@ func (mg *DeliveryStream) ResolveReferences( // ResolveReferences of this Delive for i3 := 0; i3 < len(mg.Spec.InitProvider.SplunkConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.SplunkConfiguration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SplunkConfiguration[i3].S3Configuration[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/fis/v1beta1/zz_generated.resolvers.go b/apis/fis/v1beta1/zz_generated.resolvers.go index e09948a0de..ae9e1c51eb 100644 --- a/apis/fis/v1beta1/zz_generated.resolvers.go +++ b/apis/fis/v1beta1/zz_generated.resolvers.go @@ -21,19 +21,14 @@ func (mg *ExperimentTemplate) ResolveReferences( // ResolveReferences of this Ex ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,13 +45,9 @@ func (mg *ExperimentTemplate) ResolveReferences( // ResolveReferences of this Ex mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/fsx/v1beta1/zz_generated.resolvers.go b/apis/fsx/v1beta1/zz_generated.resolvers.go index 7e41e3b44d..5255ed3a82 100644 --- a/apis/fsx/v1beta1/zz_generated.resolvers.go +++ b/apis/fsx/v1beta1/zz_generated.resolvers.go @@ -23,15 +23,12 @@ import ( func (mg *Backup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("fsx.aws.upbound.io", - - "v1beta1", "LustreFileSystem", "LustreFileSystemList") + m, l, err = apisresolver.GetManagedResource("fsx.aws.upbound.io", "v1beta1", "LustreFileSystem", "LustreFileSystemList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -50,9 +47,7 @@ func (mg *Backup) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.FileSystemID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FileSystemIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("fsx.aws.upbound.io", - - "v1beta1", "LustreFileSystem", "LustreFileSystemList") + m, l, err = apisresolver.GetManagedResource("fsx.aws.upbound.io", "v1beta1", "LustreFileSystem", "LustreFileSystemList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -78,15 +73,12 @@ func (mg *Backup) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *DataRepositoryAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("fsx.aws.upbound.io", - - "v1beta1", "LustreFileSystem", "LustreFileSystemList") + m, l, err = apisresolver.GetManagedResource("fsx.aws.upbound.io", "v1beta1", "LustreFileSystem", "LustreFileSystemList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -105,9 +97,7 @@ func (mg *DataRepositoryAssociation) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.FileSystemID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FileSystemIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("fsx.aws.upbound.io", - - "v1beta1", "LustreFileSystem", "LustreFileSystemList") + m, l, err = apisresolver.GetManagedResource("fsx.aws.upbound.io", "v1beta1", "LustreFileSystem", "LustreFileSystemList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -133,20 +123,15 @@ func (mg *DataRepositoryAssociation) ResolveReferences(ctx context.Context, c cl func (mg *LustreFileSystem) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -163,9 +148,7 @@ func (mg *LustreFileSystem) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -184,9 +167,7 @@ func (mg *LustreFileSystem) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -205,13 +186,9 @@ func (mg *LustreFileSystem) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -228,9 +205,7 @@ func (mg *LustreFileSystem) ResolveReferences(ctx context.Context, c client.Read mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -249,9 +224,7 @@ func (mg *LustreFileSystem) ResolveReferences(ctx context.Context, c client.Read mg.Spec.InitProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -277,20 +250,15 @@ func (mg *LustreFileSystem) ResolveReferences(ctx context.Context, c client.Read func (mg *OntapFileSystem) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -307,9 +275,7 @@ func (mg *OntapFileSystem) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -328,9 +294,7 @@ func (mg *OntapFileSystem) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.PreferredSubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PreferredSubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -349,9 +313,7 @@ func (mg *OntapFileSystem) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -370,13 +332,9 @@ func (mg *OntapFileSystem) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -393,9 +351,7 @@ func (mg *OntapFileSystem) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -414,9 +370,7 @@ func (mg *OntapFileSystem) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.PreferredSubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PreferredSubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -435,9 +389,7 @@ func (mg *OntapFileSystem) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -463,15 +415,12 @@ func (mg *OntapFileSystem) ResolveReferences(ctx context.Context, c client.Reade func (mg *OntapStorageVirtualMachine) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("fsx.aws.upbound.io", - - "v1beta1", "OntapFileSystem", "OntapFileSystemList") + m, l, err = apisresolver.GetManagedResource("fsx.aws.upbound.io", "v1beta1", "OntapFileSystem", "OntapFileSystemList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -490,9 +439,7 @@ func (mg *OntapStorageVirtualMachine) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.FileSystemID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FileSystemIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("fsx.aws.upbound.io", - - "v1beta1", "OntapFileSystem", "OntapFileSystemList") + m, l, err = apisresolver.GetManagedResource("fsx.aws.upbound.io", "v1beta1", "OntapFileSystem", "OntapFileSystemList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -518,19 +465,15 @@ func (mg *OntapStorageVirtualMachine) ResolveReferences(ctx context.Context, c c func (mg *WindowsFileSystem) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", - - "v1beta1", "Directory", "DirectoryList") + m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", "v1beta1", "Directory", "DirectoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -547,13 +490,9 @@ func (mg *WindowsFileSystem) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.ActiveDirectoryID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ActiveDirectoryIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -570,9 +509,7 @@ func (mg *WindowsFileSystem) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -591,9 +528,7 @@ func (mg *WindowsFileSystem) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -612,12 +547,9 @@ func (mg *WindowsFileSystem) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", - - "v1beta1", "Directory", "DirectoryList") + m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", "v1beta1", "Directory", "DirectoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -634,13 +566,9 @@ func (mg *WindowsFileSystem) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.InitProvider.ActiveDirectoryID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ActiveDirectoryIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -657,9 +585,7 @@ func (mg *WindowsFileSystem) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -678,9 +604,7 @@ func (mg *WindowsFileSystem) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.InitProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/gamelift/v1beta1/zz_generated.resolvers.go b/apis/gamelift/v1beta1/zz_generated.resolvers.go index 377e817388..d808095206 100644 --- a/apis/gamelift/v1beta1/zz_generated.resolvers.go +++ b/apis/gamelift/v1beta1/zz_generated.resolvers.go @@ -23,7 +23,6 @@ import ( func (mg *Build) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -31,15 +30,10 @@ func (mg *Build) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.ForProvider.StorageLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.StorageLocation[i3].Bucket), Extract: reference.ExternalName(), @@ -57,15 +51,10 @@ func (mg *Build) ResolveReferences(ctx context.Context, c client.Reader) error { } for i3 := 0; i3 < len(mg.Spec.ForProvider.StorageLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Object", "ObjectList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Object", "ObjectList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.StorageLocation[i3].Key), Extract: resource.ExtractParamPath("key", false), @@ -83,15 +72,10 @@ func (mg *Build) ResolveReferences(ctx context.Context, c client.Reader) error { } for i3 := 0; i3 < len(mg.Spec.ForProvider.StorageLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.StorageLocation[i3].RoleArn), Extract: common.ARNExtractor(), @@ -109,15 +93,10 @@ func (mg *Build) ResolveReferences(ctx context.Context, c client.Reader) error { } for i3 := 0; i3 < len(mg.Spec.InitProvider.StorageLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.StorageLocation[i3].Bucket), Extract: reference.ExternalName(), @@ -135,15 +114,10 @@ func (mg *Build) ResolveReferences(ctx context.Context, c client.Reader) error { } for i3 := 0; i3 < len(mg.Spec.InitProvider.StorageLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Object", "ObjectList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Object", "ObjectList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.StorageLocation[i3].Key), Extract: resource.ExtractParamPath("key", false), @@ -161,15 +135,10 @@ func (mg *Build) ResolveReferences(ctx context.Context, c client.Reader) error { } for i3 := 0; i3 < len(mg.Spec.InitProvider.StorageLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.StorageLocation[i3].RoleArn), Extract: common.ARNExtractor(), @@ -193,15 +162,12 @@ func (mg *Build) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *Fleet) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("gamelift.aws.upbound.io", - - "v1beta1", "Build", "BuildList") + m, l, err = apisresolver.GetManagedResource("gamelift.aws.upbound.io", "v1beta1", "Build", "BuildList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -220,13 +186,9 @@ func (mg *Fleet) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.BuildID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BuildIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -243,9 +205,7 @@ func (mg *Fleet) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.InstanceRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("gamelift.aws.upbound.io", - - "v1beta1", "Build", "BuildList") + m, l, err = apisresolver.GetManagedResource("gamelift.aws.upbound.io", "v1beta1", "Build", "BuildList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -264,13 +224,9 @@ func (mg *Fleet) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.BuildID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.BuildIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -294,19 +250,14 @@ func (mg *Fleet) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *GameSessionQueue) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -323,13 +274,9 @@ func (mg *GameSessionQueue) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.NotificationTarget = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NotificationTargetRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -353,7 +300,6 @@ func (mg *GameSessionQueue) ResolveReferences(ctx context.Context, c client.Read func (mg *Script) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -361,15 +307,10 @@ func (mg *Script) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.StorageLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.StorageLocation[i3].Bucket), Extract: reference.ExternalName(), @@ -387,15 +328,10 @@ func (mg *Script) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.StorageLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Object", "ObjectList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Object", "ObjectList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.StorageLocation[i3].Key), Extract: resource.ExtractParamPath("key", false), @@ -413,15 +349,10 @@ func (mg *Script) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.StorageLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.StorageLocation[i3].RoleArn), Extract: common.ARNExtractor(), @@ -439,15 +370,10 @@ func (mg *Script) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.StorageLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.StorageLocation[i3].Bucket), Extract: reference.ExternalName(), @@ -465,15 +391,10 @@ func (mg *Script) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.StorageLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Object", "ObjectList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Object", "ObjectList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.StorageLocation[i3].Key), Extract: resource.ExtractParamPath("key", false), @@ -491,15 +412,10 @@ func (mg *Script) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.StorageLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.StorageLocation[i3].RoleArn), Extract: common.ARNExtractor(), diff --git a/apis/generate.go b/apis/generate.go index d01eedb4cc..2e79fc3c76 100644 --- a/apis/generate.go +++ b/apis/generate.go @@ -33,6 +33,10 @@ Copyright 2021 Upbound Inc. // Generate crossplane-runtime methodsets (resource.Claim, etc) //go:generate go run -tags generate github.com/crossplane/crossplane-tools/cmd/angryjet generate-methodsets --header-file=../hack/boilerplate.go.txt ./... +// Run upjet's transformer for the generated resolvers to get rid of the cross +// API-group imports and to prevent import cycles +//go:generate go run github.com/crossplane/upjet/cmd/resolver -g aws.upbound.io -s + package apis import ( @@ -41,4 +45,6 @@ import ( _ "github.com/crossplane/crossplane-tools/cmd/angryjet" //nolint:typecheck _ "github.com/crossplane/upjet/cmd/scraper" + + _ "github.com/crossplane/upjet/cmd/resolver" ) diff --git a/apis/glacier/v1beta1/zz_generated.resolvers.go b/apis/glacier/v1beta1/zz_generated.resolvers.go index d8eed1484b..b138b7c6fc 100644 --- a/apis/glacier/v1beta1/zz_generated.resolvers.go +++ b/apis/glacier/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ import ( func (mg *Vault) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -30,15 +29,10 @@ func (mg *Vault) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.ForProvider.Notification); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Notification[i3].SnsTopic), Extract: resource.ExtractParamPath("arn", true), @@ -56,15 +50,10 @@ func (mg *Vault) ResolveReferences(ctx context.Context, c client.Reader) error { } for i3 := 0; i3 < len(mg.Spec.InitProvider.Notification); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Notification[i3].SnsTopic), Extract: resource.ExtractParamPath("arn", true), @@ -88,15 +77,12 @@ func (mg *Vault) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *VaultLock) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("glacier.aws.upbound.io", - - "v1beta1", "Vault", "VaultList") + m, l, err = apisresolver.GetManagedResource("glacier.aws.upbound.io", "v1beta1", "Vault", "VaultList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -115,9 +101,7 @@ func (mg *VaultLock) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.VaultName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VaultNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("glacier.aws.upbound.io", - - "v1beta1", "Vault", "VaultList") + m, l, err = apisresolver.GetManagedResource("glacier.aws.upbound.io", "v1beta1", "Vault", "VaultList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/globalaccelerator/v1beta1/zz_generated.resolvers.go b/apis/globalaccelerator/v1beta1/zz_generated.resolvers.go index b5002dfe44..998bd205c4 100644 --- a/apis/globalaccelerator/v1beta1/zz_generated.resolvers.go +++ b/apis/globalaccelerator/v1beta1/zz_generated.resolvers.go @@ -19,15 +19,12 @@ func (mg *EndpointGroup) ResolveReferences( // ResolveReferences of this Endpoin ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("globalaccelerator.aws.upbound.io", - - "v1beta1", "Listener", "ListenerList") + m, l, err = apisresolver.GetManagedResource("globalaccelerator.aws.upbound.io", "v1beta1", "Listener", "ListenerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -46,9 +43,7 @@ func (mg *EndpointGroup) ResolveReferences( // ResolveReferences of this Endpoin mg.Spec.ForProvider.ListenerArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ListenerArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("globalaccelerator.aws.upbound.io", - - "v1beta1", "Listener", "ListenerList") + m, l, err = apisresolver.GetManagedResource("globalaccelerator.aws.upbound.io", "v1beta1", "Listener", "ListenerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -74,15 +69,12 @@ func (mg *EndpointGroup) ResolveReferences( // ResolveReferences of this Endpoin func (mg *Listener) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("globalaccelerator.aws.upbound.io", - - "v1beta1", "Accelerator", "AcceleratorList") + m, l, err = apisresolver.GetManagedResource("globalaccelerator.aws.upbound.io", "v1beta1", "Accelerator", "AcceleratorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -101,9 +93,7 @@ func (mg *Listener) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.AcceleratorArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AcceleratorArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("globalaccelerator.aws.upbound.io", - - "v1beta1", "Accelerator", "AcceleratorList") + m, l, err = apisresolver.GetManagedResource("globalaccelerator.aws.upbound.io", "v1beta1", "Accelerator", "AcceleratorList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/glue/v1beta1/zz_generated.resolvers.go b/apis/glue/v1beta1/zz_generated.resolvers.go index c27d25bfa8..f7a146bfa9 100644 --- a/apis/glue/v1beta1/zz_generated.resolvers.go +++ b/apis/glue/v1beta1/zz_generated.resolvers.go @@ -22,15 +22,12 @@ func (mg *CatalogTable) ResolveReferences( // ResolveReferences of this CatalogT ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "CatalogDatabase", "CatalogDatabaseList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "CatalogDatabase", "CatalogDatabaseList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -56,7 +53,6 @@ func (mg *CatalogTable) ResolveReferences( // ResolveReferences of this CatalogT func (mg *Connection) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -64,13 +60,10 @@ func (mg *Connection) ResolveReferences(ctx context.Context, c client.Reader) er for i3 := 0; i3 < len(mg.Spec.ForProvider.PhysicalConnectionRequirements); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.PhysicalConnectionRequirements[i3].AvailabilityZone), Extract: resource.ExtractParamPath("availability_zone", false), @@ -88,13 +81,10 @@ func (mg *Connection) ResolveReferences(ctx context.Context, c client.Reader) er } for i3 := 0; i3 < len(mg.Spec.ForProvider.PhysicalConnectionRequirements); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.PhysicalConnectionRequirements[i3].SubnetID), Extract: resource.ExtractResourceID(), @@ -112,13 +102,10 @@ func (mg *Connection) ResolveReferences(ctx context.Context, c client.Reader) er } for i3 := 0; i3 < len(mg.Spec.InitProvider.PhysicalConnectionRequirements); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.PhysicalConnectionRequirements[i3].AvailabilityZone), Extract: resource.ExtractParamPath("availability_zone", false), @@ -136,13 +123,10 @@ func (mg *Connection) ResolveReferences(ctx context.Context, c client.Reader) er } for i3 := 0; i3 < len(mg.Spec.InitProvider.PhysicalConnectionRequirements); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.PhysicalConnectionRequirements[i3].SubnetID), Extract: resource.ExtractResourceID(), @@ -166,7 +150,6 @@ func (mg *Connection) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *Crawler) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -174,13 +157,10 @@ func (mg *Crawler) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.CatalogTarget); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "CatalogDatabase", "CatalogDatabaseList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "CatalogDatabase", "CatalogDatabaseList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.CatalogTarget[i3].DatabaseName), Extract: reference.ExternalName(), @@ -197,13 +177,10 @@ func (mg *Crawler) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "CatalogDatabase", "CatalogDatabaseList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "CatalogDatabase", "CatalogDatabaseList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DatabaseName), Extract: reference.ExternalName(), @@ -220,14 +197,10 @@ func (mg *Crawler) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.JdbcTarget); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.JdbcTarget[i3].ConnectionName), Extract: reference.ExternalName(), @@ -245,14 +218,10 @@ func (mg *Crawler) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.MongodbTarget); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.MongodbTarget[i3].ConnectionName), Extract: reference.ExternalName(), @@ -269,15 +238,10 @@ func (mg *Crawler) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Role), Extract: common.ARNExtractor(), @@ -294,13 +258,10 @@ func (mg *Crawler) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.CatalogTarget); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "CatalogDatabase", "CatalogDatabaseList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "CatalogDatabase", "CatalogDatabaseList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.CatalogTarget[i3].DatabaseName), Extract: reference.ExternalName(), @@ -317,13 +278,10 @@ func (mg *Crawler) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "CatalogDatabase", "CatalogDatabaseList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "CatalogDatabase", "CatalogDatabaseList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DatabaseName), Extract: reference.ExternalName(), @@ -340,14 +298,10 @@ func (mg *Crawler) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.JdbcTarget); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.JdbcTarget[i3].ConnectionName), Extract: reference.ExternalName(), @@ -365,14 +319,10 @@ func (mg *Crawler) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.MongodbTarget); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Connection", "ConnectionList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Connection", "ConnectionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.MongodbTarget[i3].ConnectionName), Extract: reference.ExternalName(), @@ -389,15 +339,10 @@ func (mg *Crawler) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Role), Extract: common.ARNExtractor(), @@ -419,7 +364,6 @@ func (mg *Crawler) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *DataCatalogEncryptionSettings) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -428,15 +372,10 @@ func (mg *DataCatalogEncryptionSettings) ResolveReferences(ctx context.Context, for i3 := 0; i3 < len(mg.Spec.ForProvider.DataCatalogEncryptionSettings); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.DataCatalogEncryptionSettings[i3].ConnectionPasswordEncryption); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DataCatalogEncryptionSettings[i3].ConnectionPasswordEncryption[i4].AwsKMSKeyID), Extract: common.ARNExtractor(), @@ -456,15 +395,10 @@ func (mg *DataCatalogEncryptionSettings) ResolveReferences(ctx context.Context, for i3 := 0; i3 < len(mg.Spec.ForProvider.DataCatalogEncryptionSettings); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.DataCatalogEncryptionSettings[i3].EncryptionAtRest); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DataCatalogEncryptionSettings[i3].EncryptionAtRest[i4].SseAwsKMSKeyID), Extract: common.ARNExtractor(), @@ -484,15 +418,10 @@ func (mg *DataCatalogEncryptionSettings) ResolveReferences(ctx context.Context, for i3 := 0; i3 < len(mg.Spec.InitProvider.DataCatalogEncryptionSettings); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.DataCatalogEncryptionSettings[i3].ConnectionPasswordEncryption); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DataCatalogEncryptionSettings[i3].ConnectionPasswordEncryption[i4].AwsKMSKeyID), Extract: common.ARNExtractor(), @@ -512,15 +441,10 @@ func (mg *DataCatalogEncryptionSettings) ResolveReferences(ctx context.Context, for i3 := 0; i3 < len(mg.Spec.InitProvider.DataCatalogEncryptionSettings); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.DataCatalogEncryptionSettings[i3].EncryptionAtRest); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DataCatalogEncryptionSettings[i3].EncryptionAtRest[i4].SseAwsKMSKeyID), Extract: common.ARNExtractor(), @@ -545,19 +469,14 @@ func (mg *DataCatalogEncryptionSettings) ResolveReferences(ctx context.Context, func (mg *Job) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -574,13 +493,9 @@ func (mg *Job) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -604,18 +519,14 @@ func (mg *Job) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *Schema) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Registry", "RegistryList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Registry", "RegistryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -632,12 +543,9 @@ func (mg *Schema) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.RegistryArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RegistryArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Registry", "RegistryList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Registry", "RegistryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -661,7 +569,6 @@ func (mg *Schema) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *SecurityConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -670,15 +577,10 @@ func (mg *SecurityConfiguration) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.ForProvider.EncryptionConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.EncryptionConfiguration[i3].CloudwatchEncryption); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EncryptionConfiguration[i3].CloudwatchEncryption[i4].KMSKeyArn), Extract: common.ARNExtractor(), @@ -698,15 +600,10 @@ func (mg *SecurityConfiguration) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.ForProvider.EncryptionConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.EncryptionConfiguration[i3].JobBookmarksEncryption); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EncryptionConfiguration[i3].JobBookmarksEncryption[i4].KMSKeyArn), Extract: common.ARNExtractor(), @@ -726,15 +623,10 @@ func (mg *SecurityConfiguration) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.ForProvider.EncryptionConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.EncryptionConfiguration[i3].S3Encryption); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EncryptionConfiguration[i3].S3Encryption[i4].KMSKeyArn), Extract: common.ARNExtractor(), @@ -754,15 +646,10 @@ func (mg *SecurityConfiguration) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.InitProvider.EncryptionConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.EncryptionConfiguration[i3].CloudwatchEncryption); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EncryptionConfiguration[i3].CloudwatchEncryption[i4].KMSKeyArn), Extract: common.ARNExtractor(), @@ -782,15 +669,10 @@ func (mg *SecurityConfiguration) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.InitProvider.EncryptionConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.EncryptionConfiguration[i3].JobBookmarksEncryption); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EncryptionConfiguration[i3].JobBookmarksEncryption[i4].KMSKeyArn), Extract: common.ARNExtractor(), @@ -810,15 +692,10 @@ func (mg *SecurityConfiguration) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.InitProvider.EncryptionConfiguration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.EncryptionConfiguration[i3].S3Encryption); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EncryptionConfiguration[i3].S3Encryption[i4].KMSKeyArn), Extract: common.ARNExtractor(), @@ -843,7 +720,6 @@ func (mg *SecurityConfiguration) ResolveReferences(ctx context.Context, c client func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -851,13 +727,10 @@ func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.Actions); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Crawler", "CrawlerList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Crawler", "CrawlerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Actions[i3].CrawlerName), Extract: reference.ExternalName(), @@ -875,15 +748,10 @@ func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.Actions); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Job", "JobList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Job", "JobList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Actions[i3].JobName), Extract: reference.ExternalName(), @@ -902,13 +770,10 @@ func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.Predicate); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Predicate[i3].Conditions); i4++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Crawler", "CrawlerList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Crawler", "CrawlerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Predicate[i3].Conditions[i4].CrawlerName), Extract: reference.ExternalName(), @@ -928,15 +793,10 @@ func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.Predicate); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Predicate[i3].Conditions); i4++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Job", "JobList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Job", "JobList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Predicate[i3].Conditions[i4].JobName), Extract: reference.ExternalName(), @@ -955,13 +815,10 @@ func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.Actions); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Crawler", "CrawlerList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Crawler", "CrawlerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Actions[i3].CrawlerName), Extract: reference.ExternalName(), @@ -979,15 +836,10 @@ func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.Actions); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Job", "JobList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Job", "JobList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Actions[i3].JobName), Extract: reference.ExternalName(), @@ -1006,13 +858,10 @@ func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.Predicate); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Predicate[i3].Conditions); i4++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Crawler", "CrawlerList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Crawler", "CrawlerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Predicate[i3].Conditions[i4].CrawlerName), Extract: reference.ExternalName(), @@ -1032,15 +881,10 @@ func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.Predicate); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Predicate[i3].Conditions); i4++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "Job", "JobList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "Job", "JobList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Predicate[i3].Conditions[i4].JobName), Extract: reference.ExternalName(), @@ -1065,15 +909,12 @@ func (mg *Trigger) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *UserDefinedFunction) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "CatalogDatabase", "CatalogDatabaseList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "CatalogDatabase", "CatalogDatabaseList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/grafana/v1beta1/zz_generated.resolvers.go b/apis/grafana/v1beta1/zz_generated.resolvers.go index ee621001b4..e67b9f7344 100644 --- a/apis/grafana/v1beta1/zz_generated.resolvers.go +++ b/apis/grafana/v1beta1/zz_generated.resolvers.go @@ -22,18 +22,14 @@ func (mg *LicenseAssociation) ResolveReferences( // ResolveReferences of this Li ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", - - "v1beta1", "Workspace", "WorkspaceList") + m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", "v1beta1", "Workspace", "WorkspaceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,12 +46,9 @@ func (mg *LicenseAssociation) ResolveReferences( // ResolveReferences of this Li mg.Spec.ForProvider.WorkspaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.WorkspaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", - - "v1beta1", "Workspace", "WorkspaceList") + m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", "v1beta1", "Workspace", "WorkspaceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -79,18 +72,14 @@ func (mg *LicenseAssociation) ResolveReferences( // ResolveReferences of this Li func (mg *RoleAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", - - "v1beta1", "Workspace", "WorkspaceList") + m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", "v1beta1", "Workspace", "WorkspaceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -107,12 +96,9 @@ func (mg *RoleAssociation) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.WorkspaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.WorkspaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", - - "v1beta1", "Workspace", "WorkspaceList") + m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", "v1beta1", "Workspace", "WorkspaceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -136,19 +122,14 @@ func (mg *RoleAssociation) ResolveReferences(ctx context.Context, c client.Reade func (mg *Workspace) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -165,13 +146,9 @@ func (mg *Workspace) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -195,18 +172,14 @@ func (mg *Workspace) ResolveReferences(ctx context.Context, c client.Reader) err func (mg *WorkspaceAPIKey) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", - - "v1beta1", "Workspace", "WorkspaceList") + m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", "v1beta1", "Workspace", "WorkspaceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -223,12 +196,9 @@ func (mg *WorkspaceAPIKey) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.WorkspaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.WorkspaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", - - "v1beta1", "Workspace", "WorkspaceList") + m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", "v1beta1", "Workspace", "WorkspaceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -252,18 +222,14 @@ func (mg *WorkspaceAPIKey) ResolveReferences(ctx context.Context, c client.Reade func (mg *WorkspaceSAMLConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", - - "v1beta1", "Workspace", "WorkspaceList") + m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", "v1beta1", "Workspace", "WorkspaceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -280,12 +246,9 @@ func (mg *WorkspaceSAMLConfiguration) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.WorkspaceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.WorkspaceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", - - "v1beta1", "Workspace", "WorkspaceList") + m, l, err = apisresolver.GetManagedResource("grafana.aws.upbound.io", "v1beta1", "Workspace", "WorkspaceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/guardduty/v1beta1/zz_generated.resolvers.go b/apis/guardduty/v1beta1/zz_generated.resolvers.go index 70efe67edd..6454e30d1a 100644 --- a/apis/guardduty/v1beta1/zz_generated.resolvers.go +++ b/apis/guardduty/v1beta1/zz_generated.resolvers.go @@ -21,18 +21,14 @@ import ( func (mg *Filter) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("guardduty.aws.upbound.io", - - "v1beta1", "Detector", "DetectorList") + m, l, err = apisresolver.GetManagedResource("guardduty.aws.upbound.io", "v1beta1", "Detector", "DetectorList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -56,18 +52,14 @@ func (mg *Filter) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *Member) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("guardduty.aws.upbound.io", - - "v1beta1", "Detector", "DetectorList") + m, l, err = apisresolver.GetManagedResource("guardduty.aws.upbound.io", "v1beta1", "Detector", "DetectorList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -84,12 +76,9 @@ func (mg *Member) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.AccountID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AccountIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("guardduty.aws.upbound.io", - - "v1beta1", "Detector", "DetectorList") + m, l, err = apisresolver.GetManagedResource("guardduty.aws.upbound.io", "v1beta1", "Detector", "DetectorList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -106,12 +95,9 @@ func (mg *Member) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.DetectorID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DetectorIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("guardduty.aws.upbound.io", - - "v1beta1", "Detector", "DetectorList") + m, l, err = apisresolver.GetManagedResource("guardduty.aws.upbound.io", "v1beta1", "Detector", "DetectorList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -128,12 +114,9 @@ func (mg *Member) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.AccountID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.AccountIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("guardduty.aws.upbound.io", - - "v1beta1", "Detector", "DetectorList") + m, l, err = apisresolver.GetManagedResource("guardduty.aws.upbound.io", "v1beta1", "Detector", "DetectorList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/iam/v1beta1/zz_generated.resolvers.go b/apis/iam/v1beta1/zz_generated.resolvers.go index 2b2c53860a..d8c80e1095 100644 --- a/apis/iam/v1beta1/zz_generated.resolvers.go +++ b/apis/iam/v1beta1/zz_generated.resolvers.go @@ -21,19 +21,14 @@ func (mg *AccessKey) ResolveReferences( // ResolveReferences of this AccessKey. ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,13 +45,9 @@ func (mg *AccessKey) ResolveReferences( // ResolveReferences of this AccessKey. mg.Spec.ForProvider.User = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -80,20 +71,15 @@ func (mg *AccessKey) ResolveReferences( // ResolveReferences of this AccessKey. func (mg *GroupMembership) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -110,13 +96,9 @@ func (mg *GroupMembership) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.Group = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GroupRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -133,13 +115,9 @@ func (mg *GroupMembership) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.Users = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.UserRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -156,13 +134,9 @@ func (mg *GroupMembership) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.Group = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.GroupRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -186,19 +160,14 @@ func (mg *GroupMembership) ResolveReferences(ctx context.Context, c client.Reade func (mg *GroupPolicyAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -215,9 +184,7 @@ func (mg *GroupPolicyAttachment) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.Group = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GroupRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -236,13 +203,9 @@ func (mg *GroupPolicyAttachment) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.PolicyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PolicyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -259,9 +222,7 @@ func (mg *GroupPolicyAttachment) ResolveReferences(ctx context.Context, c client mg.Spec.InitProvider.Group = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.GroupRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -287,19 +248,14 @@ func (mg *GroupPolicyAttachment) ResolveReferences(ctx context.Context, c client func (mg *InstanceProfile) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -316,13 +272,9 @@ func (mg *InstanceProfile) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.Role = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -346,19 +298,14 @@ func (mg *InstanceProfile) ResolveReferences(ctx context.Context, c client.Reade func (mg *RolePolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -382,15 +329,12 @@ func (mg *RolePolicy) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *RolePolicyAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -409,13 +353,9 @@ func (mg *RolePolicyAttachment) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.PolicyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PolicyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -432,9 +372,7 @@ func (mg *RolePolicyAttachment) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.Role = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -453,13 +391,9 @@ func (mg *RolePolicyAttachment) ResolveReferences(ctx context.Context, c client. mg.Spec.InitProvider.PolicyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PolicyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -483,19 +417,14 @@ func (mg *RolePolicyAttachment) ResolveReferences(ctx context.Context, c client. func (mg *ServiceSpecificCredential) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -512,13 +441,9 @@ func (mg *ServiceSpecificCredential) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.UserName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -542,20 +467,15 @@ func (mg *ServiceSpecificCredential) ResolveReferences(ctx context.Context, c cl func (mg *UserGroupMembership) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -572,13 +492,9 @@ func (mg *UserGroupMembership) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.Groups = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.GroupRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -595,13 +511,9 @@ func (mg *UserGroupMembership) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.User = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -618,13 +530,9 @@ func (mg *UserGroupMembership) ResolveReferences(ctx context.Context, c client.R mg.Spec.InitProvider.Groups = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.GroupRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -648,19 +556,14 @@ func (mg *UserGroupMembership) ResolveReferences(ctx context.Context, c client.R func (mg *UserLoginProfile) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -677,13 +580,9 @@ func (mg *UserLoginProfile) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.User = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -707,15 +606,12 @@ func (mg *UserLoginProfile) ResolveReferences(ctx context.Context, c client.Read func (mg *UserPolicyAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -734,13 +630,9 @@ func (mg *UserPolicyAttachment) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.PolicyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PolicyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -757,9 +649,7 @@ func (mg *UserPolicyAttachment) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.User = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -778,13 +668,9 @@ func (mg *UserPolicyAttachment) ResolveReferences(ctx context.Context, c client. mg.Spec.InitProvider.PolicyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PolicyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -808,19 +694,14 @@ func (mg *UserPolicyAttachment) ResolveReferences(ctx context.Context, c client. func (mg *UserSSHKey) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -837,13 +718,9 @@ func (mg *UserSSHKey) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.Username = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UsernameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/identitystore/v1beta1/zz_generated.resolvers.go b/apis/identitystore/v1beta1/zz_generated.resolvers.go index c3c41d980b..100b585af2 100644 --- a/apis/identitystore/v1beta1/zz_generated.resolvers.go +++ b/apis/identitystore/v1beta1/zz_generated.resolvers.go @@ -20,18 +20,14 @@ func (mg *GroupMembership) ResolveReferences( // ResolveReferences of this Group ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("identitystore.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("identitystore.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -48,12 +44,9 @@ func (mg *GroupMembership) ResolveReferences( // ResolveReferences of this Group mg.Spec.ForProvider.GroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("identitystore.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("identitystore.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -70,12 +63,9 @@ func (mg *GroupMembership) ResolveReferences( // ResolveReferences of this Group mg.Spec.ForProvider.MemberID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.MemberIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("identitystore.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("identitystore.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -92,12 +82,9 @@ func (mg *GroupMembership) ResolveReferences( // ResolveReferences of this Group mg.Spec.InitProvider.GroupID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.GroupIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("identitystore.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("identitystore.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/imagebuilder/v1beta1/zz_generated.resolvers.go b/apis/imagebuilder/v1beta1/zz_generated.resolvers.go index b5a9c65b45..50894db4e5 100644 --- a/apis/imagebuilder/v1beta1/zz_generated.resolvers.go +++ b/apis/imagebuilder/v1beta1/zz_generated.resolvers.go @@ -21,19 +21,14 @@ func (mg *Component) ResolveReferences( // ResolveReferences of this Component. ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,13 +45,9 @@ func (mg *Component) ResolveReferences( // ResolveReferences of this Component. mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -80,7 +71,6 @@ func (mg *Component) ResolveReferences( // ResolveReferences of this Component. func (mg *ContainerRecipe) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -88,13 +78,10 @@ func (mg *ContainerRecipe) ResolveReferences(ctx context.Context, c client.Reade for i3 := 0; i3 < len(mg.Spec.ForProvider.Component); i3++ { { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "Component", "ComponentList") + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "Component", "ComponentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Component[i3].ComponentArn), Extract: resource.ExtractParamPath("arn", true), @@ -111,15 +98,10 @@ func (mg *ContainerRecipe) ResolveReferences(ctx context.Context, c client.Reade } { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KMSKeyID), Extract: reference.ExternalName(), @@ -136,14 +118,10 @@ func (mg *ContainerRecipe) ResolveReferences(ctx context.Context, c client.Reade for i3 := 0; i3 < len(mg.Spec.ForProvider.TargetRepository); i3++ { { - m, l, err = apisresolver.GetManagedResource("ecr.aws.upbound.io", - - "v1beta1", "Repository", "RepositoryList") + m, l, err = apisresolver.GetManagedResource("ecr.aws.upbound.io", "v1beta1", "Repository", "RepositoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.TargetRepository[i3].RepositoryName), Extract: reference.ExternalName(), @@ -161,13 +139,10 @@ func (mg *ContainerRecipe) ResolveReferences(ctx context.Context, c client.Reade } for i3 := 0; i3 < len(mg.Spec.InitProvider.Component); i3++ { { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "Component", "ComponentList") + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "Component", "ComponentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Component[i3].ComponentArn), Extract: resource.ExtractParamPath("arn", true), @@ -184,15 +159,10 @@ func (mg *ContainerRecipe) ResolveReferences(ctx context.Context, c client.Reade } { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.KMSKeyID), Extract: reference.ExternalName(), @@ -209,14 +179,10 @@ func (mg *ContainerRecipe) ResolveReferences(ctx context.Context, c client.Reade for i3 := 0; i3 < len(mg.Spec.InitProvider.TargetRepository); i3++ { { - m, l, err = apisresolver.GetManagedResource("ecr.aws.upbound.io", - - "v1beta1", "Repository", "RepositoryList") + m, l, err = apisresolver.GetManagedResource("ecr.aws.upbound.io", "v1beta1", "Repository", "RepositoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.TargetRepository[i3].RepositoryName), Extract: reference.ExternalName(), @@ -240,16 +206,12 @@ func (mg *ContainerRecipe) ResolveReferences(ctx context.Context, c client.Reade func (mg *Image) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "DistributionConfiguration", "DistributionConfigurationList", - ) + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "DistributionConfiguration", "DistributionConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -268,9 +230,7 @@ func (mg *Image) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.DistributionConfigurationArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DistributionConfigurationArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "ImageRecipe", "ImageRecipeList") + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "ImageRecipe", "ImageRecipeList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -289,10 +249,7 @@ func (mg *Image) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.ImageRecipeArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ImageRecipeArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "InfrastructureConfiguration", "InfrastructureConfigurationList", - ) + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "InfrastructureConfiguration", "InfrastructureConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -311,10 +268,7 @@ func (mg *Image) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.InfrastructureConfigurationArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InfrastructureConfigurationArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "DistributionConfiguration", "DistributionConfigurationList", - ) + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "DistributionConfiguration", "DistributionConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -333,9 +287,7 @@ func (mg *Image) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.DistributionConfigurationArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DistributionConfigurationArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "ImageRecipe", "ImageRecipeList") + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "ImageRecipe", "ImageRecipeList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -354,10 +306,7 @@ func (mg *Image) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.ImageRecipeArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ImageRecipeArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "InfrastructureConfiguration", "InfrastructureConfigurationList", - ) + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "InfrastructureConfiguration", "InfrastructureConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -383,15 +332,12 @@ func (mg *Image) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *ImagePipeline) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "ImageRecipe", "ImageRecipeList") + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "ImageRecipe", "ImageRecipeList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -410,10 +356,7 @@ func (mg *ImagePipeline) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.ImageRecipeArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ImageRecipeArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "InfrastructureConfiguration", "InfrastructureConfigurationList", - ) + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "InfrastructureConfiguration", "InfrastructureConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -432,9 +375,7 @@ func (mg *ImagePipeline) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.InfrastructureConfigurationArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InfrastructureConfigurationArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "ImageRecipe", "ImageRecipeList") + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "ImageRecipe", "ImageRecipeList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -453,10 +394,7 @@ func (mg *ImagePipeline) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.ImageRecipeArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ImageRecipeArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "InfrastructureConfiguration", "InfrastructureConfigurationList", - ) + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "InfrastructureConfiguration", "InfrastructureConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -482,7 +420,6 @@ func (mg *ImagePipeline) ResolveReferences(ctx context.Context, c client.Reader) func (mg *ImageRecipe) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -490,13 +427,10 @@ func (mg *ImageRecipe) ResolveReferences(ctx context.Context, c client.Reader) e for i3 := 0; i3 < len(mg.Spec.ForProvider.Component); i3++ { { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "Component", "ComponentList") + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "Component", "ComponentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Component[i3].ComponentArn), Extract: resource.ExtractParamPath("arn", true), @@ -514,13 +448,10 @@ func (mg *ImageRecipe) ResolveReferences(ctx context.Context, c client.Reader) e } for i3 := 0; i3 < len(mg.Spec.InitProvider.Component); i3++ { { - m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", - - "v1beta1", "Component", "ComponentList") + m, l, err = apisresolver.GetManagedResource("imagebuilder.aws.upbound.io", "v1beta1", "Component", "ComponentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Component[i3].ComponentArn), Extract: resource.ExtractParamPath("arn", true), @@ -544,16 +475,13 @@ func (mg *ImageRecipe) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *InfrastructureConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "InstanceProfile", "InstanceProfileList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "InstanceProfile", "InstanceProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -572,9 +500,7 @@ func (mg *InfrastructureConfiguration) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.InstanceProfileName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceProfileNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "KeyPair", "KeyPairList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "KeyPair", "KeyPairList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -596,15 +522,10 @@ func (mg *InfrastructureConfiguration) ResolveReferences(ctx context.Context, c for i3 := 0; i3 < len(mg.Spec.ForProvider.Logging); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Logging[i3].S3Logs); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Logging[i3].S3Logs[i4].S3BucketName), Extract: reference.ExternalName(), @@ -622,13 +543,10 @@ func (mg *InfrastructureConfiguration) ResolveReferences(ctx context.Context, c } } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SecurityGroupIds), Extract: reference.ExternalName(), @@ -643,13 +561,9 @@ func (mg *InfrastructureConfiguration) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -666,9 +580,7 @@ func (mg *InfrastructureConfiguration) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.SnsTopicArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SnsTopicArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -687,9 +599,7 @@ func (mg *InfrastructureConfiguration) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "InstanceProfile", "InstanceProfileList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "InstanceProfile", "InstanceProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -708,9 +618,7 @@ func (mg *InfrastructureConfiguration) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.InstanceProfileName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.InstanceProfileNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "KeyPair", "KeyPairList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "KeyPair", "KeyPairList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -732,15 +640,10 @@ func (mg *InfrastructureConfiguration) ResolveReferences(ctx context.Context, c for i3 := 0; i3 < len(mg.Spec.InitProvider.Logging); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Logging[i3].S3Logs); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Logging[i3].S3Logs[i4].S3BucketName), Extract: reference.ExternalName(), @@ -758,13 +661,10 @@ func (mg *InfrastructureConfiguration) ResolveReferences(ctx context.Context, c } } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.SecurityGroupIds), Extract: reference.ExternalName(), @@ -779,13 +679,9 @@ func (mg *InfrastructureConfiguration) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -802,9 +698,7 @@ func (mg *InfrastructureConfiguration) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.SnsTopicArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.SnsTopicArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/inspector/v1beta1/zz_generated.resolvers.go b/apis/inspector/v1beta1/zz_generated.resolvers.go index 7669214d3f..ae030ae59a 100644 --- a/apis/inspector/v1beta1/zz_generated.resolvers.go +++ b/apis/inspector/v1beta1/zz_generated.resolvers.go @@ -21,15 +21,12 @@ func (mg *AssessmentTarget) ResolveReferences( // ResolveReferences of this Asse ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("inspector.aws.upbound.io", - - "v1beta1", "ResourceGroup", "ResourceGroupList") + m, l, err = apisresolver.GetManagedResource("inspector.aws.upbound.io", "v1beta1", "ResourceGroup", "ResourceGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -48,9 +45,7 @@ func (mg *AssessmentTarget) ResolveReferences( // ResolveReferences of this Asse mg.Spec.ForProvider.ResourceGroupArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceGroupArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("inspector.aws.upbound.io", - - "v1beta1", "ResourceGroup", "ResourceGroupList") + m, l, err = apisresolver.GetManagedResource("inspector.aws.upbound.io", "v1beta1", "ResourceGroup", "ResourceGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -76,7 +71,6 @@ func (mg *AssessmentTarget) ResolveReferences( // ResolveReferences of this Asse func (mg *AssessmentTemplate) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -84,15 +78,10 @@ func (mg *AssessmentTemplate) ResolveReferences(ctx context.Context, c client.Re for i3 := 0; i3 < len(mg.Spec.ForProvider.EventSubscription); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EventSubscription[i3].TopicArn), Extract: resource.ExtractParamPath("arn", true), @@ -109,14 +98,10 @@ func (mg *AssessmentTemplate) ResolveReferences(ctx context.Context, c client.Re } { - m, l, err = apisresolver.GetManagedResource("inspector.aws.upbound.io", - - "v1beta1", "AssessmentTarget", "AssessmentTargetList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("inspector.aws.upbound.io", "v1beta1", "AssessmentTarget", "AssessmentTargetList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.TargetArn), Extract: resource.ExtractParamPath("arn", true), @@ -133,15 +118,10 @@ func (mg *AssessmentTemplate) ResolveReferences(ctx context.Context, c client.Re for i3 := 0; i3 < len(mg.Spec.InitProvider.EventSubscription); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EventSubscription[i3].TopicArn), Extract: resource.ExtractParamPath("arn", true), @@ -158,14 +138,10 @@ func (mg *AssessmentTemplate) ResolveReferences(ctx context.Context, c client.Re } { - m, l, err = apisresolver.GetManagedResource("inspector.aws.upbound.io", - - "v1beta1", "AssessmentTarget", "AssessmentTargetList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("inspector.aws.upbound.io", "v1beta1", "AssessmentTarget", "AssessmentTargetList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.TargetArn), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/iot/v1beta1/zz_generated.resolvers.go b/apis/iot/v1beta1/zz_generated.resolvers.go index 7294c7cda2..be8674e92b 100644 --- a/apis/iot/v1beta1/zz_generated.resolvers.go +++ b/apis/iot/v1beta1/zz_generated.resolvers.go @@ -22,19 +22,14 @@ func (mg *LoggingOptions) ResolveReferences( // ResolveReferences of this Loggin ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -51,13 +46,9 @@ func (mg *LoggingOptions) ResolveReferences( // ResolveReferences of this Loggin mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -81,15 +72,12 @@ func (mg *LoggingOptions) ResolveReferences( // ResolveReferences of this Loggin func (mg *PolicyAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -108,12 +96,9 @@ func (mg *PolicyAttachment) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.Policy = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PolicyRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -130,9 +115,7 @@ func (mg *PolicyAttachment) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.Target = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TargetRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -151,12 +134,9 @@ func (mg *PolicyAttachment) ResolveReferences(ctx context.Context, c client.Read mg.Spec.InitProvider.Policy = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PolicyRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -180,19 +160,14 @@ func (mg *PolicyAttachment) ResolveReferences(ctx context.Context, c client.Read func (mg *ProvisioningTemplate) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -209,13 +184,9 @@ func (mg *ProvisioningTemplate) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.ProvisioningRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ProvisioningRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -239,19 +210,14 @@ func (mg *ProvisioningTemplate) ResolveReferences(ctx context.Context, c client. func (mg *RoleAlias) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -268,13 +234,9 @@ func (mg *RoleAlias) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -298,18 +260,14 @@ func (mg *RoleAlias) ResolveReferences(ctx context.Context, c client.Reader) err func (mg *ThingGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", - - "v1beta1", "ThingGroup", "ThingGroupList") + m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", "v1beta1", "ThingGroup", "ThingGroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -326,12 +284,9 @@ func (mg *ThingGroup) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.ParentGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ParentGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", - - "v1beta1", "ThingGroup", "ThingGroupList") + m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", "v1beta1", "ThingGroup", "ThingGroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -355,18 +310,14 @@ func (mg *ThingGroup) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *ThingPrincipalAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -383,13 +334,9 @@ func (mg *ThingPrincipalAttachment) ResolveReferences(ctx context.Context, c cli mg.Spec.ForProvider.Principal = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PrincipalRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", - - "v1beta1", "Thing", "ThingList") + m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", "v1beta1", "Thing", "ThingList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -406,12 +353,9 @@ func (mg *ThingPrincipalAttachment) ResolveReferences(ctx context.Context, c cli mg.Spec.ForProvider.Thing = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ThingRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -428,13 +372,9 @@ func (mg *ThingPrincipalAttachment) ResolveReferences(ctx context.Context, c cli mg.Spec.InitProvider.Principal = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PrincipalRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", - - "v1beta1", "Thing", "ThingList") + m, l, err = apisresolver.GetManagedResource("iot.aws.upbound.io", "v1beta1", "Thing", "ThingList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -458,7 +398,6 @@ func (mg *ThingPrincipalAttachment) ResolveReferences(ctx context.Context, c cli func (mg *TopicRule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -467,15 +406,10 @@ func (mg *TopicRule) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.ForProvider.ErrorAction); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.ErrorAction[i3].Sns); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ErrorAction[i3].Sns[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -495,15 +429,10 @@ func (mg *TopicRule) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.ForProvider.ErrorAction); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.ErrorAction[i3].Sns); i4++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ErrorAction[i3].Sns[i4].TargetArn), Extract: resource.ExtractParamPath("arn", true), @@ -522,15 +451,10 @@ func (mg *TopicRule) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.ForProvider.Sns); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Sns[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -548,15 +472,10 @@ func (mg *TopicRule) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.ForProvider.Sns); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Sns[i3].TargetArn), Extract: resource.ExtractParamPath("arn", true), @@ -575,15 +494,10 @@ func (mg *TopicRule) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.InitProvider.ErrorAction); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.ErrorAction[i3].Sns); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ErrorAction[i3].Sns[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -603,15 +517,10 @@ func (mg *TopicRule) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.InitProvider.ErrorAction); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.ErrorAction[i3].Sns); i4++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ErrorAction[i3].Sns[i4].TargetArn), Extract: resource.ExtractParamPath("arn", true), @@ -630,15 +539,10 @@ func (mg *TopicRule) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.InitProvider.Sns); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Sns[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -656,15 +560,10 @@ func (mg *TopicRule) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.InitProvider.Sns); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Sns[i3].TargetArn), Extract: resource.ExtractParamPath("arn", true), @@ -688,7 +587,6 @@ func (mg *TopicRule) ResolveReferences(ctx context.Context, c client.Reader) err func (mg *TopicRuleDestination) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -697,15 +595,10 @@ func (mg *TopicRuleDestination) ResolveReferences(ctx context.Context, c client. for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VPCConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -723,13 +616,10 @@ func (mg *TopicRuleDestination) ResolveReferences(ctx context.Context, c client. } for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCConfiguration[i3].SecurityGroups), Extract: reference.ExternalName(), @@ -747,13 +637,10 @@ func (mg *TopicRuleDestination) ResolveReferences(ctx context.Context, c client. } for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCConfiguration[i3].SubnetIds), Extract: reference.ExternalName(), @@ -771,15 +658,10 @@ func (mg *TopicRuleDestination) ResolveReferences(ctx context.Context, c client. } for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VPCConfiguration[i3].VPCID), Extract: resource.ExtractResourceID(), @@ -797,15 +679,10 @@ func (mg *TopicRuleDestination) ResolveReferences(ctx context.Context, c client. } for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.VPCConfiguration[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -823,13 +700,10 @@ func (mg *TopicRuleDestination) ResolveReferences(ctx context.Context, c client. } for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCConfiguration[i3].SecurityGroups), Extract: reference.ExternalName(), @@ -847,13 +721,10 @@ func (mg *TopicRuleDestination) ResolveReferences(ctx context.Context, c client. } for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCConfiguration[i3].SubnetIds), Extract: reference.ExternalName(), @@ -871,15 +742,10 @@ func (mg *TopicRuleDestination) ResolveReferences(ctx context.Context, c client. } for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.VPCConfiguration[i3].VPCID), Extract: resource.ExtractResourceID(), diff --git a/apis/kafka/v1beta1/zz_generated.resolvers.go b/apis/kafka/v1beta1/zz_generated.resolvers.go index 303489190d..eb9a39f52e 100644 --- a/apis/kafka/v1beta1/zz_generated.resolvers.go +++ b/apis/kafka/v1beta1/zz_generated.resolvers.go @@ -23,7 +23,6 @@ import ( func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -32,13 +31,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.BrokerNodeGroupInfo); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.BrokerNodeGroupInfo[i3].ClientSubnets), Extract: reference.ExternalName(), @@ -56,13 +52,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.BrokerNodeGroupInfo); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.BrokerNodeGroupInfo[i3].SecurityGroups), Extract: reference.ExternalName(), @@ -80,13 +73,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.ConfigurationInfo); i3++ { { - m, l, err = apisresolver.GetManagedResource("kafka.aws.upbound.io", - - "v1beta1", "Configuration", "ConfigurationList") + m, l, err = apisresolver.GetManagedResource("kafka.aws.upbound.io", "v1beta1", "Configuration", "ConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ConfigurationInfo[i3].Arn), Extract: common.ARNExtractor(), @@ -104,15 +94,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.EncryptionInfo); i3++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EncryptionInfo[i3].EncryptionAtRestKMSKeyArn), Extract: common.ARNExtractor(), @@ -132,14 +117,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error for i4 := 0; i4 < len(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].CloudwatchLogs); i5++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].CloudwatchLogs[i5].LogGroup), Extract: reference.ExternalName(), @@ -161,13 +142,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error for i4 := 0; i4 < len(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].Firehose); i5++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].Firehose[i5].DeliveryStream), Extract: resource.ExtractParamPath("name", false), @@ -189,15 +167,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error for i4 := 0; i4 < len(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].S3); i5++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LoggingInfo[i3].BrokerLogs[i4].S3[i5].Bucket), Extract: reference.ExternalName(), @@ -217,13 +190,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.BrokerNodeGroupInfo); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.BrokerNodeGroupInfo[i3].ClientSubnets), Extract: reference.ExternalName(), @@ -241,13 +211,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.BrokerNodeGroupInfo); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.BrokerNodeGroupInfo[i3].SecurityGroups), Extract: reference.ExternalName(), @@ -265,13 +232,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.ConfigurationInfo); i3++ { { - m, l, err = apisresolver.GetManagedResource("kafka.aws.upbound.io", - - "v1beta1", "Configuration", "ConfigurationList") + m, l, err = apisresolver.GetManagedResource("kafka.aws.upbound.io", "v1beta1", "Configuration", "ConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ConfigurationInfo[i3].Arn), Extract: common.ARNExtractor(), @@ -289,15 +253,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.EncryptionInfo); i3++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EncryptionInfo[i3].EncryptionAtRestKMSKeyArn), Extract: common.ARNExtractor(), @@ -317,14 +276,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error for i4 := 0; i4 < len(mg.Spec.InitProvider.LoggingInfo[i3].BrokerLogs); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.LoggingInfo[i3].BrokerLogs[i4].CloudwatchLogs); i5++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LoggingInfo[i3].BrokerLogs[i4].CloudwatchLogs[i5].LogGroup), Extract: reference.ExternalName(), @@ -346,13 +301,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error for i4 := 0; i4 < len(mg.Spec.InitProvider.LoggingInfo[i3].BrokerLogs); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.LoggingInfo[i3].BrokerLogs[i4].Firehose); i5++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LoggingInfo[i3].BrokerLogs[i4].Firehose[i5].DeliveryStream), Extract: resource.ExtractParamPath("name", false), @@ -374,15 +326,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error for i4 := 0; i4 < len(mg.Spec.InitProvider.LoggingInfo[i3].BrokerLogs); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.LoggingInfo[i3].BrokerLogs[i4].S3); i5++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LoggingInfo[i3].BrokerLogs[i4].S3[i5].Bucket), Extract: reference.ExternalName(), @@ -408,19 +355,15 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *ScramSecretAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kafka.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("kafka.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -437,9 +380,7 @@ func (mg *ScramSecretAssociation) ResolveReferences(ctx context.Context, c clien mg.Spec.ForProvider.ClusterArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -458,12 +399,9 @@ func (mg *ScramSecretAssociation) ResolveReferences(ctx context.Context, c clien mg.Spec.ForProvider.SecretArnList = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecretArnRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("kafka.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("kafka.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -480,9 +418,7 @@ func (mg *ScramSecretAssociation) ResolveReferences(ctx context.Context, c clien mg.Spec.InitProvider.ClusterArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ClusterArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -508,7 +444,6 @@ func (mg *ScramSecretAssociation) ResolveReferences(ctx context.Context, c clien func (mg *ServerlessCluster) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse @@ -516,13 +451,10 @@ func (mg *ServerlessCluster) ResolveReferences(ctx context.Context, c client.Rea for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCConfig[i3].SecurityGroupIds), Extract: reference.ExternalName(), @@ -540,13 +472,10 @@ func (mg *ServerlessCluster) ResolveReferences(ctx context.Context, c client.Rea } for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCConfig[i3].SubnetIds), Extract: reference.ExternalName(), @@ -564,13 +493,10 @@ func (mg *ServerlessCluster) ResolveReferences(ctx context.Context, c client.Rea } for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCConfig[i3].SecurityGroupIds), Extract: reference.ExternalName(), @@ -588,13 +514,10 @@ func (mg *ServerlessCluster) ResolveReferences(ctx context.Context, c client.Rea } for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCConfig[i3].SubnetIds), Extract: reference.ExternalName(), diff --git a/apis/kendra/v1beta1/zz_generated.resolvers.go b/apis/kendra/v1beta1/zz_generated.resolvers.go index 44d02a68ff..e779dc3d16 100644 --- a/apis/kendra/v1beta1/zz_generated.resolvers.go +++ b/apis/kendra/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ func (mg *DataSource) ResolveReferences( // ResolveReferences of this DataSource ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -31,15 +30,10 @@ func (mg *DataSource) ResolveReferences( // ResolveReferences of this DataSource for i3 := 0; i3 < len(mg.Spec.ForProvider.Configuration); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Configuration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Configuration[i3].S3Configuration[i4].BucketName), Extract: resource.ExtractResourceID(), @@ -61,13 +55,10 @@ func (mg *DataSource) ResolveReferences( // ResolveReferences of this DataSource for i5 := 0; i5 < len(mg.Spec.ForProvider.Configuration[i3].WebCrawlerConfiguration[i4].AuthenticationConfiguration); i5++ { for i6 := 0; i6 < len(mg.Spec.ForProvider.Configuration[i3].WebCrawlerConfiguration[i4].AuthenticationConfiguration[i5].BasicAuthentication); i6++ { { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Configuration[i3].WebCrawlerConfiguration[i4].AuthenticationConfiguration[i5].BasicAuthentication[i6].Credentials), Extract: resource.ExtractParamPath("arn", true), @@ -90,13 +81,10 @@ func (mg *DataSource) ResolveReferences( // ResolveReferences of this DataSource for i4 := 0; i4 < len(mg.Spec.ForProvider.Configuration[i3].WebCrawlerConfiguration); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.Configuration[i3].WebCrawlerConfiguration[i4].ProxyConfiguration); i5++ { { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Configuration[i3].WebCrawlerConfiguration[i4].ProxyConfiguration[i5].Credentials), Extract: resource.ExtractParamPath("arn", true), @@ -115,13 +103,10 @@ func (mg *DataSource) ResolveReferences( // ResolveReferences of this DataSource } } { - m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", - - "v1beta1", "Index", "IndexList") + m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", "v1beta1", "Index", "IndexList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.IndexID), Extract: resource.ExtractResourceID(), @@ -136,13 +121,9 @@ func (mg *DataSource) ResolveReferences( // ResolveReferences of this DataSource mg.Spec.ForProvider.IndexID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IndexIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -162,15 +143,10 @@ func (mg *DataSource) ResolveReferences( // ResolveReferences of this DataSource for i3 := 0; i3 < len(mg.Spec.InitProvider.Configuration); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Configuration[i3].S3Configuration); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Configuration[i3].S3Configuration[i4].BucketName), Extract: resource.ExtractResourceID(), @@ -192,13 +168,10 @@ func (mg *DataSource) ResolveReferences( // ResolveReferences of this DataSource for i5 := 0; i5 < len(mg.Spec.InitProvider.Configuration[i3].WebCrawlerConfiguration[i4].AuthenticationConfiguration); i5++ { for i6 := 0; i6 < len(mg.Spec.InitProvider.Configuration[i3].WebCrawlerConfiguration[i4].AuthenticationConfiguration[i5].BasicAuthentication); i6++ { { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Configuration[i3].WebCrawlerConfiguration[i4].AuthenticationConfiguration[i5].BasicAuthentication[i6].Credentials), Extract: resource.ExtractParamPath("arn", true), @@ -221,13 +194,10 @@ func (mg *DataSource) ResolveReferences( // ResolveReferences of this DataSource for i4 := 0; i4 < len(mg.Spec.InitProvider.Configuration[i3].WebCrawlerConfiguration); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.Configuration[i3].WebCrawlerConfiguration[i4].ProxyConfiguration); i5++ { { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Configuration[i3].WebCrawlerConfiguration[i4].ProxyConfiguration[i5].Credentials), Extract: resource.ExtractParamPath("arn", true), @@ -246,13 +216,10 @@ func (mg *DataSource) ResolveReferences( // ResolveReferences of this DataSource } } { - m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", - - "v1beta1", "Index", "IndexList") + m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", "v1beta1", "Index", "IndexList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.IndexID), Extract: resource.ExtractResourceID(), @@ -267,13 +234,9 @@ func (mg *DataSource) ResolveReferences( // ResolveReferences of this DataSource mg.Spec.InitProvider.IndexID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.IndexIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -297,15 +260,12 @@ func (mg *DataSource) ResolveReferences( // ResolveReferences of this DataSource func (mg *Experience) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", - - "v1beta1", "Index", "IndexList") + m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", "v1beta1", "Index", "IndexList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -324,13 +284,9 @@ func (mg *Experience) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.IndexID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IndexIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -347,9 +303,7 @@ func (mg *Experience) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", - - "v1beta1", "Index", "IndexList") + m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", "v1beta1", "Index", "IndexList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -368,13 +322,9 @@ func (mg *Experience) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.IndexID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.IndexIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -398,19 +348,14 @@ func (mg *Experience) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *Index) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -427,13 +372,9 @@ func (mg *Index) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -457,15 +398,12 @@ func (mg *Index) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *QuerySuggestionsBlockList) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", - - "v1beta1", "Index", "IndexList") + m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", "v1beta1", "Index", "IndexList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -484,13 +422,9 @@ func (mg *QuerySuggestionsBlockList) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.IndexID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IndexIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -509,15 +443,10 @@ func (mg *QuerySuggestionsBlockList) ResolveReferences(ctx context.Context, c cl for i3 := 0; i3 < len(mg.Spec.ForProvider.SourceS3Path); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SourceS3Path[i3].Bucket), Extract: resource.ExtractResourceID(), @@ -534,13 +463,10 @@ func (mg *QuerySuggestionsBlockList) ResolveReferences(ctx context.Context, c cl } { - m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", - - "v1beta1", "Index", "IndexList") + m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", "v1beta1", "Index", "IndexList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.IndexID), Extract: resource.ExtractResourceID(), @@ -555,13 +481,9 @@ func (mg *QuerySuggestionsBlockList) ResolveReferences(ctx context.Context, c cl mg.Spec.InitProvider.IndexID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.IndexIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -580,15 +502,10 @@ func (mg *QuerySuggestionsBlockList) ResolveReferences(ctx context.Context, c cl for i3 := 0; i3 < len(mg.Spec.InitProvider.SourceS3Path); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SourceS3Path[i3].Bucket), Extract: resource.ExtractResourceID(), @@ -612,15 +529,12 @@ func (mg *QuerySuggestionsBlockList) ResolveReferences(ctx context.Context, c cl func (mg *Thesaurus) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", - - "v1beta1", "Index", "IndexList") + m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", "v1beta1", "Index", "IndexList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -639,13 +553,9 @@ func (mg *Thesaurus) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.IndexID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IndexIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -664,15 +574,10 @@ func (mg *Thesaurus) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.ForProvider.SourceS3Path); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SourceS3Path[i3].Bucket), Extract: resource.ExtractResourceID(), @@ -690,15 +595,10 @@ func (mg *Thesaurus) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.ForProvider.SourceS3Path); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Object", "ObjectList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Object", "ObjectList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SourceS3Path[i3].Key), Extract: resource.ExtractParamPath("key", false), @@ -715,13 +615,10 @@ func (mg *Thesaurus) ResolveReferences(ctx context.Context, c client.Reader) err } { - m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", - - "v1beta1", "Index", "IndexList") + m, l, err = apisresolver.GetManagedResource("kendra.aws.upbound.io", "v1beta1", "Index", "IndexList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.IndexID), Extract: resource.ExtractResourceID(), @@ -736,13 +633,9 @@ func (mg *Thesaurus) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.InitProvider.IndexID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.IndexIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -761,15 +654,10 @@ func (mg *Thesaurus) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.InitProvider.SourceS3Path); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SourceS3Path[i3].Bucket), Extract: resource.ExtractResourceID(), @@ -787,15 +675,10 @@ func (mg *Thesaurus) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.InitProvider.SourceS3Path); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Object", "ObjectList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Object", "ObjectList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SourceS3Path[i3].Key), Extract: resource.ExtractParamPath("key", false), diff --git a/apis/keyspaces/v1beta1/zz_generated.resolvers.go b/apis/keyspaces/v1beta1/zz_generated.resolvers.go index 9ebb9826f0..15f27fd8bc 100644 --- a/apis/keyspaces/v1beta1/zz_generated.resolvers.go +++ b/apis/keyspaces/v1beta1/zz_generated.resolvers.go @@ -20,18 +20,14 @@ import ( func (mg *Table) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("keyspaces.aws.upbound.io", - - "v1beta1", "Keyspace", "KeyspaceList") + m, l, err = apisresolver.GetManagedResource("keyspaces.aws.upbound.io", "v1beta1", "Keyspace", "KeyspaceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -48,12 +44,9 @@ func (mg *Table) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.KeyspaceName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KeyspaceNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("keyspaces.aws.upbound.io", - - "v1beta1", "Keyspace", "KeyspaceList") + m, l, err = apisresolver.GetManagedResource("keyspaces.aws.upbound.io", "v1beta1", "Keyspace", "KeyspaceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/kinesis/v1beta1/zz_generated.resolvers.go b/apis/kinesis/v1beta1/zz_generated.resolvers.go index 8da25ef45b..ddadbac820 100644 --- a/apis/kinesis/v1beta1/zz_generated.resolvers.go +++ b/apis/kinesis/v1beta1/zz_generated.resolvers.go @@ -22,19 +22,14 @@ import ( func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -51,13 +46,9 @@ func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -81,18 +72,14 @@ func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *StreamConsumer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -109,12 +96,9 @@ func (mg *StreamConsumer) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.StreamArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StreamArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/kinesisanalytics/v1beta1/zz_generated.resolvers.go b/apis/kinesisanalytics/v1beta1/zz_generated.resolvers.go index 5c1bfd15f1..8f15caf100 100644 --- a/apis/kinesisanalytics/v1beta1/zz_generated.resolvers.go +++ b/apis/kinesisanalytics/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -30,13 +29,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i3 := 0; i3 < len(mg.Spec.ForProvider.CloudwatchLoggingOptions); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.CloudwatchLoggingOptions[i3].LogStreamArn), Extract: resource.ExtractParamPath("arn", true), @@ -54,15 +50,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati } for i3 := 0; i3 < len(mg.Spec.ForProvider.CloudwatchLoggingOptions); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.CloudwatchLoggingOptions[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -81,14 +72,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i3 := 0; i3 < len(mg.Spec.ForProvider.Inputs); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Inputs[i3].KinesisStream); i4++ { { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Inputs[i3].KinesisStream[i4].ResourceArn), Extract: common.TerraformID(), @@ -108,15 +95,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i3 := 0; i3 < len(mg.Spec.ForProvider.Inputs); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Inputs[i3].KinesisStream); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Inputs[i3].KinesisStream[i4].RoleArn), Extract: common.ARNExtractor(), @@ -136,13 +118,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i3 := 0; i3 < len(mg.Spec.ForProvider.Outputs); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Outputs[i3].KinesisFirehose); i4++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Outputs[i3].KinesisFirehose[i4].ResourceArn), Extract: resource.ExtractParamPath("arn", false), @@ -162,15 +141,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i3 := 0; i3 < len(mg.Spec.ForProvider.Outputs); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Outputs[i3].KinesisFirehose); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Outputs[i3].KinesisFirehose[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -189,13 +163,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati } for i3 := 0; i3 < len(mg.Spec.InitProvider.CloudwatchLoggingOptions); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.CloudwatchLoggingOptions[i3].LogStreamArn), Extract: resource.ExtractParamPath("arn", true), @@ -213,15 +184,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati } for i3 := 0; i3 < len(mg.Spec.InitProvider.CloudwatchLoggingOptions); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.CloudwatchLoggingOptions[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -240,14 +206,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i3 := 0; i3 < len(mg.Spec.InitProvider.Inputs); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Inputs[i3].KinesisStream); i4++ { { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Inputs[i3].KinesisStream[i4].ResourceArn), Extract: common.TerraformID(), @@ -267,15 +229,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i3 := 0; i3 < len(mg.Spec.InitProvider.Inputs); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Inputs[i3].KinesisStream); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Inputs[i3].KinesisStream[i4].RoleArn), Extract: common.ARNExtractor(), @@ -295,13 +252,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i3 := 0; i3 < len(mg.Spec.InitProvider.Outputs); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Outputs[i3].KinesisFirehose); i4++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Outputs[i3].KinesisFirehose[i4].ResourceArn), Extract: resource.ExtractParamPath("arn", false), @@ -321,15 +275,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i3 := 0; i3 < len(mg.Spec.InitProvider.Outputs); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Outputs[i3].KinesisFirehose); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Outputs[i3].KinesisFirehose[i4].RoleArn), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/kinesisanalyticsv2/v1beta1/zz_generated.resolvers.go b/apis/kinesisanalyticsv2/v1beta1/zz_generated.resolvers.go index 3d2193711c..cc0091b119 100644 --- a/apis/kinesisanalyticsv2/v1beta1/zz_generated.resolvers.go +++ b/apis/kinesisanalyticsv2/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -33,15 +32,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i5 := 0; i5 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].ApplicationCodeConfiguration[i4].CodeContent); i5++ { for i6 := 0; i6 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].ApplicationCodeConfiguration[i4].CodeContent[i5].S3ContentLocation); i6++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ApplicationConfiguration[i3].ApplicationCodeConfiguration[i4].CodeContent[i5].S3ContentLocation[i6].BucketArn), Extract: common.ARNExtractor(), @@ -65,15 +59,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i5 := 0; i5 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].ApplicationCodeConfiguration[i4].CodeContent); i5++ { for i6 := 0; i6 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].ApplicationCodeConfiguration[i4].CodeContent[i5].S3ContentLocation); i6++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Object", "ObjectList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Object", "ObjectList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ApplicationConfiguration[i3].ApplicationCodeConfiguration[i4].CodeContent[i5].S3ContentLocation[i6].FileKey), Extract: resource.ExtractParamPath("key", false), @@ -97,14 +86,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i5 := 0; i5 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input); i5++ { for i6 := 0; i6 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].KinesisStreamsInput); i6++ { { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].KinesisStreamsInput[i6].ResourceArn), Extract: common.TerraformID(), @@ -128,13 +113,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i5 := 0; i5 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output); i5++ { for i6 := 0; i6 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].KinesisFirehoseOutput); i6++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].KinesisFirehoseOutput[i6].ResourceArn), Extract: resource.ExtractParamPath("arn", false), @@ -158,14 +140,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i5 := 0; i5 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output); i5++ { for i6 := 0; i6 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].LambdaOutput); i6++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].LambdaOutput[i6].ResourceArn), Extract: resource.ExtractParamPath("arn", true), @@ -189,15 +167,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i5 := 0; i5 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource); i5++ { for i6 := 0; i6 < len(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource[i5].S3ReferenceDataSource); i6++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource[i5].S3ReferenceDataSource[i6].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -218,13 +191,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati } for i3 := 0; i3 < len(mg.Spec.ForProvider.CloudwatchLoggingOptions); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.CloudwatchLoggingOptions[i3].LogStreamArn), Extract: resource.ExtractParamPath("arn", true), @@ -241,15 +211,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ServiceExecutionRole), Extract: common.ARNExtractor(), @@ -269,15 +234,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i5 := 0; i5 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].ApplicationCodeConfiguration[i4].CodeContent); i5++ { for i6 := 0; i6 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].ApplicationCodeConfiguration[i4].CodeContent[i5].S3ContentLocation); i6++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ApplicationConfiguration[i3].ApplicationCodeConfiguration[i4].CodeContent[i5].S3ContentLocation[i6].BucketArn), Extract: common.ARNExtractor(), @@ -301,15 +261,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i5 := 0; i5 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].ApplicationCodeConfiguration[i4].CodeContent); i5++ { for i6 := 0; i6 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].ApplicationCodeConfiguration[i4].CodeContent[i5].S3ContentLocation); i6++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Object", "ObjectList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Object", "ObjectList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ApplicationConfiguration[i3].ApplicationCodeConfiguration[i4].CodeContent[i5].S3ContentLocation[i6].FileKey), Extract: resource.ExtractParamPath("key", false), @@ -333,14 +288,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i5 := 0; i5 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input); i5++ { for i6 := 0; i6 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].KinesisStreamsInput); i6++ { { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Input[i5].KinesisStreamsInput[i6].ResourceArn), Extract: common.TerraformID(), @@ -364,13 +315,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i5 := 0; i5 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output); i5++ { for i6 := 0; i6 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].KinesisFirehoseOutput); i6++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].KinesisFirehoseOutput[i6].ResourceArn), Extract: resource.ExtractParamPath("arn", false), @@ -394,14 +342,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i5 := 0; i5 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output); i5++ { for i6 := 0; i6 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].LambdaOutput); i6++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].Output[i5].LambdaOutput[i6].ResourceArn), Extract: resource.ExtractParamPath("arn", true), @@ -425,15 +369,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati for i5 := 0; i5 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource); i5++ { for i6 := 0; i6 < len(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource[i5].S3ReferenceDataSource); i6++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ApplicationConfiguration[i3].SQLApplicationConfiguration[i4].ReferenceDataSource[i5].S3ReferenceDataSource[i6].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -454,13 +393,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati } for i3 := 0; i3 < len(mg.Spec.InitProvider.CloudwatchLoggingOptions); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.CloudwatchLoggingOptions[i3].LogStreamArn), Extract: resource.ExtractParamPath("arn", true), @@ -477,15 +413,10 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ServiceExecutionRole), Extract: common.ARNExtractor(), @@ -507,15 +438,12 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati func (mg *ApplicationSnapshot) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kinesisanalyticsv2.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("kinesisanalyticsv2.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -534,9 +462,7 @@ func (mg *ApplicationSnapshot) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.ApplicationName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ApplicationNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kinesisanalyticsv2.aws.upbound.io", - - "v1beta1", "Application", "ApplicationList") + m, l, err = apisresolver.GetManagedResource("kinesisanalyticsv2.aws.upbound.io", "v1beta1", "Application", "ApplicationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/kinesisvideo/v1beta1/zz_generated.resolvers.go b/apis/kinesisvideo/v1beta1/zz_generated.resolvers.go index db4de657ec..96ee416cbc 100644 --- a/apis/kinesisvideo/v1beta1/zz_generated.resolvers.go +++ b/apis/kinesisvideo/v1beta1/zz_generated.resolvers.go @@ -12,27 +12,23 @@ import ( errors "github.com/pkg/errors" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - apisresolver "github.com/upbound/provider-aws/internal/apis" client "sigs.k8s.io/controller-runtime/pkg/client" + + // ResolveReferences of this Stream. + apisresolver "github.com/upbound/provider-aws/internal/apis" ) -func (mg *Stream) ResolveReferences( // ResolveReferences of this Stream. - ctx context.Context, c client.Reader) error { +func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -49,13 +45,9 @@ func (mg *Stream) ResolveReferences( // ResolveReferences of this Stream. mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/kms/v1beta1/zz_generated.resolvers.go b/apis/kms/v1beta1/zz_generated.resolvers.go index cb746fa2e3..abc136c70e 100644 --- a/apis/kms/v1beta1/zz_generated.resolvers.go +++ b/apis/kms/v1beta1/zz_generated.resolvers.go @@ -23,19 +23,14 @@ import ( func (mg *Alias) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -52,13 +47,9 @@ func (mg *Alias) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.TargetKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TargetKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -82,19 +73,14 @@ func (mg *Alias) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *Ciphertext) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -111,13 +97,9 @@ func (mg *Ciphertext) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.KeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -141,19 +123,14 @@ func (mg *Ciphertext) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *Grant) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -170,13 +147,9 @@ func (mg *Grant) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.GranteePrincipal = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GranteePrincipalRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -193,13 +166,9 @@ func (mg *Grant) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.KeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -216,13 +185,9 @@ func (mg *Grant) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.GranteePrincipal = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.GranteePrincipalRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -246,18 +211,14 @@ func (mg *Grant) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *ReplicaExternalKey) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "ExternalKey", "ExternalKeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "ExternalKey", "ExternalKeyList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -274,12 +235,9 @@ func (mg *ReplicaExternalKey) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.PrimaryKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PrimaryKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "ExternalKey", "ExternalKeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "ExternalKey", "ExternalKeyList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -303,19 +261,14 @@ func (mg *ReplicaExternalKey) ResolveReferences(ctx context.Context, c client.Re func (mg *ReplicaKey) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -332,13 +285,9 @@ func (mg *ReplicaKey) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.PrimaryKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PrimaryKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/lakeformation/v1beta1/zz_generated.resolvers.go b/apis/lakeformation/v1beta1/zz_generated.resolvers.go index aeef17ae77..fd39b0897f 100644 --- a/apis/lakeformation/v1beta1/zz_generated.resolvers.go +++ b/apis/lakeformation/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ func (mg *Permissions) ResolveReferences( // ResolveReferences of this Permissio ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -30,13 +29,10 @@ func (mg *Permissions) ResolveReferences( // ResolveReferences of this Permissio for i3 := 0; i3 < len(mg.Spec.ForProvider.DataLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("lakeformation.aws.upbound.io", - - "v1beta1", "Resource", "ResourceList") + m, l, err = apisresolver.GetManagedResource("lakeformation.aws.upbound.io", "v1beta1", "Resource", "ResourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DataLocation[i3].Arn), Extract: resource.ExtractParamPath("arn", false), @@ -54,13 +50,10 @@ func (mg *Permissions) ResolveReferences( // ResolveReferences of this Permissio } for i3 := 0; i3 < len(mg.Spec.ForProvider.Database); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "CatalogDatabase", "CatalogDatabaseList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "CatalogDatabase", "CatalogDatabaseList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Database[i3].Name), Extract: reference.ExternalName(), @@ -78,13 +71,10 @@ func (mg *Permissions) ResolveReferences( // ResolveReferences of this Permissio } for i3 := 0; i3 < len(mg.Spec.ForProvider.TableWithColumns); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "CatalogTable", "CatalogTableList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "CatalogTable", "CatalogTableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.TableWithColumns[i3].Name), Extract: reference.ExternalName(), @@ -102,13 +92,10 @@ func (mg *Permissions) ResolveReferences( // ResolveReferences of this Permissio } for i3 := 0; i3 < len(mg.Spec.InitProvider.DataLocation); i3++ { { - m, l, err = apisresolver.GetManagedResource("lakeformation.aws.upbound.io", - - "v1beta1", "Resource", "ResourceList") + m, l, err = apisresolver.GetManagedResource("lakeformation.aws.upbound.io", "v1beta1", "Resource", "ResourceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DataLocation[i3].Arn), Extract: resource.ExtractParamPath("arn", false), @@ -126,13 +113,10 @@ func (mg *Permissions) ResolveReferences( // ResolveReferences of this Permissio } for i3 := 0; i3 < len(mg.Spec.InitProvider.Database); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "CatalogDatabase", "CatalogDatabaseList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "CatalogDatabase", "CatalogDatabaseList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Database[i3].Name), Extract: reference.ExternalName(), @@ -150,13 +134,10 @@ func (mg *Permissions) ResolveReferences( // ResolveReferences of this Permissio } for i3 := 0; i3 < len(mg.Spec.InitProvider.TableWithColumns); i3++ { { - m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", - - "v1beta1", "CatalogTable", "CatalogTableList") + m, l, err = apisresolver.GetManagedResource("glue.aws.upbound.io", "v1beta1", "CatalogTable", "CatalogTableList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.TableWithColumns[i3].Name), Extract: reference.ExternalName(), @@ -180,19 +161,14 @@ func (mg *Permissions) ResolveReferences( // ResolveReferences of this Permissio func (mg *Resource) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -209,13 +185,9 @@ func (mg *Resource) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/lambda/v1beta1/zz_generated.resolvers.go b/apis/lambda/v1beta1/zz_generated.resolvers.go index 9044e2b9cb..d3f6eb5bf9 100644 --- a/apis/lambda/v1beta1/zz_generated.resolvers.go +++ b/apis/lambda/v1beta1/zz_generated.resolvers.go @@ -23,18 +23,14 @@ import ( func (mg *Alias) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -58,7 +54,6 @@ func (mg *Alias) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *CodeSigningConfig) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse @@ -66,13 +61,10 @@ func (mg *CodeSigningConfig) ResolveReferences(ctx context.Context, c client.Rea for i3 := 0; i3 < len(mg.Spec.ForProvider.AllowedPublishers); i3++ { { - m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", - - "v1beta1", "SigningProfile", "SigningProfileList") + m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", "v1beta1", "SigningProfile", "SigningProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.AllowedPublishers[i3].SigningProfileVersionArns), Extract: common.ARNExtractor(), @@ -90,13 +82,10 @@ func (mg *CodeSigningConfig) ResolveReferences(ctx context.Context, c client.Rea } for i3 := 0; i3 < len(mg.Spec.InitProvider.AllowedPublishers); i3++ { { - m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", - - "v1beta1", "SigningProfile", "SigningProfileList") + m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", "v1beta1", "SigningProfile", "SigningProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.AllowedPublishers[i3].SigningProfileVersionArns), Extract: common.ARNExtractor(), @@ -120,18 +109,14 @@ func (mg *CodeSigningConfig) ResolveReferences(ctx context.Context, c client.Rea func (mg *EventSourceMapping) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -148,12 +133,9 @@ func (mg *EventSourceMapping) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.FunctionName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FunctionNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -177,7 +159,6 @@ func (mg *EventSourceMapping) ResolveReferences(ctx context.Context, c client.Re func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -186,14 +167,10 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.FileSystemConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", - - "v1beta1", "AccessPoint", "AccessPointList") + m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", "v1beta1", "AccessPoint", "AccessPointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.FileSystemConfig[i3].Arn), Extract: resource.ExtractParamPath("arn", true), @@ -210,15 +187,10 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro } { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KMSKeyArn), Extract: reference.ExternalName(), @@ -233,9 +205,7 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -254,13 +224,9 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.ReplacementSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.ReplacementSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -277,13 +243,9 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.Role = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -302,13 +264,10 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCConfig[i3].SecurityGroupIds), Extract: reference.ExternalName(), @@ -326,13 +285,10 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCConfig[i3].SubnetIds), Extract: reference.ExternalName(), @@ -350,14 +306,10 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.FileSystemConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", - - "v1beta1", "AccessPoint", "AccessPointList") + m, l, err = apisresolver.GetManagedResource("efs.aws.upbound.io", "v1beta1", "AccessPoint", "AccessPointList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.FileSystemConfig[i3].Arn), Extract: resource.ExtractParamPath("arn", true), @@ -374,15 +326,10 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro } { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.KMSKeyArn), Extract: reference.ExternalName(), @@ -397,9 +344,7 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -418,13 +363,9 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.ReplacementSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.ReplacementSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -441,13 +382,9 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.Role = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RoleRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -466,13 +403,10 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCConfig[i3].SecurityGroupIds), Extract: reference.ExternalName(), @@ -490,13 +424,10 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCConfig[i3].SubnetIds), Extract: reference.ExternalName(), @@ -520,7 +451,6 @@ func (mg *Function) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *FunctionEventInvokeConfig) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -529,15 +459,10 @@ func (mg *FunctionEventInvokeConfig) ResolveReferences(ctx context.Context, c cl for i3 := 0; i3 < len(mg.Spec.ForProvider.DestinationConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.DestinationConfig[i3].OnFailure); i4++ { { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DestinationConfig[i3].OnFailure[i4].Destination), Extract: common.ARNExtractor(), @@ -557,15 +482,10 @@ func (mg *FunctionEventInvokeConfig) ResolveReferences(ctx context.Context, c cl for i3 := 0; i3 < len(mg.Spec.ForProvider.DestinationConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.DestinationConfig[i3].OnSuccess); i4++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DestinationConfig[i3].OnSuccess[i4].Destination), Extract: common.ARNExtractor(), @@ -585,15 +505,10 @@ func (mg *FunctionEventInvokeConfig) ResolveReferences(ctx context.Context, c cl for i3 := 0; i3 < len(mg.Spec.InitProvider.DestinationConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.DestinationConfig[i3].OnFailure); i4++ { { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DestinationConfig[i3].OnFailure[i4].Destination), Extract: common.ARNExtractor(), @@ -613,15 +528,10 @@ func (mg *FunctionEventInvokeConfig) ResolveReferences(ctx context.Context, c cl for i3 := 0; i3 < len(mg.Spec.InitProvider.DestinationConfig); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.DestinationConfig[i3].OnSuccess); i4++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DestinationConfig[i3].OnSuccess[i4].Destination), Extract: common.ARNExtractor(), @@ -646,18 +556,14 @@ func (mg *FunctionEventInvokeConfig) ResolveReferences(ctx context.Context, c cl func (mg *FunctionURL) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -674,12 +580,9 @@ func (mg *FunctionURL) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.FunctionName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FunctionNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -703,18 +606,14 @@ func (mg *FunctionURL) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *Invocation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -731,12 +630,9 @@ func (mg *Invocation) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.FunctionName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FunctionNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -760,18 +656,14 @@ func (mg *Invocation) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -788,9 +680,7 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.FunctionName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FunctionNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Alias", "AliasList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Alias", "AliasList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -809,12 +699,9 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.Qualifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.QualifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -831,9 +718,7 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.FunctionName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.FunctionNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Alias", "AliasList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Alias", "AliasList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/licensemanager/v1beta1/zz_generated.resolvers.go b/apis/licensemanager/v1beta1/zz_generated.resolvers.go index 01c655ce49..3dfef7c2c7 100644 --- a/apis/licensemanager/v1beta1/zz_generated.resolvers.go +++ b/apis/licensemanager/v1beta1/zz_generated.resolvers.go @@ -22,16 +22,12 @@ func (mg *Association) ResolveReferences( // ResolveReferences of this Associati ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("licensemanager.aws.upbound.io", - - "v1beta1", "LicenseConfiguration", "LicenseConfigurationList", - ) + m, l, err = apisresolver.GetManagedResource("licensemanager.aws.upbound.io", "v1beta1", "LicenseConfiguration", "LicenseConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -50,12 +46,9 @@ func (mg *Association) ResolveReferences( // ResolveReferences of this Associati mg.Spec.ForProvider.LicenseConfigurationArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LicenseConfigurationArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -72,10 +65,7 @@ func (mg *Association) ResolveReferences( // ResolveReferences of this Associati mg.Spec.ForProvider.ResourceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("licensemanager.aws.upbound.io", - - "v1beta1", "LicenseConfiguration", "LicenseConfigurationList", - ) + m, l, err = apisresolver.GetManagedResource("licensemanager.aws.upbound.io", "v1beta1", "LicenseConfiguration", "LicenseConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -94,12 +84,9 @@ func (mg *Association) ResolveReferences( // ResolveReferences of this Associati mg.Spec.InitProvider.LicenseConfigurationArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.LicenseConfigurationArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/lightsail/v1beta1/zz_generated.resolvers.go b/apis/lightsail/v1beta1/zz_generated.resolvers.go index c607c98d6d..cf286cb3ec 100644 --- a/apis/lightsail/v1beta1/zz_generated.resolvers.go +++ b/apis/lightsail/v1beta1/zz_generated.resolvers.go @@ -20,15 +20,12 @@ func (mg *DiskAttachment) ResolveReferences( // ResolveReferences of this DiskAt ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "Disk", "DiskList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "Disk", "DiskList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -47,12 +44,9 @@ func (mg *DiskAttachment) ResolveReferences( // ResolveReferences of this DiskAt mg.Spec.ForProvider.DiskName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DiskNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -69,9 +63,7 @@ func (mg *DiskAttachment) ResolveReferences( // ResolveReferences of this DiskAt mg.Spec.ForProvider.InstanceName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "Disk", "DiskList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "Disk", "DiskList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -90,12 +82,9 @@ func (mg *DiskAttachment) ResolveReferences( // ResolveReferences of this DiskAt mg.Spec.InitProvider.DiskName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DiskNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -119,18 +108,14 @@ func (mg *DiskAttachment) ResolveReferences( // ResolveReferences of this DiskAt func (mg *DomainEntry) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -154,18 +139,14 @@ func (mg *DomainEntry) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *InstancePublicPorts) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -182,12 +163,9 @@ func (mg *InstancePublicPorts) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.InstanceName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -211,18 +189,14 @@ func (mg *InstancePublicPorts) ResolveReferences(ctx context.Context, c client.R func (mg *LBAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -239,13 +213,9 @@ func (mg *LBAttachment) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.InstanceName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "LB", "LBList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "LB", "LBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -262,12 +232,9 @@ func (mg *LBAttachment) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.LBName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LBNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -284,13 +251,9 @@ func (mg *LBAttachment) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.InstanceName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.InstanceNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "LB", "LBList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "LB", "LBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -314,19 +277,14 @@ func (mg *LBAttachment) ResolveReferences(ctx context.Context, c client.Reader) func (mg *LBCertificate) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "LB", "LBList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "LB", "LBList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -350,18 +308,14 @@ func (mg *LBCertificate) ResolveReferences(ctx context.Context, c client.Reader) func (mg *StaticIPAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -378,12 +332,9 @@ func (mg *StaticIPAttachment) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.InstanceName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.InstanceNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "StaticIP", "StaticIPList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "StaticIP", "StaticIPList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -400,12 +351,9 @@ func (mg *StaticIPAttachment) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.StaticIPName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StaticIPNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -422,12 +370,9 @@ func (mg *StaticIPAttachment) ResolveReferences(ctx context.Context, c client.Re mg.Spec.InitProvider.InstanceName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.InstanceNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", - - "v1beta1", "StaticIP", "StaticIPList") + m, l, err = apisresolver.GetManagedResource("lightsail.aws.upbound.io", "v1beta1", "StaticIP", "StaticIPList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/location/v1beta1/zz_generated.resolvers.go b/apis/location/v1beta1/zz_generated.resolvers.go index 27c054a9bd..61e341214a 100644 --- a/apis/location/v1beta1/zz_generated.resolvers.go +++ b/apis/location/v1beta1/zz_generated.resolvers.go @@ -21,19 +21,14 @@ func (mg *GeofenceCollection) ResolveReferences( // ResolveReferences of this Ge ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,13 +45,9 @@ func (mg *GeofenceCollection) ResolveReferences( // ResolveReferences of this Ge mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -80,19 +71,14 @@ func (mg *GeofenceCollection) ResolveReferences( // ResolveReferences of this Ge func (mg *Tracker) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -109,13 +95,9 @@ func (mg *Tracker) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -139,17 +121,13 @@ func (mg *Tracker) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *TrackerAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("location.aws.upbound.io", - - "v1beta1", "GeofenceCollection", "GeofenceCollectionList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("location.aws.upbound.io", "v1beta1", "GeofenceCollection", "GeofenceCollectionList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -167,12 +145,9 @@ func (mg *TrackerAssociation) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.ConsumerArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConsumerArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("location.aws.upbound.io", - - "v1beta1", "Tracker", "TrackerList") + m, l, err = apisresolver.GetManagedResource("location.aws.upbound.io", "v1beta1", "Tracker", "TrackerList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -189,11 +164,8 @@ func (mg *TrackerAssociation) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.TrackerName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TrackerNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("location.aws.upbound.io", - - "v1beta1", "GeofenceCollection", "GeofenceCollectionList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("location.aws.upbound.io", "v1beta1", "GeofenceCollection", "GeofenceCollectionList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -211,12 +183,9 @@ func (mg *TrackerAssociation) ResolveReferences(ctx context.Context, c client.Re mg.Spec.InitProvider.ConsumerArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ConsumerArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("location.aws.upbound.io", - - "v1beta1", "Tracker", "TrackerList") + m, l, err = apisresolver.GetManagedResource("location.aws.upbound.io", "v1beta1", "Tracker", "TrackerList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/medialive/v1beta1/zz_generated.resolvers.go b/apis/medialive/v1beta1/zz_generated.resolvers.go index 855035984d..65b8fbd50a 100644 --- a/apis/medialive/v1beta1/zz_generated.resolvers.go +++ b/apis/medialive/v1beta1/zz_generated.resolvers.go @@ -14,16 +14,14 @@ import ( xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" common "github.com/upbound/provider-aws/config/common" - client "sigs.k8s.io/controller-runtime/pkg/client" - - // ResolveReferences of this Channel. apisresolver "github.com/upbound/provider-aws/internal/apis" + client "sigs.k8s.io/controller-runtime/pkg/client" ) -func (mg *Channel) ResolveReferences(ctx context.Context, c client.Reader) error { +func (mg *Channel) ResolveReferences( // ResolveReferences of this Channel. + ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -31,14 +29,10 @@ func (mg *Channel) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.InputAttachments); i3++ { { - m, l, err = apisresolver.GetManagedResource("medialive.aws.upbound.io", - - "v1beta1", "Input", "InputList") + m, l, err = apisresolver.GetManagedResource("medialive.aws.upbound.io", "v1beta1", "Input", "InputList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.InputAttachments[i3].InputID), Extract: resource.ExtractResourceID(), @@ -55,15 +49,10 @@ func (mg *Channel) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RoleArn), Extract: common.ARNExtractor(), @@ -80,14 +69,10 @@ func (mg *Channel) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.InputAttachments); i3++ { { - m, l, err = apisresolver.GetManagedResource("medialive.aws.upbound.io", - - "v1beta1", "Input", "InputList") + m, l, err = apisresolver.GetManagedResource("medialive.aws.upbound.io", "v1beta1", "Input", "InputList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.InputAttachments[i3].InputID), Extract: resource.ExtractResourceID(), @@ -104,15 +89,10 @@ func (mg *Channel) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RoleArn), Extract: common.ARNExtractor(), @@ -134,19 +114,14 @@ func (mg *Channel) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *Input) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -163,13 +138,9 @@ func (mg *Input) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/mediastore/v1beta1/zz_generated.resolvers.go b/apis/mediastore/v1beta1/zz_generated.resolvers.go index c342d48124..9eec0692d0 100644 --- a/apis/mediastore/v1beta1/zz_generated.resolvers.go +++ b/apis/mediastore/v1beta1/zz_generated.resolvers.go @@ -19,15 +19,12 @@ func (mg *ContainerPolicy) ResolveReferences( // ResolveReferences of this Conta ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("mediastore.aws.upbound.io", - - "v1beta1", "Container", "ContainerList") + m, l, err = apisresolver.GetManagedResource("mediastore.aws.upbound.io", "v1beta1", "Container", "ContainerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -46,9 +43,7 @@ func (mg *ContainerPolicy) ResolveReferences( // ResolveReferences of this Conta mg.Spec.ForProvider.ContainerName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ContainerNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("mediastore.aws.upbound.io", - - "v1beta1", "Container", "ContainerList") + m, l, err = apisresolver.GetManagedResource("mediastore.aws.upbound.io", "v1beta1", "Container", "ContainerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/memorydb/v1beta1/zz_generated.resolvers.go b/apis/memorydb/v1beta1/zz_generated.resolvers.go index 5f0661bea3..44b1281107 100644 --- a/apis/memorydb/v1beta1/zz_generated.resolvers.go +++ b/apis/memorydb/v1beta1/zz_generated.resolvers.go @@ -22,20 +22,15 @@ import ( func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -52,9 +47,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -73,9 +66,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("memorydb.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("memorydb.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -94,13 +85,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.SubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -117,9 +104,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -138,9 +123,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("memorydb.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("memorydb.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -166,18 +149,14 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *Snapshot) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("memorydb.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("memorydb.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -194,13 +173,9 @@ func (mg *Snapshot) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.ClusterName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -217,12 +192,9 @@ func (mg *Snapshot) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("memorydb.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("memorydb.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -239,13 +211,9 @@ func (mg *Snapshot) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.ClusterName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ClusterNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -269,15 +237,12 @@ func (mg *Snapshot) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -296,9 +261,7 @@ func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/mq/v1beta1/zz_generated.resolvers.go b/apis/mq/v1beta1/zz_generated.resolvers.go index 4a913590a0..bdc0a741b7 100644 --- a/apis/mq/v1beta1/zz_generated.resolvers.go +++ b/apis/mq/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ import ( func (mg *Broker) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -31,13 +30,10 @@ func (mg *Broker) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.Configuration); i3++ { { - m, l, err = apisresolver.GetManagedResource("mq.aws.upbound.io", - - "v1beta1", "Configuration", "ConfigurationList") + m, l, err = apisresolver.GetManagedResource("mq.aws.upbound.io", "v1beta1", "Configuration", "ConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Configuration[i3].ID), Extract: resource.ExtractResourceID(), @@ -54,13 +50,10 @@ func (mg *Broker) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SecurityGroups), Extract: reference.ExternalName(), @@ -75,9 +68,7 @@ func (mg *Broker) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.SecurityGroups = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -98,13 +89,10 @@ func (mg *Broker) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.Configuration); i3++ { { - m, l, err = apisresolver.GetManagedResource("mq.aws.upbound.io", - - "v1beta1", "Configuration", "ConfigurationList") + m, l, err = apisresolver.GetManagedResource("mq.aws.upbound.io", "v1beta1", "Configuration", "ConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Configuration[i3].ID), Extract: resource.ExtractResourceID(), @@ -121,13 +109,10 @@ func (mg *Broker) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.SecurityGroups), Extract: reference.ExternalName(), @@ -142,9 +127,7 @@ func (mg *Broker) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.SecurityGroups = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/neptune/v1beta1/zz_generated.resolvers.go b/apis/neptune/v1beta1/zz_generated.resolvers.go index 2d1676279a..a9b772d830 100644 --- a/apis/neptune/v1beta1/zz_generated.resolvers.go +++ b/apis/neptune/v1beta1/zz_generated.resolvers.go @@ -22,20 +22,15 @@ import ( func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -52,13 +47,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.IAMRoles = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.IAMRoleRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -75,9 +66,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "ClusterParameterGroup", "ClusterParameterGroupList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "ClusterParameterGroup", "ClusterParameterGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -96,9 +85,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.NeptuneClusterParameterGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NeptuneClusterParameterGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -117,12 +104,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.NeptuneSubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NeptuneSubnetGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -139,9 +123,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.ReplicationSourceIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ReplicationSourceIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "ClusterSnapshot", "ClusterSnapshotList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "ClusterSnapshot", "ClusterSnapshotList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -160,9 +142,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.SnapshotIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SnapshotIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -181,13 +161,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -204,13 +180,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.IAMRoles = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.IAMRoleRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -227,9 +199,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.KMSKeyArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "ClusterParameterGroup", "ClusterParameterGroupList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "ClusterParameterGroup", "ClusterParameterGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -248,9 +218,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.NeptuneClusterParameterGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.NeptuneClusterParameterGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -269,12 +237,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.NeptuneSubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.NeptuneSubnetGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -291,9 +256,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.ReplicationSourceIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ReplicationSourceIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "ClusterSnapshot", "ClusterSnapshotList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "ClusterSnapshot", "ClusterSnapshotList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -312,9 +275,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.SnapshotIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.SnapshotIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -340,18 +301,14 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *ClusterEndpoint) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -368,12 +325,9 @@ func (mg *ClusterEndpoint) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.ClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -397,18 +351,14 @@ func (mg *ClusterEndpoint) ResolveReferences(ctx context.Context, c client.Reade func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -425,9 +375,7 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.ClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "ParameterGroup", "ParameterGroupList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "ParameterGroup", "ParameterGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -446,9 +394,7 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.NeptuneParameterGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NeptuneParameterGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -467,12 +413,9 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.NeptuneSubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NeptuneSubnetGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -489,9 +432,7 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.ClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "ParameterGroup", "ParameterGroupList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "ParameterGroup", "ParameterGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -510,9 +451,7 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.NeptuneParameterGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.NeptuneParameterGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -538,18 +477,14 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade func (mg *ClusterSnapshot) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -566,12 +501,9 @@ func (mg *ClusterSnapshot) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.DBClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -595,19 +527,14 @@ func (mg *ClusterSnapshot) ResolveReferences(ctx context.Context, c client.Reade func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -624,13 +551,9 @@ func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.SnsTopicArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SnsTopicArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -654,18 +577,14 @@ func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Rea func (mg *GlobalCluster) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -682,12 +601,9 @@ func (mg *GlobalCluster) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.SourceDBClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceDBClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("neptune.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -711,15 +627,12 @@ func (mg *GlobalCluster) ResolveReferences(ctx context.Context, c client.Reader) func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -738,9 +651,7 @@ func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/networkfirewall/v1beta1/zz_generated.resolvers.go b/apis/networkfirewall/v1beta1/zz_generated.resolvers.go index 74a7bd7f1f..56dd194774 100644 --- a/apis/networkfirewall/v1beta1/zz_generated.resolvers.go +++ b/apis/networkfirewall/v1beta1/zz_generated.resolvers.go @@ -14,25 +14,22 @@ import ( xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" common "github.com/upbound/provider-aws/config/common" - apisresolver "github.com/upbound/provider-aws/internal/apis" client "sigs.k8s.io/controller-runtime/pkg/client" + + // ResolveReferences of this Firewall. + apisresolver "github.com/upbound/provider-aws/internal/apis" ) -func (mg *Firewall) ResolveReferences( // ResolveReferences of this Firewall. - ctx context.Context, c client.Reader) error { +func (mg *Firewall) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", - - "v1beta1", "FirewallPolicy", "FirewallPolicyList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", "v1beta1", "FirewallPolicy", "FirewallPolicyList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -52,13 +49,10 @@ func (mg *Firewall) ResolveReferences( // ResolveReferences of this Firewall. for i3 := 0; i3 < len(mg.Spec.ForProvider.SubnetMapping); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SubnetMapping[i3].SubnetID), Extract: resource.ExtractResourceID(), @@ -75,15 +69,10 @@ func (mg *Firewall) ResolveReferences( // ResolveReferences of this Firewall. } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VPCID), Extract: reference.ExternalName(), @@ -98,11 +87,8 @@ func (mg *Firewall) ResolveReferences( // ResolveReferences of this Firewall. mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", - - "v1beta1", "FirewallPolicy", "FirewallPolicyList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", "v1beta1", "FirewallPolicy", "FirewallPolicyList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -122,13 +108,10 @@ func (mg *Firewall) ResolveReferences( // ResolveReferences of this Firewall. for i3 := 0; i3 < len(mg.Spec.InitProvider.SubnetMapping); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SubnetMapping[i3].SubnetID), Extract: resource.ExtractResourceID(), @@ -145,15 +128,10 @@ func (mg *Firewall) ResolveReferences( // ResolveReferences of this Firewall. } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.VPCID), Extract: reference.ExternalName(), @@ -175,7 +153,6 @@ func (mg *Firewall) ResolveReferences( // ResolveReferences of this Firewall. func (mg *FirewallPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -184,13 +161,10 @@ func (mg *FirewallPolicy) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.ForProvider.FirewallPolicy); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.FirewallPolicy[i3].StatefulRuleGroupReference); i4++ { { - m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", - - "v1beta1", "RuleGroup", "RuleGroupList") + m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", "v1beta1", "RuleGroup", "RuleGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.FirewallPolicy[i3].StatefulRuleGroupReference[i4].ResourceArn), Extract: common.ARNExtractor(), @@ -210,13 +184,10 @@ func (mg *FirewallPolicy) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.ForProvider.FirewallPolicy); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.FirewallPolicy[i3].StatelessRuleGroupReference); i4++ { { - m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", - - "v1beta1", "RuleGroup", "RuleGroupList") + m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", "v1beta1", "RuleGroup", "RuleGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.FirewallPolicy[i3].StatelessRuleGroupReference[i4].ResourceArn), Extract: common.ARNExtractor(), @@ -236,13 +207,10 @@ func (mg *FirewallPolicy) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.InitProvider.FirewallPolicy); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.FirewallPolicy[i3].StatefulRuleGroupReference); i4++ { { - m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", - - "v1beta1", "RuleGroup", "RuleGroupList") + m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", "v1beta1", "RuleGroup", "RuleGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.FirewallPolicy[i3].StatefulRuleGroupReference[i4].ResourceArn), Extract: common.ARNExtractor(), @@ -262,13 +230,10 @@ func (mg *FirewallPolicy) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.InitProvider.FirewallPolicy); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.FirewallPolicy[i3].StatelessRuleGroupReference); i4++ { { - m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", - - "v1beta1", "RuleGroup", "RuleGroupList") + m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", "v1beta1", "RuleGroup", "RuleGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.FirewallPolicy[i3].StatelessRuleGroupReference[i4].ResourceArn), Extract: common.ARNExtractor(), @@ -293,15 +258,12 @@ func (mg *FirewallPolicy) ResolveReferences(ctx context.Context, c client.Reader func (mg *LoggingConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", - - "v1beta1", "Firewall", "FirewallList") + m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", "v1beta1", "Firewall", "FirewallList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -320,9 +282,7 @@ func (mg *LoggingConfiguration) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.FirewallArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FirewallArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", - - "v1beta1", "Firewall", "FirewallList") + m, l, err = apisresolver.GetManagedResource("networkfirewall.aws.upbound.io", "v1beta1", "Firewall", "FirewallList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -348,7 +308,6 @@ func (mg *LoggingConfiguration) ResolveReferences(ctx context.Context, c client. func (mg *RuleGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -359,13 +318,10 @@ func (mg *RuleGroup) ResolveReferences(ctx context.Context, c client.Reader) err for i5 := 0; i5 < len(mg.Spec.ForProvider.RuleGroup[i3].ReferenceSets[i4].IPSetReferences); i5++ { for i6 := 0; i6 < len(mg.Spec.ForProvider.RuleGroup[i3].ReferenceSets[i4].IPSetReferences[i5].IPSetReference); i6++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RuleGroup[i3].ReferenceSets[i4].IPSetReferences[i5].IPSetReference[i6].ReferenceArn), Extract: resource.ExtractParamPath("arn", true), @@ -389,13 +345,10 @@ func (mg *RuleGroup) ResolveReferences(ctx context.Context, c client.Reader) err for i5 := 0; i5 < len(mg.Spec.InitProvider.RuleGroup[i3].ReferenceSets[i4].IPSetReferences); i5++ { for i6 := 0; i6 < len(mg.Spec.InitProvider.RuleGroup[i3].ReferenceSets[i4].IPSetReferences[i5].IPSetReference); i6++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "ManagedPrefixList", "ManagedPrefixListList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RuleGroup[i3].ReferenceSets[i4].IPSetReferences[i5].IPSetReference[i6].ReferenceArn), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/networkmanager/v1beta1/zz_generated.resolvers.go b/apis/networkmanager/v1beta1/zz_generated.resolvers.go index 8ff86e06ed..0ff385adaa 100644 --- a/apis/networkmanager/v1beta1/zz_generated.resolvers.go +++ b/apis/networkmanager/v1beta1/zz_generated.resolvers.go @@ -22,15 +22,12 @@ func (mg *AttachmentAccepter) ResolveReferences( // ResolveReferences of this At ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "VPCAttachment", "VPCAttachmentList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "VPCAttachment", "VPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -49,9 +46,7 @@ func (mg *AttachmentAccepter) ResolveReferences( // ResolveReferences of this At mg.Spec.ForProvider.AttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "VPCAttachment", "VPCAttachmentList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "VPCAttachment", "VPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -70,9 +65,7 @@ func (mg *AttachmentAccepter) ResolveReferences( // ResolveReferences of this At mg.Spec.ForProvider.AttachmentType = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AttachmentTypeRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "VPCAttachment", "VPCAttachmentList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "VPCAttachment", "VPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -91,9 +84,7 @@ func (mg *AttachmentAccepter) ResolveReferences( // ResolveReferences of this At mg.Spec.InitProvider.AttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.AttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "VPCAttachment", "VPCAttachmentList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "VPCAttachment", "VPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -119,15 +110,12 @@ func (mg *AttachmentAccepter) ResolveReferences( // ResolveReferences of this At func (mg *ConnectAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "CoreNetwork", "CoreNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "CoreNetwork", "CoreNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -146,9 +134,7 @@ func (mg *ConnectAttachment) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.CoreNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CoreNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "VPCAttachment", "VPCAttachmentList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "VPCAttachment", "VPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -167,9 +153,7 @@ func (mg *ConnectAttachment) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.EdgeLocation = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EdgeLocationRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "VPCAttachment", "VPCAttachmentList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "VPCAttachment", "VPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -188,9 +172,7 @@ func (mg *ConnectAttachment) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.TransportAttachmentID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransportAttachmentIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "CoreNetwork", "CoreNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "CoreNetwork", "CoreNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -209,9 +191,7 @@ func (mg *ConnectAttachment) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.InitProvider.CoreNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.CoreNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "VPCAttachment", "VPCAttachmentList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "VPCAttachment", "VPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -230,9 +210,7 @@ func (mg *ConnectAttachment) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.InitProvider.EdgeLocation = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.EdgeLocationRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "VPCAttachment", "VPCAttachmentList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "VPCAttachment", "VPCAttachmentList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -258,15 +236,12 @@ func (mg *ConnectAttachment) ResolveReferences(ctx context.Context, c client.Rea func (mg *Connection) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Device", "DeviceList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Device", "DeviceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -285,9 +260,7 @@ func (mg *Connection) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.ConnectedDeviceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConnectedDeviceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Device", "DeviceList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Device", "DeviceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -306,9 +279,7 @@ func (mg *Connection) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.DeviceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DeviceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -327,9 +298,7 @@ func (mg *Connection) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.GlobalNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GlobalNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Device", "DeviceList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Device", "DeviceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -348,9 +317,7 @@ func (mg *Connection) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.ConnectedDeviceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ConnectedDeviceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Device", "DeviceList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Device", "DeviceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -369,9 +336,7 @@ func (mg *Connection) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.DeviceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DeviceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -397,15 +362,12 @@ func (mg *Connection) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *CoreNetwork) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -424,9 +386,7 @@ func (mg *CoreNetwork) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.GlobalNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GlobalNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -452,15 +412,12 @@ func (mg *CoreNetwork) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *CustomerGatewayAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "CustomerGateway", "CustomerGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "CustomerGateway", "CustomerGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -479,9 +436,7 @@ func (mg *CustomerGatewayAssociation) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.CustomerGatewayArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CustomerGatewayArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Device", "DeviceList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Device", "DeviceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -500,9 +455,7 @@ func (mg *CustomerGatewayAssociation) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.DeviceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DeviceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -521,9 +474,7 @@ func (mg *CustomerGatewayAssociation) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.GlobalNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GlobalNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Device", "DeviceList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Device", "DeviceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -549,15 +500,12 @@ func (mg *CustomerGatewayAssociation) ResolveReferences(ctx context.Context, c c func (mg *Device) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -576,12 +524,9 @@ func (mg *Device) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.GlobalNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GlobalNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Site", "SiteList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Site", "SiteList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -598,9 +543,7 @@ func (mg *Device) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.SiteID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SiteIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -619,12 +562,9 @@ func (mg *Device) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.GlobalNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.GlobalNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Site", "SiteList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Site", "SiteList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -648,15 +588,12 @@ func (mg *Device) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *Link) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -675,12 +612,9 @@ func (mg *Link) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.GlobalNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GlobalNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Site", "SiteList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Site", "SiteList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -697,9 +631,7 @@ func (mg *Link) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.SiteID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SiteIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -718,12 +650,9 @@ func (mg *Link) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.GlobalNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.GlobalNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Site", "SiteList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Site", "SiteList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -747,15 +676,12 @@ func (mg *Link) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *LinkAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Device", "DeviceList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Device", "DeviceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -774,9 +700,7 @@ func (mg *LinkAssociation) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.DeviceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DeviceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -795,12 +719,9 @@ func (mg *LinkAssociation) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.GlobalNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GlobalNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Link", "LinkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Link", "LinkList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -824,15 +745,12 @@ func (mg *LinkAssociation) ResolveReferences(ctx context.Context, c client.Reade func (mg *Site) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -851,9 +769,7 @@ func (mg *Site) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.GlobalNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GlobalNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -879,15 +795,12 @@ func (mg *Site) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *TransitGatewayConnectPeerAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Device", "DeviceList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Device", "DeviceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -906,9 +819,7 @@ func (mg *TransitGatewayConnectPeerAssociation) ResolveReferences(ctx context.Co mg.Spec.ForProvider.DeviceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DeviceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -927,9 +838,7 @@ func (mg *TransitGatewayConnectPeerAssociation) ResolveReferences(ctx context.Co mg.Spec.ForProvider.GlobalNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GlobalNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGatewayConnectPeer", "TransitGatewayConnectPeerList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGatewayConnectPeer", "TransitGatewayConnectPeerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -948,9 +857,7 @@ func (mg *TransitGatewayConnectPeerAssociation) ResolveReferences(ctx context.Co mg.Spec.ForProvider.TransitGatewayConnectPeerArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TransitGatewayConnectPeerArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "Device", "DeviceList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "Device", "DeviceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -976,15 +883,12 @@ func (mg *TransitGatewayConnectPeerAssociation) ResolveReferences(ctx context.Co func (mg *TransitGatewayRegistration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "GlobalNetwork", "GlobalNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "GlobalNetwork", "GlobalNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1003,9 +907,7 @@ func (mg *TransitGatewayRegistration) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.GlobalNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.GlobalNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "TransitGateway", "TransitGatewayList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "TransitGateway", "TransitGatewayList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1031,16 +933,13 @@ func (mg *TransitGatewayRegistration) ResolveReferences(ctx context.Context, c c func (mg *VPCAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "CoreNetwork", "CoreNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "CoreNetwork", "CoreNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1059,9 +958,7 @@ func (mg *VPCAttachment) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.CoreNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CoreNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1080,13 +977,9 @@ func (mg *VPCAttachment) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.SubnetArns = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetArnsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1103,9 +996,7 @@ func (mg *VPCAttachment) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.VPCArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", - - "v1beta1", "CoreNetwork", "CoreNetworkList") + m, l, err = apisresolver.GetManagedResource("networkmanager.aws.upbound.io", "v1beta1", "CoreNetwork", "CoreNetworkList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1124,9 +1015,7 @@ func (mg *VPCAttachment) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.CoreNetworkID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.CoreNetworkIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1145,13 +1034,9 @@ func (mg *VPCAttachment) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.SubnetArns = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SubnetArnsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/opensearch/v1beta1/zz_generated.resolvers.go b/apis/opensearch/v1beta1/zz_generated.resolvers.go index edf22ea225..8cb4100374 100644 --- a/apis/opensearch/v1beta1/zz_generated.resolvers.go +++ b/apis/opensearch/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ import ( func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -30,14 +29,10 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.LogPublishingOptions); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LogPublishingOptions[i3].CloudwatchLogGroupArn), Extract: resource.ExtractParamPath("arn", true), @@ -55,14 +50,10 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.LogPublishingOptions); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("cloudwatchlogs.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LogPublishingOptions[i3].CloudwatchLogGroupArn), Extract: resource.ExtractParamPath("arn", true), @@ -86,18 +77,14 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *DomainPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("opensearch.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("opensearch.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -114,12 +101,9 @@ func (mg *DomainPolicy) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.DomainName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DomainNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("opensearch.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("opensearch.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -143,18 +127,14 @@ func (mg *DomainPolicy) ResolveReferences(ctx context.Context, c client.Reader) func (mg *DomainSAMLOptions) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("opensearch.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("opensearch.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -171,12 +151,9 @@ func (mg *DomainSAMLOptions) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.DomainName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DomainNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("opensearch.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("opensearch.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/opsworks/v1beta1/zz_generated.resolvers.go b/apis/opsworks/v1beta1/zz_generated.resolvers.go index 04872765a9..505b347c77 100644 --- a/apis/opsworks/v1beta1/zz_generated.resolvers.go +++ b/apis/opsworks/v1beta1/zz_generated.resolvers.go @@ -22,15 +22,12 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -49,9 +46,7 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -77,16 +72,13 @@ func (mg *Application) ResolveReferences( // ResolveReferences of this Applicati func (mg *CustomLayer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -105,9 +97,7 @@ func (mg *CustomLayer) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -126,9 +116,7 @@ func (mg *CustomLayer) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -147,9 +135,7 @@ func (mg *CustomLayer) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -175,16 +161,13 @@ func (mg *CustomLayer) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *EcsClusterLayer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -203,9 +186,7 @@ func (mg *EcsClusterLayer) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -224,9 +205,7 @@ func (mg *EcsClusterLayer) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.EcsClusterArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EcsClusterArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -245,9 +224,7 @@ func (mg *EcsClusterLayer) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -266,9 +243,7 @@ func (mg *EcsClusterLayer) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("ecs.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -287,9 +262,7 @@ func (mg *EcsClusterLayer) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.EcsClusterArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.EcsClusterArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -315,16 +288,13 @@ func (mg *EcsClusterLayer) ResolveReferences(ctx context.Context, c client.Reade func (mg *GangliaLayer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -343,9 +313,7 @@ func (mg *GangliaLayer) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -364,9 +332,7 @@ func (mg *GangliaLayer) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -385,9 +351,7 @@ func (mg *GangliaLayer) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -413,16 +377,13 @@ func (mg *GangliaLayer) ResolveReferences(ctx context.Context, c client.Reader) func (mg *HAProxyLayer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -441,9 +402,7 @@ func (mg *HAProxyLayer) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -462,9 +421,7 @@ func (mg *HAProxyLayer) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -483,9 +440,7 @@ func (mg *HAProxyLayer) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -511,16 +466,13 @@ func (mg *HAProxyLayer) ResolveReferences(ctx context.Context, c client.Reader) func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "CustomLayer", "CustomLayerList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "CustomLayer", "CustomLayerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -539,9 +491,7 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.LayerIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.LayerIdsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -560,9 +510,7 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -581,9 +529,7 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -602,9 +548,7 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "CustomLayer", "CustomLayerList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "CustomLayer", "CustomLayerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -623,9 +567,7 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.LayerIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.LayerIdsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -644,9 +586,7 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -665,9 +605,7 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -693,16 +631,13 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *JavaAppLayer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -721,9 +656,7 @@ func (mg *JavaAppLayer) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -742,9 +675,7 @@ func (mg *JavaAppLayer) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -763,9 +694,7 @@ func (mg *JavaAppLayer) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -791,16 +720,13 @@ func (mg *JavaAppLayer) ResolveReferences(ctx context.Context, c client.Reader) func (mg *MemcachedLayer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -819,9 +745,7 @@ func (mg *MemcachedLayer) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -840,9 +764,7 @@ func (mg *MemcachedLayer) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -861,9 +783,7 @@ func (mg *MemcachedLayer) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -889,16 +809,13 @@ func (mg *MemcachedLayer) ResolveReferences(ctx context.Context, c client.Reader func (mg *MySQLLayer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -917,9 +834,7 @@ func (mg *MySQLLayer) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -938,9 +853,7 @@ func (mg *MySQLLayer) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -959,9 +872,7 @@ func (mg *MySQLLayer) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -987,16 +898,13 @@ func (mg *MySQLLayer) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *NodeJSAppLayer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1015,9 +923,7 @@ func (mg *NodeJSAppLayer) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1036,9 +942,7 @@ func (mg *NodeJSAppLayer) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1057,9 +961,7 @@ func (mg *NodeJSAppLayer) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1085,16 +987,13 @@ func (mg *NodeJSAppLayer) ResolveReferences(ctx context.Context, c client.Reader func (mg *PHPAppLayer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1113,9 +1012,7 @@ func (mg *PHPAppLayer) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1134,9 +1031,7 @@ func (mg *PHPAppLayer) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1155,9 +1050,7 @@ func (mg *PHPAppLayer) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1183,15 +1076,12 @@ func (mg *PHPAppLayer) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1210,13 +1100,9 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1233,9 +1119,7 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.UserArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1254,13 +1138,9 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1284,18 +1164,14 @@ func (mg *Permission) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *RDSDBInstance) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1312,9 +1188,7 @@ func (mg *RDSDBInstance) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.RDSDBInstanceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RDSDBInstanceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1333,12 +1207,9 @@ func (mg *RDSDBInstance) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1355,9 +1226,7 @@ func (mg *RDSDBInstance) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.RDSDBInstanceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RDSDBInstanceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1383,16 +1252,13 @@ func (mg *RDSDBInstance) ResolveReferences(ctx context.Context, c client.Reader) func (mg *RailsAppLayer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1411,9 +1277,7 @@ func (mg *RailsAppLayer) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1432,9 +1296,7 @@ func (mg *RailsAppLayer) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1453,9 +1315,7 @@ func (mg *RailsAppLayer) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1481,15 +1341,12 @@ func (mg *RailsAppLayer) ResolveReferences(ctx context.Context, c client.Reader) func (mg *Stack) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "InstanceProfile", "InstanceProfileList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "InstanceProfile", "InstanceProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1508,9 +1365,7 @@ func (mg *Stack) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.DefaultInstanceProfileArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DefaultInstanceProfileArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1529,13 +1384,9 @@ func (mg *Stack) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.DefaultSubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DefaultSubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1552,13 +1403,9 @@ func (mg *Stack) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.ServiceRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServiceRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1575,9 +1422,7 @@ func (mg *Stack) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "InstanceProfile", "InstanceProfileList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "InstanceProfile", "InstanceProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1596,9 +1441,7 @@ func (mg *Stack) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.DefaultInstanceProfileArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DefaultInstanceProfileArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1617,13 +1460,9 @@ func (mg *Stack) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.DefaultSubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DefaultSubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1640,13 +1479,9 @@ func (mg *Stack) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.ServiceRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ServiceRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1670,16 +1505,13 @@ func (mg *Stack) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *StaticWebLayer) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1698,9 +1530,7 @@ func (mg *StaticWebLayer) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1719,9 +1549,7 @@ func (mg *StaticWebLayer) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.StackID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.StackIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1740,9 +1568,7 @@ func (mg *StaticWebLayer) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.CustomSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.CustomSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", - - "v1beta1", "Stack", "StackList") + m, l, err = apisresolver.GetManagedResource("opsworks.aws.upbound.io", "v1beta1", "Stack", "StackList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1768,19 +1594,14 @@ func (mg *StaticWebLayer) ResolveReferences(ctx context.Context, c client.Reader func (mg *UserProfile) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1797,13 +1618,9 @@ func (mg *UserProfile) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.UserArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/organizations/v1beta1/zz_generated.resolvers.go b/apis/organizations/v1beta1/zz_generated.resolvers.go index 6c9fd5e575..508c459096 100644 --- a/apis/organizations/v1beta1/zz_generated.resolvers.go +++ b/apis/organizations/v1beta1/zz_generated.resolvers.go @@ -20,15 +20,12 @@ func (mg *DelegatedAdministrator) ResolveReferences( // ResolveReferences of thi ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", - - "v1beta1", "Account", "AccountList") + m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", "v1beta1", "Account", "AccountList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -47,9 +44,7 @@ func (mg *DelegatedAdministrator) ResolveReferences( // ResolveReferences of thi mg.Spec.ForProvider.AccountID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AccountIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", - - "v1beta1", "Account", "AccountList") + m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", "v1beta1", "Account", "AccountList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -75,18 +70,14 @@ func (mg *DelegatedAdministrator) ResolveReferences( // ResolveReferences of thi func (mg *PolicyAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -103,12 +94,9 @@ func (mg *PolicyAttachment) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.PolicyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PolicyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/pinpoint/v1beta1/zz_generated.resolvers.go b/apis/pinpoint/v1beta1/zz_generated.resolvers.go index 0c5649489d..b042d53871 100644 --- a/apis/pinpoint/v1beta1/zz_generated.resolvers.go +++ b/apis/pinpoint/v1beta1/zz_generated.resolvers.go @@ -20,19 +20,14 @@ func (mg *SMSChannel) ResolveReferences( // ResolveReferences of this SMSChannel ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("pinpoint.aws.upbound.io", - - "v1beta1", "App", "AppList") + m, l, err = apisresolver.GetManagedResource("pinpoint.aws.upbound.io", "v1beta1", "App", "AppList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -49,13 +44,9 @@ func (mg *SMSChannel) ResolveReferences( // ResolveReferences of this SMSChannel mg.Spec.ForProvider.ApplicationID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ApplicationIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("pinpoint.aws.upbound.io", - - "v1beta1", "App", "AppList") + m, l, err = apisresolver.GetManagedResource("pinpoint.aws.upbound.io", "v1beta1", "App", "AppList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/qldb/v1beta1/zz_generated.resolvers.go b/apis/qldb/v1beta1/zz_generated.resolvers.go index 71b37b93de..32f16e41aa 100644 --- a/apis/qldb/v1beta1/zz_generated.resolvers.go +++ b/apis/qldb/v1beta1/zz_generated.resolvers.go @@ -13,28 +13,22 @@ import ( xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" common "github.com/upbound/provider-aws/config/common" - client "sigs.k8s.io/controller-runtime/pkg/client" - - // ResolveReferences of this Ledger. apisresolver "github.com/upbound/provider-aws/internal/apis" + client "sigs.k8s.io/controller-runtime/pkg/client" ) -func (mg *Ledger) ResolveReferences(ctx context.Context, c client.Reader) error { +func (mg *Ledger) ResolveReferences( // ResolveReferences of this Ledger. + ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -51,13 +45,9 @@ func (mg *Ledger) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.KMSKey = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -81,7 +71,6 @@ func (mg *Ledger) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -89,14 +78,10 @@ func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.KinesisConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KinesisConfiguration[i3].StreamArn), Extract: common.TerraformID(), @@ -113,13 +98,10 @@ func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("qldb.aws.upbound.io", - - "v1beta1", "Ledger", "LedgerList") + m, l, err = apisresolver.GetManagedResource("qldb.aws.upbound.io", "v1beta1", "Ledger", "LedgerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LedgerName), Extract: common.TerraformID(), @@ -134,13 +116,9 @@ func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.LedgerName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LedgerNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -159,14 +137,10 @@ func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.KinesisConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", - - "v1beta1", "Stream", "StreamList") + m, l, err = apisresolver.GetManagedResource("kinesis.aws.upbound.io", "v1beta1", "Stream", "StreamList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.KinesisConfiguration[i3].StreamArn), Extract: common.TerraformID(), @@ -183,13 +157,10 @@ func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("qldb.aws.upbound.io", - - "v1beta1", "Ledger", "LedgerList") + m, l, err = apisresolver.GetManagedResource("qldb.aws.upbound.io", "v1beta1", "Ledger", "LedgerList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LedgerName), Extract: common.TerraformID(), @@ -204,13 +175,9 @@ func (mg *Stream) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.LedgerName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.LedgerNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/ram/v1beta1/zz_generated.resolvers.go b/apis/ram/v1beta1/zz_generated.resolvers.go index 4e0b8de436..cad3773fad 100644 --- a/apis/ram/v1beta1/zz_generated.resolvers.go +++ b/apis/ram/v1beta1/zz_generated.resolvers.go @@ -21,15 +21,12 @@ func (mg *PrincipalAssociation) ResolveReferences( // ResolveReferences of this ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", - - "v1beta1", "Organization", "OrganizationList") + m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", "v1beta1", "Organization", "OrganizationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -48,9 +45,7 @@ func (mg *PrincipalAssociation) ResolveReferences( // ResolveReferences of this mg.Spec.ForProvider.Principal = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PrincipalRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ram.aws.upbound.io", - - "v1beta1", "ResourceShare", "ResourceShareList") + m, l, err = apisresolver.GetManagedResource("ram.aws.upbound.io", "v1beta1", "ResourceShare", "ResourceShareList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -69,9 +64,7 @@ func (mg *PrincipalAssociation) ResolveReferences( // ResolveReferences of this mg.Spec.ForProvider.ResourceShareArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceShareArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", - - "v1beta1", "Organization", "OrganizationList") + m, l, err = apisresolver.GetManagedResource("organizations.aws.upbound.io", "v1beta1", "Organization", "OrganizationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -90,9 +83,7 @@ func (mg *PrincipalAssociation) ResolveReferences( // ResolveReferences of this mg.Spec.InitProvider.Principal = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PrincipalRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ram.aws.upbound.io", - - "v1beta1", "ResourceShare", "ResourceShareList") + m, l, err = apisresolver.GetManagedResource("ram.aws.upbound.io", "v1beta1", "ResourceShare", "ResourceShareList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -118,15 +109,12 @@ func (mg *PrincipalAssociation) ResolveReferences( // ResolveReferences of this func (mg *ResourceAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ram.aws.upbound.io", - - "v1beta1", "ResourceShare", "ResourceShareList") + m, l, err = apisresolver.GetManagedResource("ram.aws.upbound.io", "v1beta1", "ResourceShare", "ResourceShareList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -145,9 +133,7 @@ func (mg *ResourceAssociation) ResolveReferences(ctx context.Context, c client.R mg.Spec.ForProvider.ResourceShareArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceShareArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ram.aws.upbound.io", - - "v1beta1", "ResourceShare", "ResourceShareList") + m, l, err = apisresolver.GetManagedResource("ram.aws.upbound.io", "v1beta1", "ResourceShare", "ResourceShareList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -173,17 +159,13 @@ func (mg *ResourceAssociation) ResolveReferences(ctx context.Context, c client.R func (mg *ResourceShareAccepter) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ram.aws.upbound.io", - - "v1beta1", "PrincipalAssociation", "PrincipalAssociationList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ram.aws.upbound.io", "v1beta1", "PrincipalAssociation", "PrincipalAssociationList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -201,11 +183,8 @@ func (mg *ResourceShareAccepter) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.ShareArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ShareArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ram.aws.upbound.io", - - "v1beta1", "PrincipalAssociation", "PrincipalAssociationList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("ram.aws.upbound.io", "v1beta1", "PrincipalAssociation", "PrincipalAssociationList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/rds/v1beta1/zz_generated.resolvers.go b/apis/rds/v1beta1/zz_generated.resolvers.go index 662b01ee47..cd5b8ccf0d 100644 --- a/apis/rds/v1beta1/zz_generated.resolvers.go +++ b/apis/rds/v1beta1/zz_generated.resolvers.go @@ -23,19 +23,15 @@ import ( func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -52,13 +48,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.DBSubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBSubnetGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -75,13 +67,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -100,13 +88,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.RestoreToPointInTime); i3++ { { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RestoreToPointInTime[i3].SourceClusterIdentifier), Extract: reference.ExternalName(), @@ -124,15 +109,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.S3Import); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.S3Import[i3].BucketName), Extract: reference.ExternalName(), @@ -149,13 +129,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.VPCSecurityGroupIds), Extract: reference.ExternalName(), @@ -170,12 +147,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -192,13 +166,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.DBSubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DBSubnetGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -215,13 +185,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -240,13 +206,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.RestoreToPointInTime); i3++ { { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RestoreToPointInTime[i3].SourceClusterIdentifier), Extract: reference.ExternalName(), @@ -264,15 +227,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.S3Import); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.S3Import[i3].BucketName), Extract: reference.ExternalName(), @@ -289,13 +247,10 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.VPCSecurityGroupIds), Extract: reference.ExternalName(), @@ -317,19 +272,14 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *ClusterActivityStream) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -346,9 +296,7 @@ func (mg *ClusterActivityStream) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -367,13 +315,9 @@ func (mg *ClusterActivityStream) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.ResourceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -390,9 +334,7 @@ func (mg *ClusterActivityStream) ResolveReferences(ctx context.Context, c client mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -418,15 +360,12 @@ func (mg *ClusterActivityStream) ResolveReferences(ctx context.Context, c client func (mg *ClusterEndpoint) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -445,9 +384,7 @@ func (mg *ClusterEndpoint) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.ClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -473,15 +410,12 @@ func (mg *ClusterEndpoint) ResolveReferences(ctx context.Context, c client.Reade func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -500,9 +434,7 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.ClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "ParameterGroup", "ParameterGroupList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "ParameterGroup", "ParameterGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -521,12 +453,9 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.DBParameterGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBParameterGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -543,13 +472,9 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.DBSubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBSubnetGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -566,13 +491,9 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.MonitoringRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.MonitoringRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -589,9 +510,7 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.PerformanceInsightsKMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PerformanceInsightsKMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -610,9 +529,7 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.ClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "ParameterGroup", "ParameterGroupList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "ParameterGroup", "ParameterGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -631,12 +548,9 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.DBParameterGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DBParameterGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -653,13 +567,9 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.DBSubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DBSubnetGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -676,13 +586,9 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.MonitoringRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.MonitoringRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -706,15 +612,12 @@ func (mg *ClusterInstance) ResolveReferences(ctx context.Context, c client.Reade func (mg *ClusterRoleAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -733,13 +636,9 @@ func (mg *ClusterRoleAssociation) ResolveReferences(ctx context.Context, c clien mg.Spec.ForProvider.DBClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -756,9 +655,7 @@ func (mg *ClusterRoleAssociation) ResolveReferences(ctx context.Context, c clien mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -777,13 +674,9 @@ func (mg *ClusterRoleAssociation) ResolveReferences(ctx context.Context, c clien mg.Spec.InitProvider.DBClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DBClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -807,15 +700,12 @@ func (mg *ClusterRoleAssociation) ResolveReferences(ctx context.Context, c clien func (mg *ClusterSnapshot) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -834,9 +724,7 @@ func (mg *ClusterSnapshot) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.DBClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -862,19 +750,14 @@ func (mg *ClusterSnapshot) ResolveReferences(ctx context.Context, c client.Reade func (mg *DBInstanceAutomatedBackupsReplication) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -891,12 +774,9 @@ func (mg *DBInstanceAutomatedBackupsReplication) ResolveReferences(ctx context.C mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -913,13 +793,9 @@ func (mg *DBInstanceAutomatedBackupsReplication) ResolveReferences(ctx context.C mg.Spec.ForProvider.SourceDBInstanceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceDBInstanceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -936,12 +812,9 @@ func (mg *DBInstanceAutomatedBackupsReplication) ResolveReferences(ctx context.C mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -965,19 +838,14 @@ func (mg *DBInstanceAutomatedBackupsReplication) ResolveReferences(ctx context.C func (mg *DBSnapshotCopy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -994,12 +862,9 @@ func (mg *DBSnapshotCopy) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Snapshot", "SnapshotList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Snapshot", "SnapshotList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1016,13 +881,9 @@ func (mg *DBSnapshotCopy) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.SourceDBSnapshotIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceDBSnapshotIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1039,12 +900,9 @@ func (mg *DBSnapshotCopy) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Snapshot", "SnapshotList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Snapshot", "SnapshotList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1068,19 +926,14 @@ func (mg *DBSnapshotCopy) ResolveReferences(ctx context.Context, c client.Reader func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1097,13 +950,9 @@ func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.SnsTopic = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SnsTopicRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1127,15 +976,12 @@ func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Rea func (mg *GlobalCluster) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1154,9 +1000,7 @@ func (mg *GlobalCluster) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.SourceDBClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceDBClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1182,19 +1026,15 @@ func (mg *GlobalCluster) ResolveReferences(ctx context.Context, c client.Reader) func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1211,13 +1051,9 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.DBSubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBSubnetGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1234,13 +1070,9 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1257,13 +1089,9 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.MasterUserSecretKMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.MasterUserSecretKMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1280,9 +1108,7 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.MonitoringRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.MonitoringRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "ParameterGroup", "ParameterGroupList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "ParameterGroup", "ParameterGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1301,12 +1127,9 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.ParameterGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ParameterGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1323,9 +1146,7 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.ReplicateSourceDB = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ReplicateSourceDBRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1344,12 +1165,9 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "SubnetGroup", "SubnetGroupList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "SubnetGroup", "SubnetGroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1366,13 +1184,9 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.DBSubnetGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DBSubnetGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1389,13 +1203,9 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1412,13 +1222,9 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.MasterUserSecretKMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.MasterUserSecretKMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1435,9 +1241,7 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.MonitoringRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.MonitoringRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "ParameterGroup", "ParameterGroupList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "ParameterGroup", "ParameterGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1456,12 +1260,9 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.ParameterGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ParameterGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1478,9 +1279,7 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.InitProvider.ReplicateSourceDB = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ReplicateSourceDBRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1506,18 +1305,14 @@ func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *InstanceRoleAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1534,13 +1329,9 @@ func (mg *InstanceRoleAssociation) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.DBInstanceIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBInstanceIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1557,12 +1348,9 @@ func (mg *InstanceRoleAssociation) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1579,13 +1367,9 @@ func (mg *InstanceRoleAssociation) ResolveReferences(ctx context.Context, c clie mg.Spec.InitProvider.DBInstanceIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DBInstanceIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1609,7 +1393,6 @@ func (mg *InstanceRoleAssociation) ResolveReferences(ctx context.Context, c clie func (mg *Proxy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -1618,13 +1401,10 @@ func (mg *Proxy) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.ForProvider.Auth); i3++ { { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Auth[i3].SecretArn), Extract: resource.ExtractParamPath("arn", true), @@ -1641,15 +1421,10 @@ func (mg *Proxy) ResolveReferences(ctx context.Context, c client.Reader) error { } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RoleArn), Extract: common.ARNExtractor(), @@ -1664,9 +1439,7 @@ func (mg *Proxy) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1687,13 +1460,10 @@ func (mg *Proxy) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.InitProvider.Auth); i3++ { { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Auth[i3].SecretArn), Extract: resource.ExtractParamPath("arn", true), @@ -1710,15 +1480,10 @@ func (mg *Proxy) ResolveReferences(ctx context.Context, c client.Reader) error { } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RoleArn), Extract: common.ARNExtractor(), @@ -1733,9 +1498,7 @@ func (mg *Proxy) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1761,19 +1524,14 @@ func (mg *Proxy) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *ProxyDefaultTargetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Proxy", "ProxyList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Proxy", "ProxyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1790,13 +1548,9 @@ func (mg *ProxyDefaultTargetGroup) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.DBProxyName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBProxyNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Proxy", "ProxyList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Proxy", "ProxyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1820,20 +1574,15 @@ func (mg *ProxyDefaultTargetGroup) ResolveReferences(ctx context.Context, c clie func (mg *ProxyEndpoint) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Proxy", "ProxyList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Proxy", "ProxyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1850,9 +1599,7 @@ func (mg *ProxyEndpoint) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.DBProxyName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBProxyNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1871,9 +1618,7 @@ func (mg *ProxyEndpoint) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1899,18 +1644,14 @@ func (mg *ProxyEndpoint) ResolveReferences(ctx context.Context, c client.Reader) func (mg *ProxyTarget) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1927,13 +1668,9 @@ func (mg *ProxyTarget) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.DBInstanceIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBInstanceIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Proxy", "ProxyList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Proxy", "ProxyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1950,12 +1687,9 @@ func (mg *ProxyTarget) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.DBProxyName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBProxyNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1972,13 +1706,9 @@ func (mg *ProxyTarget) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.InitProvider.DBInstanceIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DBInstanceIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Proxy", "ProxyList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Proxy", "ProxyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2002,18 +1732,14 @@ func (mg *ProxyTarget) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *Snapshot) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2030,12 +1756,9 @@ func (mg *Snapshot) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.DBInstanceIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DBInstanceIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", - - "v1beta1", "Instance", "InstanceList") + m, l, err = apisresolver.GetManagedResource("rds.aws.upbound.io", "v1beta1", "Instance", "InstanceList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -2059,15 +1782,12 @@ func (mg *Snapshot) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -2086,9 +1806,7 @@ func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/redshift/v1beta1/zz_generated.resolvers.go b/apis/redshift/v1beta1/zz_generated.resolvers.go index 1b1f6ad5e9..8ca687a6a9 100644 --- a/apis/redshift/v1beta1/zz_generated.resolvers.go +++ b/apis/redshift/v1beta1/zz_generated.resolvers.go @@ -23,20 +23,15 @@ import ( func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -53,13 +48,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.DefaultIAMRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DefaultIAMRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -76,13 +67,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.IAMRoles = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.IAMRoleRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -99,9 +86,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -120,13 +105,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -143,13 +124,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.DefaultIAMRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DefaultIAMRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -166,13 +143,9 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.IAMRoles = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.IAMRoleRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -189,9 +162,7 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -217,19 +188,14 @@ func (mg *Cluster) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -246,13 +212,9 @@ func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.SnsTopicArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SnsTopicArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -276,19 +238,14 @@ func (mg *EventSubscription) ResolveReferences(ctx context.Context, c client.Rea func (mg *ScheduledAction) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -305,13 +262,9 @@ func (mg *ScheduledAction) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.IAMRole = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IAMRoleRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -335,19 +288,14 @@ func (mg *ScheduledAction) ResolveReferences(ctx context.Context, c client.Reade func (mg *SnapshotCopyGrant) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -364,13 +312,9 @@ func (mg *SnapshotCopyGrant) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -394,18 +338,14 @@ func (mg *SnapshotCopyGrant) ResolveReferences(ctx context.Context, c client.Rea func (mg *SnapshotScheduleAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -422,9 +362,7 @@ func (mg *SnapshotScheduleAssociation) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.ClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", - - "v1beta1", "SnapshotSchedule", "SnapshotScheduleList") + m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", "v1beta1", "SnapshotSchedule", "SnapshotScheduleList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -443,12 +381,9 @@ func (mg *SnapshotScheduleAssociation) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.ScheduleIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ScheduleIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -465,9 +400,7 @@ func (mg *SnapshotScheduleAssociation) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.ClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", - - "v1beta1", "SnapshotSchedule", "SnapshotScheduleList") + m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", "v1beta1", "SnapshotSchedule", "SnapshotScheduleList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -493,15 +426,12 @@ func (mg *SnapshotScheduleAssociation) ResolveReferences(ctx context.Context, c func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -520,9 +450,7 @@ func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -548,18 +476,14 @@ func (mg *SubnetGroup) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *UsageLimit) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -576,12 +500,9 @@ func (mg *UsageLimit) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.ClusterIdentifier = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterIdentifierRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") + m, l, err = apisresolver.GetManagedResource("redshift.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/redshiftserverless/v1beta1/zz_generated.resolvers.go b/apis/redshiftserverless/v1beta1/zz_generated.resolvers.go index 93664a88b2..de589ffc00 100644 --- a/apis/redshiftserverless/v1beta1/zz_generated.resolvers.go +++ b/apis/redshiftserverless/v1beta1/zz_generated.resolvers.go @@ -22,15 +22,12 @@ func (mg *EndpointAccess) ResolveReferences( // ResolveReferences of this Endpoi ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -49,9 +46,7 @@ func (mg *EndpointAccess) ResolveReferences( // ResolveReferences of this Endpoi mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -70,9 +65,7 @@ func (mg *EndpointAccess) ResolveReferences( // ResolveReferences of this Endpoi mg.Spec.ForProvider.VPCSecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.VPCSecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -91,9 +84,7 @@ func (mg *EndpointAccess) ResolveReferences( // ResolveReferences of this Endpoi mg.Spec.InitProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -119,20 +110,15 @@ func (mg *EndpointAccess) ResolveReferences( // ResolveReferences of this Endpoi func (mg *RedshiftServerlessNamespace) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -149,13 +135,9 @@ func (mg *RedshiftServerlessNamespace) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.DefaultIAMRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DefaultIAMRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -172,13 +154,9 @@ func (mg *RedshiftServerlessNamespace) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.IAMRoles = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.IAMRoleRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -195,13 +173,9 @@ func (mg *RedshiftServerlessNamespace) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -218,13 +192,9 @@ func (mg *RedshiftServerlessNamespace) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.DefaultIAMRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DefaultIAMRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -241,13 +211,9 @@ func (mg *RedshiftServerlessNamespace) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.IAMRoles = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.IAMRoleRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -271,15 +237,12 @@ func (mg *RedshiftServerlessNamespace) ResolveReferences(ctx context.Context, c func (mg *ResourcePolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("redshiftserverless.aws.upbound.io", - - "v1beta1", "Snapshot", "SnapshotList") + m, l, err = apisresolver.GetManagedResource("redshiftserverless.aws.upbound.io", "v1beta1", "Snapshot", "SnapshotList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -298,9 +261,7 @@ func (mg *ResourcePolicy) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.ResourceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("redshiftserverless.aws.upbound.io", - - "v1beta1", "Snapshot", "SnapshotList") + m, l, err = apisresolver.GetManagedResource("redshiftserverless.aws.upbound.io", "v1beta1", "Snapshot", "SnapshotList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -326,15 +287,12 @@ func (mg *ResourcePolicy) ResolveReferences(ctx context.Context, c client.Reader func (mg *Snapshot) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("redshiftserverless.aws.upbound.io", - - "v1beta1", "Workgroup", "WorkgroupList") + m, l, err = apisresolver.GetManagedResource("redshiftserverless.aws.upbound.io", "v1beta1", "Workgroup", "WorkgroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -353,9 +311,7 @@ func (mg *Snapshot) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.NamespaceName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NamespaceNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("redshiftserverless.aws.upbound.io", - - "v1beta1", "Workgroup", "WorkgroupList") + m, l, err = apisresolver.GetManagedResource("redshiftserverless.aws.upbound.io", "v1beta1", "Workgroup", "WorkgroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -381,15 +337,12 @@ func (mg *Snapshot) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *UsageLimit) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("redshiftserverless.aws.upbound.io", - - "v1beta1", "Workgroup", "WorkgroupList") + m, l, err = apisresolver.GetManagedResource("redshiftserverless.aws.upbound.io", "v1beta1", "Workgroup", "WorkgroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -408,9 +361,7 @@ func (mg *UsageLimit) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.ResourceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("redshiftserverless.aws.upbound.io", - - "v1beta1", "Workgroup", "WorkgroupList") + m, l, err = apisresolver.GetManagedResource("redshiftserverless.aws.upbound.io", "v1beta1", "Workgroup", "WorkgroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -436,15 +387,12 @@ func (mg *UsageLimit) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *Workgroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -463,9 +411,7 @@ func (mg *Workgroup) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -484,9 +430,7 @@ func (mg *Workgroup) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -505,9 +449,7 @@ func (mg *Workgroup) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.InitProvider.SecurityGroupIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SecurityGroupIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/rolesanywhere/v1beta1/zz_generated.resolvers.go b/apis/rolesanywhere/v1beta1/zz_generated.resolvers.go index 0ff1948932..0991e1ea1b 100644 --- a/apis/rolesanywhere/v1beta1/zz_generated.resolvers.go +++ b/apis/rolesanywhere/v1beta1/zz_generated.resolvers.go @@ -22,19 +22,14 @@ import ( func (mg *Profile) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ @@ -51,13 +46,9 @@ func (mg *Profile) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.RoleArns = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.RoleArnsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ diff --git a/apis/route53/v1beta1/zz_generated.resolvers.go b/apis/route53/v1beta1/zz_generated.resolvers.go index 7afa4a1911..bc5390b761 100644 --- a/apis/route53/v1beta1/zz_generated.resolvers.go +++ b/apis/route53/v1beta1/zz_generated.resolvers.go @@ -21,15 +21,12 @@ func (mg *HealthCheck) ResolveReferences( // ResolveReferences of this HealthChe ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cloudwatch.aws.upbound.io", - - "v1beta1", "MetricAlarm", "MetricAlarmList") + m, l, err = apisresolver.GetManagedResource("cloudwatch.aws.upbound.io", "v1beta1", "MetricAlarm", "MetricAlarmList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -48,9 +45,7 @@ func (mg *HealthCheck) ResolveReferences( // ResolveReferences of this HealthChe mg.Spec.ForProvider.CloudwatchAlarmName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CloudwatchAlarmNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudwatch.aws.upbound.io", - - "v1beta1", "MetricAlarm", "MetricAlarmList") + m, l, err = apisresolver.GetManagedResource("cloudwatch.aws.upbound.io", "v1beta1", "MetricAlarm", "MetricAlarmList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -76,15 +71,12 @@ func (mg *HealthCheck) ResolveReferences( // ResolveReferences of this HealthChe func (mg *HostedZoneDNSSEC) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "Zone", "ZoneList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "Zone", "ZoneList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -103,9 +95,7 @@ func (mg *HostedZoneDNSSEC) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.HostedZoneID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.HostedZoneIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "Zone", "ZoneList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "Zone", "ZoneList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -131,15 +121,12 @@ func (mg *HostedZoneDNSSEC) ResolveReferences(ctx context.Context, c client.Read func (mg *Record) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "HealthCheck", "HealthCheckList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "HealthCheck", "HealthCheckList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -158,9 +145,7 @@ func (mg *Record) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.HealthCheckID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.HealthCheckIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "Zone", "ZoneList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "Zone", "ZoneList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -179,9 +164,7 @@ func (mg *Record) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.ZoneID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ZoneIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "HealthCheck", "HealthCheckList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "HealthCheck", "HealthCheckList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -200,9 +183,7 @@ func (mg *Record) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.HealthCheckID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.HealthCheckIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "Zone", "ZoneList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "Zone", "ZoneList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -228,19 +209,14 @@ func (mg *Record) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *ResolverConfig) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -257,13 +233,9 @@ func (mg *ResolverConfig) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -287,15 +259,12 @@ func (mg *ResolverConfig) ResolveReferences(ctx context.Context, c client.Reader func (mg *TrafficPolicyInstance) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "Zone", "ZoneList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "Zone", "ZoneList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -314,9 +283,7 @@ func (mg *TrafficPolicyInstance) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.HostedZoneID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.HostedZoneIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "TrafficPolicy", "TrafficPolicyList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "TrafficPolicy", "TrafficPolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -335,9 +302,7 @@ func (mg *TrafficPolicyInstance) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.TrafficPolicyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TrafficPolicyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "Zone", "ZoneList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "Zone", "ZoneList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -356,9 +321,7 @@ func (mg *TrafficPolicyInstance) ResolveReferences(ctx context.Context, c client mg.Spec.InitProvider.HostedZoneID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.HostedZoneIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "TrafficPolicy", "TrafficPolicyList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "TrafficPolicy", "TrafficPolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -384,19 +347,14 @@ func (mg *TrafficPolicyInstance) ResolveReferences(ctx context.Context, c client func (mg *VPCAssociationAuthorization) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -413,9 +371,7 @@ func (mg *VPCAssociationAuthorization) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "Zone", "ZoneList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "Zone", "ZoneList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -434,13 +390,9 @@ func (mg *VPCAssociationAuthorization) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.ZoneID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ZoneIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -457,9 +409,7 @@ func (mg *VPCAssociationAuthorization) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "Zone", "ZoneList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "Zone", "ZoneList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -485,15 +435,12 @@ func (mg *VPCAssociationAuthorization) ResolveReferences(ctx context.Context, c func (mg *Zone) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "DelegationSet", "DelegationSetList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "DelegationSet", "DelegationSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -514,15 +461,10 @@ func (mg *Zone) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.ForProvider.VPC); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VPC[i3].VPCID), Extract: resource.ExtractResourceID(), @@ -539,13 +481,10 @@ func (mg *Zone) ResolveReferences(ctx context.Context, c client.Reader) error { } { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "DelegationSet", "DelegationSetList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "DelegationSet", "DelegationSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DelegationSetID), Extract: reference.ExternalName(), @@ -562,15 +501,10 @@ func (mg *Zone) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.InitProvider.VPC); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.VPC[i3].VPCID), Extract: resource.ExtractResourceID(), @@ -594,19 +528,14 @@ func (mg *Zone) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *ZoneAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -623,9 +552,7 @@ func (mg *ZoneAssociation) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "Zone", "ZoneList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "Zone", "ZoneList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -644,13 +571,9 @@ func (mg *ZoneAssociation) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.ZoneID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ZoneIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -667,9 +590,7 @@ func (mg *ZoneAssociation) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", - - "v1beta1", "Zone", "ZoneList") + m, l, err = apisresolver.GetManagedResource("route53.aws.upbound.io", "v1beta1", "Zone", "ZoneList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/route53recoverycontrolconfig/v1beta1/zz_generated.resolvers.go b/apis/route53recoverycontrolconfig/v1beta1/zz_generated.resolvers.go index aad405fd50..75007c0199 100644 --- a/apis/route53recoverycontrolconfig/v1beta1/zz_generated.resolvers.go +++ b/apis/route53recoverycontrolconfig/v1beta1/zz_generated.resolvers.go @@ -20,17 +20,13 @@ func (mg *ControlPanel) ResolveReferences( // ResolveReferences of this ControlP ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -48,11 +44,8 @@ func (mg *ControlPanel) ResolveReferences( // ResolveReferences of this ControlP mg.Spec.ForProvider.ClusterArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -77,17 +70,13 @@ func (mg *ControlPanel) ResolveReferences( // ResolveReferences of this ControlP func (mg *RoutingControl) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -105,9 +94,7 @@ func (mg *RoutingControl) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.ClusterArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ClusterArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", - - "v1beta1", "ControlPanel", "ControlPanelList") + m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", "v1beta1", "ControlPanel", "ControlPanelList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -126,11 +113,8 @@ func (mg *RoutingControl) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.ControlPanelArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ControlPanelArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", - - "v1beta1", "Cluster", "ClusterList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", "v1beta1", "Cluster", "ClusterList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -148,9 +132,7 @@ func (mg *RoutingControl) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.ClusterArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ClusterArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", - - "v1beta1", "ControlPanel", "ControlPanelList") + m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", "v1beta1", "ControlPanel", "ControlPanelList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -176,17 +158,13 @@ func (mg *RoutingControl) ResolveReferences(ctx context.Context, c client.Reader func (mg *SafetyRule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", - - "v1beta1", "RoutingControl", "RoutingControlList", - ) + m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", "v1beta1", "RoutingControl", "RoutingControlList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -205,9 +183,7 @@ func (mg *SafetyRule) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.AssertedControls = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.AssertedControlsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", - - "v1beta1", "ControlPanel", "ControlPanelList") + m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", "v1beta1", "ControlPanel", "ControlPanelList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -226,10 +202,7 @@ func (mg *SafetyRule) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.ControlPanelArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ControlPanelArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", - - "v1beta1", "RoutingControl", "RoutingControlList", - ) + m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", "v1beta1", "RoutingControl", "RoutingControlList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -248,9 +221,7 @@ func (mg *SafetyRule) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.AssertedControls = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.AssertedControlsRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", - - "v1beta1", "ControlPanel", "ControlPanelList") + m, l, err = apisresolver.GetManagedResource("route53recoverycontrolconfig.aws.upbound.io", "v1beta1", "ControlPanel", "ControlPanelList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/route53recoveryreadiness/v1beta1/zz_generated.resolvers.go b/apis/route53recoveryreadiness/v1beta1/zz_generated.resolvers.go index c8b1da695f..9115c0ad50 100644 --- a/apis/route53recoveryreadiness/v1beta1/zz_generated.resolvers.go +++ b/apis/route53recoveryreadiness/v1beta1/zz_generated.resolvers.go @@ -21,7 +21,6 @@ func (mg *ResourceSet) ResolveReferences( // ResolveReferences of this ResourceS ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -29,13 +28,10 @@ func (mg *ResourceSet) ResolveReferences( // ResolveReferences of this ResourceS for i3 := 0; i3 < len(mg.Spec.ForProvider.Resources); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatch.aws.upbound.io", - - "v1beta1", "MetricAlarm", "MetricAlarmList") + m, l, err = apisresolver.GetManagedResource("cloudwatch.aws.upbound.io", "v1beta1", "MetricAlarm", "MetricAlarmList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Resources[i3].ResourceArn), Extract: resource.ExtractParamPath("arn", true), @@ -53,13 +49,10 @@ func (mg *ResourceSet) ResolveReferences( // ResolveReferences of this ResourceS } for i3 := 0; i3 < len(mg.Spec.InitProvider.Resources); i3++ { { - m, l, err = apisresolver.GetManagedResource("cloudwatch.aws.upbound.io", - - "v1beta1", "MetricAlarm", "MetricAlarmList") + m, l, err = apisresolver.GetManagedResource("cloudwatch.aws.upbound.io", "v1beta1", "MetricAlarm", "MetricAlarmList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Resources[i3].ResourceArn), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/route53resolver/v1beta1/zz_generated.resolvers.go b/apis/route53resolver/v1beta1/zz_generated.resolvers.go index 8f2534ff80..6141205fb1 100644 --- a/apis/route53resolver/v1beta1/zz_generated.resolvers.go +++ b/apis/route53resolver/v1beta1/zz_generated.resolvers.go @@ -22,7 +22,6 @@ import ( func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -31,13 +30,10 @@ func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.IPAddress); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.IPAddress[i3].SubnetID), Extract: resource.ExtractResourceID(), @@ -54,13 +50,10 @@ func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) erro } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.SecurityGroupIds), Extract: reference.ExternalName(), @@ -77,13 +70,10 @@ func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.InitProvider.IPAddress); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.IPAddress[i3].SubnetID), Extract: resource.ExtractResourceID(), @@ -100,13 +90,10 @@ func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) erro } { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.SecurityGroupIds), Extract: reference.ExternalName(), @@ -128,15 +115,12 @@ func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("route53resolver.aws.upbound.io", - - "v1beta1", "Endpoint", "EndpointList") + m, l, err = apisresolver.GetManagedResource("route53resolver.aws.upbound.io", "v1beta1", "Endpoint", "EndpointList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -155,9 +139,7 @@ func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.ResolverEndpointID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResolverEndpointIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53resolver.aws.upbound.io", - - "v1beta1", "Endpoint", "EndpointList") + m, l, err = apisresolver.GetManagedResource("route53resolver.aws.upbound.io", "v1beta1", "Endpoint", "EndpointList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -183,18 +165,14 @@ func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *RuleAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("route53resolver.aws.upbound.io", - - "v1beta1", "Rule", "RuleList") + m, l, err = apisresolver.GetManagedResource("route53resolver.aws.upbound.io", "v1beta1", "Rule", "RuleList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -211,13 +189,9 @@ func (mg *RuleAssociation) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.ResolverRuleID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResolverRuleIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -234,12 +208,9 @@ func (mg *RuleAssociation) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("route53resolver.aws.upbound.io", - - "v1beta1", "Rule", "RuleList") + m, l, err = apisresolver.GetManagedResource("route53resolver.aws.upbound.io", "v1beta1", "Rule", "RuleList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -256,13 +227,9 @@ func (mg *RuleAssociation) ResolveReferences(ctx context.Context, c client.Reade mg.Spec.InitProvider.ResolverRuleID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ResolverRuleIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/rum/v1beta1/zz_generated.resolvers.go b/apis/rum/v1beta1/zz_generated.resolvers.go index f1306e09a6..977fffc9c5 100644 --- a/apis/rum/v1beta1/zz_generated.resolvers.go +++ b/apis/rum/v1beta1/zz_generated.resolvers.go @@ -21,18 +21,14 @@ func (mg *MetricsDestination) ResolveReferences( // ResolveReferences of this Me ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("rum.aws.upbound.io", - - "v1beta1", "AppMonitor", "AppMonitorList") + m, l, err = apisresolver.GetManagedResource("rum.aws.upbound.io", "v1beta1", "AppMonitor", "AppMonitorList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -49,13 +45,9 @@ func (mg *MetricsDestination) ResolveReferences( // ResolveReferences of this Me mg.Spec.ForProvider.AppMonitorName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AppMonitorNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -72,12 +64,9 @@ func (mg *MetricsDestination) ResolveReferences( // ResolveReferences of this Me mg.Spec.ForProvider.IAMRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IAMRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("rum.aws.upbound.io", - - "v1beta1", "AppMonitor", "AppMonitorList") + m, l, err = apisresolver.GetManagedResource("rum.aws.upbound.io", "v1beta1", "AppMonitor", "AppMonitorList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -94,13 +83,9 @@ func (mg *MetricsDestination) ResolveReferences( // ResolveReferences of this Me mg.Spec.InitProvider.AppMonitorName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.AppMonitorNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/s3/v1beta1/zz_generated.resolvers.go b/apis/s3/v1beta1/zz_generated.resolvers.go index d4640c0c72..92768ad391 100644 --- a/apis/s3/v1beta1/zz_generated.resolvers.go +++ b/apis/s3/v1beta1/zz_generated.resolvers.go @@ -21,19 +21,14 @@ func (mg *BucketACL) ResolveReferences( // ResolveReferences of this BucketACL. ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,13 +45,9 @@ func (mg *BucketACL) ResolveReferences( // ResolveReferences of this BucketACL. mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -80,19 +71,14 @@ func (mg *BucketACL) ResolveReferences( // ResolveReferences of this BucketACL. func (mg *BucketAccelerateConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -109,13 +95,9 @@ func (mg *BucketAccelerateConfiguration) ResolveReferences(ctx context.Context, mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -139,19 +121,14 @@ func (mg *BucketAccelerateConfiguration) ResolveReferences(ctx context.Context, func (mg *BucketAnalyticsConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -173,15 +150,10 @@ func (mg *BucketAnalyticsConfiguration) ResolveReferences(ctx context.Context, c for i5 := 0; i5 < len(mg.Spec.ForProvider.StorageClassAnalysis[i3].DataExport[i4].Destination); i5++ { for i6 := 0; i6 < len(mg.Spec.ForProvider.StorageClassAnalysis[i3].DataExport[i4].Destination[i5].S3BucketDestination); i6++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.StorageClassAnalysis[i3].DataExport[i4].Destination[i5].S3BucketDestination[i6].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -201,15 +173,10 @@ func (mg *BucketAnalyticsConfiguration) ResolveReferences(ctx context.Context, c } } { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Bucket), Extract: resource.ExtractResourceID(), @@ -229,15 +196,10 @@ func (mg *BucketAnalyticsConfiguration) ResolveReferences(ctx context.Context, c for i5 := 0; i5 < len(mg.Spec.InitProvider.StorageClassAnalysis[i3].DataExport[i4].Destination); i5++ { for i6 := 0; i6 < len(mg.Spec.InitProvider.StorageClassAnalysis[i3].DataExport[i4].Destination[i5].S3BucketDestination); i6++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.StorageClassAnalysis[i3].DataExport[i4].Destination[i5].S3BucketDestination[i6].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -264,19 +226,14 @@ func (mg *BucketAnalyticsConfiguration) ResolveReferences(ctx context.Context, c func (mg *BucketCorsConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -293,13 +250,9 @@ func (mg *BucketCorsConfiguration) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -323,19 +276,14 @@ func (mg *BucketCorsConfiguration) ResolveReferences(ctx context.Context, c clie func (mg *BucketIntelligentTieringConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -352,13 +300,9 @@ func (mg *BucketIntelligentTieringConfiguration) ResolveReferences(ctx context.C mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -382,19 +326,14 @@ func (mg *BucketIntelligentTieringConfiguration) ResolveReferences(ctx context.C func (mg *BucketInventory) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -414,15 +353,10 @@ func (mg *BucketInventory) ResolveReferences(ctx context.Context, c client.Reade for i3 := 0; i3 < len(mg.Spec.ForProvider.Destination); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Destination[i3].Bucket); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Destination[i3].Bucket[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -440,15 +374,10 @@ func (mg *BucketInventory) ResolveReferences(ctx context.Context, c client.Reade } } { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Bucket), Extract: resource.ExtractResourceID(), @@ -466,15 +395,10 @@ func (mg *BucketInventory) ResolveReferences(ctx context.Context, c client.Reade for i3 := 0; i3 < len(mg.Spec.InitProvider.Destination); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Destination[i3].Bucket); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Destination[i3].Bucket[i4].BucketArn), Extract: resource.ExtractParamPath("arn", true), @@ -499,19 +423,14 @@ func (mg *BucketInventory) ResolveReferences(ctx context.Context, c client.Reade func (mg *BucketLifecycleConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -528,13 +447,9 @@ func (mg *BucketLifecycleConfiguration) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -558,19 +473,14 @@ func (mg *BucketLifecycleConfiguration) ResolveReferences(ctx context.Context, c func (mg *BucketLogging) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -587,13 +497,9 @@ func (mg *BucketLogging) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -610,13 +516,9 @@ func (mg *BucketLogging) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.TargetBucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TargetBucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -633,13 +535,9 @@ func (mg *BucketLogging) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -663,19 +561,14 @@ func (mg *BucketLogging) ResolveReferences(ctx context.Context, c client.Reader) func (mg *BucketMetric) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -692,13 +585,9 @@ func (mg *BucketMetric) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -722,19 +611,14 @@ func (mg *BucketMetric) ResolveReferences(ctx context.Context, c client.Reader) func (mg *BucketNotification) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -753,15 +637,10 @@ func (mg *BucketNotification) ResolveReferences(ctx context.Context, c client.Re for i3 := 0; i3 < len(mg.Spec.ForProvider.Queue); i3++ { { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Queue[i3].QueueArn), Extract: resource.ExtractParamPath("arn", true), @@ -779,15 +658,10 @@ func (mg *BucketNotification) ResolveReferences(ctx context.Context, c client.Re } for i3 := 0; i3 < len(mg.Spec.ForProvider.Topic); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Topic[i3].TopicArn), Extract: resource.ExtractParamPath("arn", true), @@ -804,15 +678,10 @@ func (mg *BucketNotification) ResolveReferences(ctx context.Context, c client.Re } { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Bucket), Extract: resource.ExtractResourceID(), @@ -829,15 +698,10 @@ func (mg *BucketNotification) ResolveReferences(ctx context.Context, c client.Re for i3 := 0; i3 < len(mg.Spec.InitProvider.Queue); i3++ { { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Queue[i3].QueueArn), Extract: resource.ExtractParamPath("arn", true), @@ -855,15 +719,10 @@ func (mg *BucketNotification) ResolveReferences(ctx context.Context, c client.Re } for i3 := 0; i3 < len(mg.Spec.InitProvider.Topic); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Topic[i3].TopicArn), Extract: resource.ExtractParamPath("arn", true), @@ -887,19 +746,14 @@ func (mg *BucketNotification) ResolveReferences(ctx context.Context, c client.Re func (mg *BucketObject) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -916,13 +770,9 @@ func (mg *BucketObject) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -939,13 +789,9 @@ func (mg *BucketObject) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -962,13 +808,9 @@ func (mg *BucketObject) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.InitProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -992,19 +834,14 @@ func (mg *BucketObject) ResolveReferences(ctx context.Context, c client.Reader) func (mg *BucketObjectLockConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1021,13 +858,9 @@ func (mg *BucketObjectLockConfiguration) ResolveReferences(ctx context.Context, mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1051,19 +884,14 @@ func (mg *BucketObjectLockConfiguration) ResolveReferences(ctx context.Context, func (mg *BucketOwnershipControls) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1080,13 +908,9 @@ func (mg *BucketOwnershipControls) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1110,19 +934,14 @@ func (mg *BucketOwnershipControls) ResolveReferences(ctx context.Context, c clie func (mg *BucketPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1139,13 +958,9 @@ func (mg *BucketPolicy) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1169,19 +984,14 @@ func (mg *BucketPolicy) ResolveReferences(ctx context.Context, c client.Reader) func (mg *BucketPublicAccessBlock) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1198,13 +1008,9 @@ func (mg *BucketPublicAccessBlock) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1228,19 +1034,14 @@ func (mg *BucketPublicAccessBlock) ResolveReferences(ctx context.Context, c clie func (mg *BucketReplicationConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1257,13 +1058,9 @@ func (mg *BucketReplicationConfiguration) ResolveReferences(ctx context.Context, mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1283,15 +1080,10 @@ func (mg *BucketReplicationConfiguration) ResolveReferences(ctx context.Context, for i3 := 0; i3 < len(mg.Spec.ForProvider.Rule); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Rule[i3].Destination); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Rule[i3].Destination[i4].Bucket), Extract: resource.ExtractParamPath("arn", true), @@ -1309,15 +1101,10 @@ func (mg *BucketReplicationConfiguration) ResolveReferences(ctx context.Context, } } { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Bucket), Extract: resource.ExtractResourceID(), @@ -1332,13 +1119,9 @@ func (mg *BucketReplicationConfiguration) ResolveReferences(ctx context.Context, mg.Spec.InitProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1358,15 +1141,10 @@ func (mg *BucketReplicationConfiguration) ResolveReferences(ctx context.Context, for i3 := 0; i3 < len(mg.Spec.InitProvider.Rule); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Rule[i3].Destination); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Rule[i3].Destination[i4].Bucket), Extract: resource.ExtractParamPath("arn", true), @@ -1391,19 +1169,14 @@ func (mg *BucketReplicationConfiguration) ResolveReferences(ctx context.Context, func (mg *BucketRequestPaymentConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1420,13 +1193,9 @@ func (mg *BucketRequestPaymentConfiguration) ResolveReferences(ctx context.Conte mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1450,19 +1219,14 @@ func (mg *BucketRequestPaymentConfiguration) ResolveReferences(ctx context.Conte func (mg *BucketServerSideEncryptionConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1482,15 +1246,10 @@ func (mg *BucketServerSideEncryptionConfiguration) ResolveReferences(ctx context for i3 := 0; i3 < len(mg.Spec.ForProvider.Rule); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Rule[i3].ApplyServerSideEncryptionByDefault); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Rule[i3].ApplyServerSideEncryptionByDefault[i4].KMSMasterKeyID), Extract: resource.ExtractParamPath("arn", true), @@ -1508,15 +1267,10 @@ func (mg *BucketServerSideEncryptionConfiguration) ResolveReferences(ctx context } } { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Bucket), Extract: resource.ExtractResourceID(), @@ -1534,15 +1288,10 @@ func (mg *BucketServerSideEncryptionConfiguration) ResolveReferences(ctx context for i3 := 0; i3 < len(mg.Spec.InitProvider.Rule); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Rule[i3].ApplyServerSideEncryptionByDefault); i4++ { { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Rule[i3].ApplyServerSideEncryptionByDefault[i4].KMSMasterKeyID), Extract: resource.ExtractParamPath("arn", true), @@ -1567,19 +1316,14 @@ func (mg *BucketServerSideEncryptionConfiguration) ResolveReferences(ctx context func (mg *BucketVersioning) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1596,13 +1340,9 @@ func (mg *BucketVersioning) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1626,19 +1366,14 @@ func (mg *BucketVersioning) ResolveReferences(ctx context.Context, c client.Read func (mg *BucketWebsiteConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1655,13 +1390,9 @@ func (mg *BucketWebsiteConfiguration) ResolveReferences(ctx context.Context, c c mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1685,19 +1416,14 @@ func (mg *BucketWebsiteConfiguration) ResolveReferences(ctx context.Context, c c func (mg *Object) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1714,13 +1440,9 @@ func (mg *Object) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1737,13 +1459,9 @@ func (mg *Object) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1760,13 +1478,9 @@ func (mg *Object) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.Bucket = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.BucketRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/s3control/v1beta1/zz_generated.resolvers.go b/apis/s3control/v1beta1/zz_generated.resolvers.go index 72d5d33955..5d8ed9897d 100644 --- a/apis/s3control/v1beta1/zz_generated.resolvers.go +++ b/apis/s3control/v1beta1/zz_generated.resolvers.go @@ -21,19 +21,14 @@ func (mg *AccessPoint) ResolveReferences( // ResolveReferences of this AccessPoi ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -52,15 +47,10 @@ func (mg *AccessPoint) ResolveReferences( // ResolveReferences of this AccessPoi for i3 := 0; i3 < len(mg.Spec.ForProvider.VPCConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VPCConfiguration[i3].VPCID), Extract: resource.ExtractResourceID(), @@ -77,15 +67,10 @@ func (mg *AccessPoint) ResolveReferences( // ResolveReferences of this AccessPoi } { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Bucket), Extract: resource.ExtractResourceID(), @@ -102,15 +87,10 @@ func (mg *AccessPoint) ResolveReferences( // ResolveReferences of this AccessPoi for i3 := 0; i3 < len(mg.Spec.InitProvider.VPCConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.VPCConfiguration[i3].VPCID), Extract: resource.ExtractResourceID(), @@ -134,15 +114,12 @@ func (mg *AccessPoint) ResolveReferences( // ResolveReferences of this AccessPoi func (mg *AccessPointPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3control.aws.upbound.io", - - "v1beta1", "AccessPoint", "AccessPointList") + m, l, err = apisresolver.GetManagedResource("s3control.aws.upbound.io", "v1beta1", "AccessPoint", "AccessPointList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -161,9 +138,7 @@ func (mg *AccessPointPolicy) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.AccessPointArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.AccessPointArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3control.aws.upbound.io", - - "v1beta1", "AccessPoint", "AccessPointList") + m, l, err = apisresolver.GetManagedResource("s3control.aws.upbound.io", "v1beta1", "AccessPoint", "AccessPointList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -189,7 +164,6 @@ func (mg *AccessPointPolicy) ResolveReferences(ctx context.Context, c client.Rea func (mg *MultiRegionAccessPoint) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -198,15 +172,10 @@ func (mg *MultiRegionAccessPoint) ResolveReferences(ctx context.Context, c clien for i3 := 0; i3 < len(mg.Spec.ForProvider.Details); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Details[i3].Region); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Details[i3].Region[i4].Bucket), Extract: resource.ExtractResourceID(), @@ -231,7 +200,6 @@ func (mg *MultiRegionAccessPoint) ResolveReferences(ctx context.Context, c clien func (mg *ObjectLambdaAccessPoint) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -239,13 +207,10 @@ func (mg *ObjectLambdaAccessPoint) ResolveReferences(ctx context.Context, c clie for i3 := 0; i3 < len(mg.Spec.ForProvider.Configuration); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3control.aws.upbound.io", - - "v1beta1", "AccessPoint", "AccessPointList") + m, l, err = apisresolver.GetManagedResource("s3control.aws.upbound.io", "v1beta1", "AccessPoint", "AccessPointList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Configuration[i3].SupportingAccessPoint), Extract: resource.ExtractParamPath("arn", true), @@ -266,14 +231,10 @@ func (mg *ObjectLambdaAccessPoint) ResolveReferences(ctx context.Context, c clie for i5 := 0; i5 < len(mg.Spec.ForProvider.Configuration[i3].TransformationConfiguration[i4].ContentTransformation); i5++ { for i6 := 0; i6 < len(mg.Spec.ForProvider.Configuration[i3].TransformationConfiguration[i4].ContentTransformation[i5].AwsLambda); i6++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Configuration[i3].TransformationConfiguration[i4].ContentTransformation[i5].AwsLambda[i6].FunctionArn), Extract: resource.ExtractParamPath("arn", true), @@ -294,13 +255,10 @@ func (mg *ObjectLambdaAccessPoint) ResolveReferences(ctx context.Context, c clie } for i3 := 0; i3 < len(mg.Spec.InitProvider.Configuration); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3control.aws.upbound.io", - - "v1beta1", "AccessPoint", "AccessPointList") + m, l, err = apisresolver.GetManagedResource("s3control.aws.upbound.io", "v1beta1", "AccessPoint", "AccessPointList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Configuration[i3].SupportingAccessPoint), Extract: resource.ExtractParamPath("arn", true), @@ -321,14 +279,10 @@ func (mg *ObjectLambdaAccessPoint) ResolveReferences(ctx context.Context, c clie for i5 := 0; i5 < len(mg.Spec.InitProvider.Configuration[i3].TransformationConfiguration[i4].ContentTransformation); i5++ { for i6 := 0; i6 < len(mg.Spec.InitProvider.Configuration[i3].TransformationConfiguration[i4].ContentTransformation[i5].AwsLambda); i6++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Configuration[i3].TransformationConfiguration[i4].ContentTransformation[i5].AwsLambda[i6].FunctionArn), Extract: resource.ExtractParamPath("arn", true), @@ -355,16 +309,12 @@ func (mg *ObjectLambdaAccessPoint) ResolveReferences(ctx context.Context, c clie func (mg *ObjectLambdaAccessPointPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("s3control.aws.upbound.io", - - "v1beta1", "ObjectLambdaAccessPoint", "ObjectLambdaAccessPointList", - ) + m, l, err = apisresolver.GetManagedResource("s3control.aws.upbound.io", "v1beta1", "ObjectLambdaAccessPoint", "ObjectLambdaAccessPointList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -383,10 +333,7 @@ func (mg *ObjectLambdaAccessPointPolicy) ResolveReferences(ctx context.Context, mg.Spec.ForProvider.Name = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("s3control.aws.upbound.io", - - "v1beta1", "ObjectLambdaAccessPoint", "ObjectLambdaAccessPointList", - ) + m, l, err = apisresolver.GetManagedResource("s3control.aws.upbound.io", "v1beta1", "ObjectLambdaAccessPoint", "ObjectLambdaAccessPointList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -412,7 +359,6 @@ func (mg *ObjectLambdaAccessPointPolicy) ResolveReferences(ctx context.Context, func (mg *StorageLensConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -422,15 +368,10 @@ func (mg *StorageLensConfiguration) ResolveReferences(ctx context.Context, c cli for i4 := 0; i4 < len(mg.Spec.ForProvider.StorageLensConfiguration[i3].DataExport); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.StorageLensConfiguration[i3].DataExport[i4].S3BucketDestination); i5++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.StorageLensConfiguration[i3].DataExport[i4].S3BucketDestination[i5].Arn), Extract: resource.ExtractParamPath("arn", true), @@ -452,15 +393,10 @@ func (mg *StorageLensConfiguration) ResolveReferences(ctx context.Context, c cli for i4 := 0; i4 < len(mg.Spec.InitProvider.StorageLensConfiguration[i3].DataExport); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.StorageLensConfiguration[i3].DataExport[i4].S3BucketDestination); i5++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.StorageLensConfiguration[i3].DataExport[i4].S3BucketDestination[i5].Arn), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/sagemaker/v1beta1/zz_generated.resolvers.go b/apis/sagemaker/v1beta1/zz_generated.resolvers.go index 6ec7d93ed9..d15448bddf 100644 --- a/apis/sagemaker/v1beta1/zz_generated.resolvers.go +++ b/apis/sagemaker/v1beta1/zz_generated.resolvers.go @@ -23,18 +23,14 @@ import ( func (mg *App) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -51,9 +47,7 @@ func (mg *App) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.DomainID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DomainIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "UserProfile", "UserProfileList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "UserProfile", "UserProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -72,12 +66,9 @@ func (mg *App) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.UserProfileName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserProfileNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -94,9 +85,7 @@ func (mg *App) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.DomainID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DomainIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "UserProfile", "UserProfileList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "UserProfile", "UserProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -122,7 +111,6 @@ func (mg *App) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *CodeRepository) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -130,13 +118,10 @@ func (mg *CodeRepository) ResolveReferences(ctx context.Context, c client.Reader for i3 := 0; i3 < len(mg.Spec.ForProvider.GitConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.GitConfig[i3].SecretArn), Extract: resource.ExtractParamPath("arn", true), @@ -154,13 +139,10 @@ func (mg *CodeRepository) ResolveReferences(ctx context.Context, c client.Reader } for i3 := 0; i3 < len(mg.Spec.InitProvider.GitConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.GitConfig[i3].SecretArn), Extract: resource.ExtractParamPath("arn", true), @@ -184,15 +166,12 @@ func (mg *CodeRepository) ResolveReferences(ctx context.Context, c client.Reader func (mg *Device) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "DeviceFleet", "DeviceFleetList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "DeviceFleet", "DeviceFleetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -211,9 +190,7 @@ func (mg *Device) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.DeviceFleetName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DeviceFleetNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "DeviceFleet", "DeviceFleetList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "DeviceFleet", "DeviceFleetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -239,19 +216,14 @@ func (mg *Device) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *DeviceFleet) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -268,13 +240,9 @@ func (mg *DeviceFleet) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -298,7 +266,6 @@ func (mg *DeviceFleet) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -307,15 +274,10 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.DefaultUserSettings); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DefaultUserSettings[i3].ExecutionRole), Extract: resource.ExtractParamPath("arn", true), @@ -335,13 +297,10 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error for i4 := 0; i4 < len(mg.Spec.ForProvider.DefaultUserSettings[i3].KernelGatewayAppSettings); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.DefaultUserSettings[i3].KernelGatewayAppSettings[i4].CustomImage); i5++ { { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "AppImageConfig", "AppImageConfigList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "AppImageConfig", "AppImageConfigList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DefaultUserSettings[i3].KernelGatewayAppSettings[i4].CustomImage[i5].AppImageConfigName), Extract: reference.ExternalName(), @@ -363,13 +322,10 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error for i4 := 0; i4 < len(mg.Spec.ForProvider.DefaultUserSettings[i3].KernelGatewayAppSettings); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.DefaultUserSettings[i3].KernelGatewayAppSettings[i4].CustomImage); i5++ { { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "ImageVersion", "ImageVersionList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "ImageVersion", "ImageVersionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DefaultUserSettings[i3].KernelGatewayAppSettings[i4].CustomImage[i5].ImageName), Extract: resource.ExtractParamPath("image_name", false), @@ -388,15 +344,10 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error } } { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KMSKeyID), Extract: reference.ExternalName(), @@ -411,9 +362,7 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -432,13 +381,9 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.ForProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -457,15 +402,10 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.DefaultUserSettings); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DefaultUserSettings[i3].ExecutionRole), Extract: resource.ExtractParamPath("arn", true), @@ -485,13 +425,10 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error for i4 := 0; i4 < len(mg.Spec.InitProvider.DefaultUserSettings[i3].KernelGatewayAppSettings); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.DefaultUserSettings[i3].KernelGatewayAppSettings[i4].CustomImage); i5++ { { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "AppImageConfig", "AppImageConfigList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "AppImageConfig", "AppImageConfigList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DefaultUserSettings[i3].KernelGatewayAppSettings[i4].CustomImage[i5].AppImageConfigName), Extract: reference.ExternalName(), @@ -513,13 +450,10 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error for i4 := 0; i4 < len(mg.Spec.InitProvider.DefaultUserSettings[i3].KernelGatewayAppSettings); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.DefaultUserSettings[i3].KernelGatewayAppSettings[i4].CustomImage); i5++ { { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "ImageVersion", "ImageVersionList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "ImageVersion", "ImageVersionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DefaultUserSettings[i3].KernelGatewayAppSettings[i4].CustomImage[i5].ImageName), Extract: resource.ExtractParamPath("image_name", false), @@ -538,15 +472,10 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error } } { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.KMSKeyID), Extract: reference.ExternalName(), @@ -561,9 +490,7 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -582,13 +509,9 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.SubnetIds = reference.ToPtrValues(mrsp.ResolvedValues) mg.Spec.InitProvider.SubnetIDRefs = mrsp.ResolvedReferences { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -612,15 +535,12 @@ func (mg *Domain) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "EndpointConfiguration", "EndpointConfigurationList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "EndpointConfiguration", "EndpointConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -639,9 +559,7 @@ func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.EndpointConfigName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EndpointConfigNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "EndpointConfiguration", "EndpointConfigurationList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "EndpointConfiguration", "EndpointConfigurationList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -667,19 +585,14 @@ func (mg *Endpoint) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *EndpointConfiguration) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -698,14 +611,10 @@ func (mg *EndpointConfiguration) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.ForProvider.ProductionVariants); i3++ { { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "Model", "ModelList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "Model", "ModelList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ProductionVariants[i3].ModelName), Extract: reference.ExternalName(), @@ -722,15 +631,10 @@ func (mg *EndpointConfiguration) ResolveReferences(ctx context.Context, c client } { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.KMSKeyArn), Extract: reference.ExternalName(), @@ -747,14 +651,10 @@ func (mg *EndpointConfiguration) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.InitProvider.ProductionVariants); i3++ { { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "Model", "ModelList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "Model", "ModelList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ProductionVariants[i3].ModelName), Extract: reference.ExternalName(), @@ -778,19 +678,14 @@ func (mg *EndpointConfiguration) ResolveReferences(ctx context.Context, c client func (mg *FeatureGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -807,13 +702,9 @@ func (mg *FeatureGroup) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -837,19 +728,14 @@ func (mg *FeatureGroup) ResolveReferences(ctx context.Context, c client.Reader) func (mg *Image) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -866,13 +752,9 @@ func (mg *Image) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -896,18 +778,14 @@ func (mg *Image) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *ImageVersion) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "Image", "ImageList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "Image", "ImageList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -924,12 +802,9 @@ func (mg *ImageVersion) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.ImageName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ImageNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "Image", "ImageList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "Image", "ImageList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -953,19 +828,14 @@ func (mg *ImageVersion) ResolveReferences(ctx context.Context, c client.Reader) func (mg *Model) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -982,13 +852,9 @@ func (mg *Model) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.ExecutionRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ExecutionRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1012,17 +878,13 @@ func (mg *Model) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *ModelPackageGroupPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "ModelPackageGroup", "ModelPackageGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "ModelPackageGroup", "ModelPackageGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1040,11 +902,8 @@ func (mg *ModelPackageGroupPolicy) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.ModelPackageGroupName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ModelPackageGroupNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "ModelPackageGroup", "ModelPackageGroupList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "ModelPackageGroup", "ModelPackageGroupList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1069,15 +928,12 @@ func (mg *ModelPackageGroupPolicy) ResolveReferences(ctx context.Context, c clie func (mg *NotebookInstance) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "CodeRepository", "CodeRepositoryList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "CodeRepository", "CodeRepositoryList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1096,13 +952,9 @@ func (mg *NotebookInstance) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.DefaultCodeRepository = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DefaultCodeRepositoryRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1119,13 +971,9 @@ func (mg *NotebookInstance) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1142,9 +990,7 @@ func (mg *NotebookInstance) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1163,9 +1009,7 @@ func (mg *NotebookInstance) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "CodeRepository", "CodeRepositoryList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "CodeRepository", "CodeRepositoryList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1184,13 +1028,9 @@ func (mg *NotebookInstance) ResolveReferences(ctx context.Context, c client.Read mg.Spec.InitProvider.DefaultCodeRepository = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DefaultCodeRepositoryRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1207,13 +1047,9 @@ func (mg *NotebookInstance) ResolveReferences(ctx context.Context, c client.Read mg.Spec.InitProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1230,9 +1066,7 @@ func (mg *NotebookInstance) ResolveReferences(ctx context.Context, c client.Read mg.Spec.InitProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -1258,18 +1092,14 @@ func (mg *NotebookInstance) ResolveReferences(ctx context.Context, c client.Read func (mg *Space) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1286,12 +1116,9 @@ func (mg *Space) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.DomainID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DomainIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1315,18 +1142,14 @@ func (mg *Space) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *UserProfile) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1343,12 +1166,9 @@ func (mg *UserProfile) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.DomainID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DomainIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "Domain", "DomainList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "Domain", "DomainList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -1372,7 +1192,6 @@ func (mg *UserProfile) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *Workforce) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -1380,13 +1199,10 @@ func (mg *Workforce) ResolveReferences(ctx context.Context, c client.Reader) err for i3 := 0; i3 < len(mg.Spec.ForProvider.CognitoConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolClient", "UserPoolClientList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolClient", "UserPoolClientList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.CognitoConfig[i3].ClientID), Extract: resource.ExtractResourceID(), @@ -1404,13 +1220,10 @@ func (mg *Workforce) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.ForProvider.CognitoConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolDomain", "UserPoolDomainList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolDomain", "UserPoolDomainList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.CognitoConfig[i3].UserPool), Extract: resource.ExtractParamPath("user_pool_id", false), @@ -1428,13 +1241,10 @@ func (mg *Workforce) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.InitProvider.CognitoConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolClient", "UserPoolClientList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolClient", "UserPoolClientList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.CognitoConfig[i3].ClientID), Extract: resource.ExtractResourceID(), @@ -1452,13 +1262,10 @@ func (mg *Workforce) ResolveReferences(ctx context.Context, c client.Reader) err } for i3 := 0; i3 < len(mg.Spec.InitProvider.CognitoConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolDomain", "UserPoolDomainList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolDomain", "UserPoolDomainList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.CognitoConfig[i3].UserPool), Extract: resource.ExtractParamPath("user_pool_id", false), @@ -1482,7 +1289,6 @@ func (mg *Workforce) ResolveReferences(ctx context.Context, c client.Reader) err func (mg *Workteam) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -1491,13 +1297,10 @@ func (mg *Workteam) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.MemberDefinition); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.MemberDefinition[i3].CognitoMemberDefinition); i4++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolClient", "UserPoolClientList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolClient", "UserPoolClientList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.MemberDefinition[i3].CognitoMemberDefinition[i4].ClientID), Extract: resource.ExtractResourceID(), @@ -1517,13 +1320,10 @@ func (mg *Workteam) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.MemberDefinition); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.MemberDefinition[i3].CognitoMemberDefinition); i4++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserGroup", "UserGroupList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserGroup", "UserGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.MemberDefinition[i3].CognitoMemberDefinition[i4].UserGroup), Extract: resource.ExtractResourceID(), @@ -1543,13 +1343,10 @@ func (mg *Workteam) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.MemberDefinition); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.MemberDefinition[i3].CognitoMemberDefinition); i4++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolDomain", "UserPoolDomainList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolDomain", "UserPoolDomainList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.MemberDefinition[i3].CognitoMemberDefinition[i4].UserPool), Extract: resource.ExtractParamPath("user_pool_id", false), @@ -1567,13 +1364,10 @@ func (mg *Workteam) ResolveReferences(ctx context.Context, c client.Reader) erro } } { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "Workforce", "WorkforceList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "Workforce", "WorkforceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.WorkforceName), Extract: resource.ExtractResourceID(), @@ -1591,13 +1385,10 @@ func (mg *Workteam) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.InitProvider.MemberDefinition); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.MemberDefinition[i3].CognitoMemberDefinition); i4++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolClient", "UserPoolClientList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolClient", "UserPoolClientList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.MemberDefinition[i3].CognitoMemberDefinition[i4].ClientID), Extract: resource.ExtractResourceID(), @@ -1617,13 +1408,10 @@ func (mg *Workteam) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.InitProvider.MemberDefinition); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.MemberDefinition[i3].CognitoMemberDefinition); i4++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserGroup", "UserGroupList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserGroup", "UserGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.MemberDefinition[i3].CognitoMemberDefinition[i4].UserGroup), Extract: resource.ExtractResourceID(), @@ -1643,13 +1431,10 @@ func (mg *Workteam) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.InitProvider.MemberDefinition); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.MemberDefinition[i3].CognitoMemberDefinition); i4++ { { - m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", - - "v1beta1", "UserPoolDomain", "UserPoolDomainList") + m, l, err = apisresolver.GetManagedResource("cognitoidp.aws.upbound.io", "v1beta1", "UserPoolDomain", "UserPoolDomainList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.MemberDefinition[i3].CognitoMemberDefinition[i4].UserPool), Extract: resource.ExtractParamPath("user_pool_id", false), @@ -1667,13 +1452,10 @@ func (mg *Workteam) ResolveReferences(ctx context.Context, c client.Reader) erro } } { - m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", - - "v1beta1", "Workforce", "WorkforceList") + m, l, err = apisresolver.GetManagedResource("sagemaker.aws.upbound.io", "v1beta1", "Workforce", "WorkforceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.WorkforceName), Extract: resource.ExtractResourceID(), diff --git a/apis/scheduler/v1beta1/zz_generated.resolvers.go b/apis/scheduler/v1beta1/zz_generated.resolvers.go index c51a1d8039..97a04d104c 100644 --- a/apis/scheduler/v1beta1/zz_generated.resolvers.go +++ b/apis/scheduler/v1beta1/zz_generated.resolvers.go @@ -22,19 +22,14 @@ import ( func (mg *Schedule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -53,15 +48,10 @@ func (mg *Schedule) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.Target); i3++ { { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Target[i3].Arn), Extract: resource.ExtractParamPath("arn", true), @@ -79,15 +69,10 @@ func (mg *Schedule) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.ForProvider.Target); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Target[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -104,15 +89,10 @@ func (mg *Schedule) ResolveReferences(ctx context.Context, c client.Reader) erro } { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.KMSKeyArn), Extract: reference.ExternalName(), @@ -129,15 +109,10 @@ func (mg *Schedule) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.InitProvider.Target); i3++ { { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Target[i3].Arn), Extract: resource.ExtractParamPath("arn", true), @@ -155,15 +130,10 @@ func (mg *Schedule) ResolveReferences(ctx context.Context, c client.Reader) erro } for i3 := 0; i3 < len(mg.Spec.InitProvider.Target); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Target[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/schemas/v1beta1/zz_generated.resolvers.go b/apis/schemas/v1beta1/zz_generated.resolvers.go index 91d7131054..120704f633 100644 --- a/apis/schemas/v1beta1/zz_generated.resolvers.go +++ b/apis/schemas/v1beta1/zz_generated.resolvers.go @@ -21,18 +21,14 @@ func (mg *Discoverer) ResolveReferences( // ResolveReferences of this Discoverer ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Bus", "BusList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Bus", "BusList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -49,12 +45,9 @@ func (mg *Discoverer) ResolveReferences( // ResolveReferences of this Discoverer mg.Spec.ForProvider.SourceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SourceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", - - "v1beta1", "Bus", "BusList") + m, l, err = apisresolver.GetManagedResource("cloudwatchevents.aws.upbound.io", "v1beta1", "Bus", "BusList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -78,18 +71,14 @@ func (mg *Discoverer) ResolveReferences( // ResolveReferences of this Discoverer func (mg *Schema) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("schemas.aws.upbound.io", - - "v1beta1", "Registry", "RegistryList") + m, l, err = apisresolver.GetManagedResource("schemas.aws.upbound.io", "v1beta1", "Registry", "RegistryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -106,12 +95,9 @@ func (mg *Schema) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.RegistryName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RegistryNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("schemas.aws.upbound.io", - - "v1beta1", "Registry", "RegistryList") + m, l, err = apisresolver.GetManagedResource("schemas.aws.upbound.io", "v1beta1", "Registry", "RegistryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/secretsmanager/v1beta1/zz_generated.resolvers.go b/apis/secretsmanager/v1beta1/zz_generated.resolvers.go index 27d5a23db3..394f232c7f 100644 --- a/apis/secretsmanager/v1beta1/zz_generated.resolvers.go +++ b/apis/secretsmanager/v1beta1/zz_generated.resolvers.go @@ -22,19 +22,14 @@ import ( func (mg *Secret) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -51,13 +46,9 @@ func (mg *Secret) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -81,15 +72,12 @@ func (mg *Secret) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *SecretPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -108,9 +96,7 @@ func (mg *SecretPolicy) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.SecretArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SecretArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -136,18 +122,14 @@ func (mg *SecretPolicy) ResolveReferences(ctx context.Context, c client.Reader) func (mg *SecretRotation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -164,9 +146,7 @@ func (mg *SecretRotation) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.RotationLambdaArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RotationLambdaArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -185,12 +165,9 @@ func (mg *SecretRotation) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.SecretID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SecretIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -207,9 +184,7 @@ func (mg *SecretRotation) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.InitProvider.RotationLambdaArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RotationLambdaArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -235,15 +210,12 @@ func (mg *SecretRotation) ResolveReferences(ctx context.Context, c client.Reader func (mg *SecretVersion) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -262,9 +234,7 @@ func (mg *SecretVersion) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.SecretID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SecretIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", - - "v1beta1", "Secret", "SecretList") + m, l, err = apisresolver.GetManagedResource("secretsmanager.aws.upbound.io", "v1beta1", "Secret", "SecretList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/securityhub/v1beta1/zz_generated.resolvers.go b/apis/securityhub/v1beta1/zz_generated.resolvers.go index 8a5e023634..bc149d5864 100644 --- a/apis/securityhub/v1beta1/zz_generated.resolvers.go +++ b/apis/securityhub/v1beta1/zz_generated.resolvers.go @@ -20,18 +20,14 @@ func (mg *InviteAccepter) ResolveReferences( // ResolveReferences of this Invite ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("securityhub.aws.upbound.io", - - "v1beta1", "Member", "MemberList") + m, l, err = apisresolver.GetManagedResource("securityhub.aws.upbound.io", "v1beta1", "Member", "MemberList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -48,12 +44,9 @@ func (mg *InviteAccepter) ResolveReferences( // ResolveReferences of this Invite mg.Spec.ForProvider.MasterID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.MasterIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("securityhub.aws.upbound.io", - - "v1beta1", "Member", "MemberList") + m, l, err = apisresolver.GetManagedResource("securityhub.aws.upbound.io", "v1beta1", "Member", "MemberList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/servicecatalog/v1beta1/zz_generated.resolvers.go b/apis/servicecatalog/v1beta1/zz_generated.resolvers.go index 6d8f9654d0..cf3550904b 100644 --- a/apis/servicecatalog/v1beta1/zz_generated.resolvers.go +++ b/apis/servicecatalog/v1beta1/zz_generated.resolvers.go @@ -22,18 +22,14 @@ func (mg *BudgetResourceAssociation) ResolveReferences( // ResolveReferences of ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("budgets.aws.upbound.io", - - "v1beta1", "Budget", "BudgetList") + m, l, err = apisresolver.GetManagedResource("budgets.aws.upbound.io", "v1beta1", "Budget", "BudgetList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,9 +46,7 @@ func (mg *BudgetResourceAssociation) ResolveReferences( // ResolveReferences of mg.Spec.ForProvider.BudgetName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BudgetNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Product", "ProductList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Product", "ProductList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -71,12 +65,9 @@ func (mg *BudgetResourceAssociation) ResolveReferences( // ResolveReferences of mg.Spec.ForProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("budgets.aws.upbound.io", - - "v1beta1", "Budget", "BudgetList") + m, l, err = apisresolver.GetManagedResource("budgets.aws.upbound.io", "v1beta1", "Budget", "BudgetList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -93,9 +84,7 @@ func (mg *BudgetResourceAssociation) ResolveReferences( // ResolveReferences of mg.Spec.InitProvider.BudgetName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.BudgetNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Product", "ProductList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Product", "ProductList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -121,15 +110,12 @@ func (mg *BudgetResourceAssociation) ResolveReferences( // ResolveReferences of func (mg *Constraint) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Portfolio", "PortfolioList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Portfolio", "PortfolioList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -148,9 +134,7 @@ func (mg *Constraint) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.PortfolioID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PortfolioIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Product", "ProductList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Product", "ProductList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -169,9 +153,7 @@ func (mg *Constraint) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.ProductID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ProductIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Portfolio", "PortfolioList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Portfolio", "PortfolioList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -190,9 +172,7 @@ func (mg *Constraint) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.InitProvider.PortfolioID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PortfolioIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Product", "ProductList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Product", "ProductList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -218,15 +198,12 @@ func (mg *Constraint) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *PortfolioShare) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Portfolio", "PortfolioList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Portfolio", "PortfolioList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -245,9 +222,7 @@ func (mg *PortfolioShare) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.PortfolioID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PortfolioIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Portfolio", "PortfolioList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Portfolio", "PortfolioList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -273,15 +248,12 @@ func (mg *PortfolioShare) ResolveReferences(ctx context.Context, c client.Reader func (mg *PrincipalPortfolioAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Portfolio", "PortfolioList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Portfolio", "PortfolioList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -300,13 +272,9 @@ func (mg *PrincipalPortfolioAssociation) ResolveReferences(ctx context.Context, mg.Spec.ForProvider.PortfolioID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PortfolioIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -323,9 +291,7 @@ func (mg *PrincipalPortfolioAssociation) ResolveReferences(ctx context.Context, mg.Spec.ForProvider.PrincipalArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PrincipalArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Portfolio", "PortfolioList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Portfolio", "PortfolioList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -344,13 +310,9 @@ func (mg *PrincipalPortfolioAssociation) ResolveReferences(ctx context.Context, mg.Spec.InitProvider.PortfolioID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PortfolioIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -374,15 +336,12 @@ func (mg *PrincipalPortfolioAssociation) ResolveReferences(ctx context.Context, func (mg *ProductPortfolioAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Portfolio", "PortfolioList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Portfolio", "PortfolioList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -401,9 +360,7 @@ func (mg *ProductPortfolioAssociation) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.PortfolioID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PortfolioIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Product", "ProductList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Product", "ProductList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -422,9 +379,7 @@ func (mg *ProductPortfolioAssociation) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.ProductID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ProductIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Portfolio", "PortfolioList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Portfolio", "PortfolioList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -443,9 +398,7 @@ func (mg *ProductPortfolioAssociation) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.PortfolioID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.PortfolioIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Product", "ProductList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Product", "ProductList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -471,15 +424,12 @@ func (mg *ProductPortfolioAssociation) ResolveReferences(ctx context.Context, c func (mg *ProvisioningArtifact) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Product", "ProductList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Product", "ProductList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -498,9 +448,7 @@ func (mg *ProvisioningArtifact) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.ProductID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ProductIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Product", "ProductList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Product", "ProductList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -526,15 +474,12 @@ func (mg *ProvisioningArtifact) ResolveReferences(ctx context.Context, c client. func (mg *TagOptionResourceAssociation) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Product", "ProductList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Product", "ProductList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -553,9 +498,7 @@ func (mg *TagOptionResourceAssociation) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "TagOption", "TagOptionList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "TagOption", "TagOptionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -574,9 +517,7 @@ func (mg *TagOptionResourceAssociation) ResolveReferences(ctx context.Context, c mg.Spec.ForProvider.TagOptionID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TagOptionIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "Product", "ProductList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "Product", "ProductList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -595,9 +536,7 @@ func (mg *TagOptionResourceAssociation) ResolveReferences(ctx context.Context, c mg.Spec.InitProvider.ResourceID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ResourceIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", - - "v1beta1", "TagOption", "TagOptionList") + m, l, err = apisresolver.GetManagedResource("servicecatalog.aws.upbound.io", "v1beta1", "TagOption", "TagOptionList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/servicediscovery/v1beta1/zz_generated.resolvers.go b/apis/servicediscovery/v1beta1/zz_generated.resolvers.go index 106d9f5c34..3f6e211a54 100644 --- a/apis/servicediscovery/v1beta1/zz_generated.resolvers.go +++ b/apis/servicediscovery/v1beta1/zz_generated.resolvers.go @@ -21,19 +21,14 @@ func (mg *PrivateDNSNamespace) ResolveReferences( // ResolveReferences of this P ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,13 +45,9 @@ func (mg *PrivateDNSNamespace) ResolveReferences( // ResolveReferences of this P mg.Spec.ForProvider.VPC = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.VPCRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -80,7 +71,6 @@ func (mg *PrivateDNSNamespace) ResolveReferences( // ResolveReferences of this P func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -88,14 +78,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.DNSConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("servicediscovery.aws.upbound.io", - - "v1beta1", "PrivateDNSNamespace", "PrivateDNSNamespaceList", - ) + m, l, err = apisresolver.GetManagedResource("servicediscovery.aws.upbound.io", "v1beta1", "PrivateDNSNamespace", "PrivateDNSNamespaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DNSConfig[i3].NamespaceID), Extract: resource.ExtractResourceID(), @@ -113,14 +99,10 @@ func (mg *Service) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.DNSConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("servicediscovery.aws.upbound.io", - - "v1beta1", "PrivateDNSNamespace", "PrivateDNSNamespaceList", - ) + m, l, err = apisresolver.GetManagedResource("servicediscovery.aws.upbound.io", "v1beta1", "PrivateDNSNamespace", "PrivateDNSNamespaceList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DNSConfig[i3].NamespaceID), Extract: resource.ExtractResourceID(), diff --git a/apis/ses/v1beta1/zz_generated.resolvers.go b/apis/ses/v1beta1/zz_generated.resolvers.go index aee0bba949..44a0e118a5 100644 --- a/apis/ses/v1beta1/zz_generated.resolvers.go +++ b/apis/ses/v1beta1/zz_generated.resolvers.go @@ -21,15 +21,12 @@ func (mg *DomainMailFrom) ResolveReferences( // ResolveReferences of this Domain ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", - - "v1beta1", "DomainIdentity", "DomainIdentityList") + m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", "v1beta1", "DomainIdentity", "DomainIdentityList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -48,9 +45,7 @@ func (mg *DomainMailFrom) ResolveReferences( // ResolveReferences of this Domain mg.Spec.ForProvider.Domain = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DomainRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", - - "v1beta1", "DomainIdentity", "DomainIdentityList") + m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", "v1beta1", "DomainIdentity", "DomainIdentityList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -76,15 +71,12 @@ func (mg *DomainMailFrom) ResolveReferences( // ResolveReferences of this Domain func (mg *EventDestination) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", - - "v1beta1", "ConfigurationSet", "ConfigurationSetList") + m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", "v1beta1", "ConfigurationSet", "ConfigurationSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -105,15 +97,10 @@ func (mg *EventDestination) ResolveReferences(ctx context.Context, c client.Read for i3 := 0; i3 < len(mg.Spec.ForProvider.KinesisDestination); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KinesisDestination[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -131,13 +118,10 @@ func (mg *EventDestination) ResolveReferences(ctx context.Context, c client.Read } for i3 := 0; i3 < len(mg.Spec.ForProvider.KinesisDestination); i3++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.KinesisDestination[i3].StreamArn), Extract: resource.ExtractParamPath("arn", false), @@ -155,15 +139,10 @@ func (mg *EventDestination) ResolveReferences(ctx context.Context, c client.Read } for i3 := 0; i3 < len(mg.Spec.ForProvider.SnsDestination); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SnsDestination[i3].TopicArn), Extract: resource.ExtractParamPath("arn", true), @@ -180,13 +159,10 @@ func (mg *EventDestination) ResolveReferences(ctx context.Context, c client.Read } { - m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", - - "v1beta1", "ConfigurationSet", "ConfigurationSetList") + m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", "v1beta1", "ConfigurationSet", "ConfigurationSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ConfigurationSetName), Extract: reference.ExternalName(), @@ -203,15 +179,10 @@ func (mg *EventDestination) ResolveReferences(ctx context.Context, c client.Read for i3 := 0; i3 < len(mg.Spec.InitProvider.KinesisDestination); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.KinesisDestination[i3].RoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -229,13 +200,10 @@ func (mg *EventDestination) ResolveReferences(ctx context.Context, c client.Read } for i3 := 0; i3 < len(mg.Spec.InitProvider.KinesisDestination); i3++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.KinesisDestination[i3].StreamArn), Extract: resource.ExtractParamPath("arn", false), @@ -253,15 +221,10 @@ func (mg *EventDestination) ResolveReferences(ctx context.Context, c client.Read } for i3 := 0; i3 < len(mg.Spec.InitProvider.SnsDestination); i3++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SnsDestination[i3].TopicArn), Extract: resource.ExtractParamPath("arn", true), @@ -285,15 +248,12 @@ func (mg *EventDestination) ResolveReferences(ctx context.Context, c client.Read func (mg *IdentityNotificationTopic) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", - - "v1beta1", "DomainIdentity", "DomainIdentityList") + m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", "v1beta1", "DomainIdentity", "DomainIdentityList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -312,13 +272,9 @@ func (mg *IdentityNotificationTopic) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.Identity = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IdentityRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -335,9 +291,7 @@ func (mg *IdentityNotificationTopic) ResolveReferences(ctx context.Context, c cl mg.Spec.ForProvider.TopicArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TopicArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", - - "v1beta1", "DomainIdentity", "DomainIdentityList") + m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", "v1beta1", "DomainIdentity", "DomainIdentityList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -356,13 +310,9 @@ func (mg *IdentityNotificationTopic) ResolveReferences(ctx context.Context, c cl mg.Spec.InitProvider.Identity = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.IdentityRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -386,15 +336,12 @@ func (mg *IdentityNotificationTopic) ResolveReferences(ctx context.Context, c cl func (mg *IdentityPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", - - "v1beta1", "DomainIdentity", "DomainIdentityList") + m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", "v1beta1", "DomainIdentity", "DomainIdentityList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -413,9 +360,7 @@ func (mg *IdentityPolicy) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.Identity = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IdentityRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", - - "v1beta1", "DomainIdentity", "DomainIdentityList") + m, l, err = apisresolver.GetManagedResource("ses.aws.upbound.io", "v1beta1", "DomainIdentity", "DomainIdentityList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/sesv2/v1beta1/zz_generated.resolvers.go b/apis/sesv2/v1beta1/zz_generated.resolvers.go index 7dc6f60870..ac3ad34908 100644 --- a/apis/sesv2/v1beta1/zz_generated.resolvers.go +++ b/apis/sesv2/v1beta1/zz_generated.resolvers.go @@ -21,15 +21,12 @@ func (mg *ConfigurationSetEventDestination) ResolveReferences( // ResolveReferen ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sesv2.aws.upbound.io", - - "v1beta1", "ConfigurationSet", "ConfigurationSetList") + m, l, err = apisresolver.GetManagedResource("sesv2.aws.upbound.io", "v1beta1", "ConfigurationSet", "ConfigurationSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -51,13 +48,10 @@ func (mg *ConfigurationSetEventDestination) ResolveReferences( // ResolveReferen for i3 := 0; i3 < len(mg.Spec.ForProvider.EventDestination); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.EventDestination[i3].KinesisFirehoseDestination); i4++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EventDestination[i3].KinesisFirehoseDestination[i4].DeliveryStreamArn), Extract: resource.ExtractParamPath("arn", false), @@ -77,15 +71,10 @@ func (mg *ConfigurationSetEventDestination) ResolveReferences( // ResolveReferen for i3 := 0; i3 < len(mg.Spec.ForProvider.EventDestination); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.EventDestination[i3].KinesisFirehoseDestination); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EventDestination[i3].KinesisFirehoseDestination[i4].IAMRoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -105,15 +94,10 @@ func (mg *ConfigurationSetEventDestination) ResolveReferences( // ResolveReferen for i3 := 0; i3 < len(mg.Spec.ForProvider.EventDestination); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.EventDestination[i3].PinpointDestination); i4++ { { - m, l, err = apisresolver.GetManagedResource("pinpoint.aws.upbound.io", - - "v1beta1", "App", "AppList") + m, l, err = apisresolver.GetManagedResource("pinpoint.aws.upbound.io", "v1beta1", "App", "AppList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EventDestination[i3].PinpointDestination[i4].ApplicationArn), Extract: resource.ExtractParamPath("arn", true), @@ -133,15 +117,10 @@ func (mg *ConfigurationSetEventDestination) ResolveReferences( // ResolveReferen for i3 := 0; i3 < len(mg.Spec.ForProvider.EventDestination); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.EventDestination[i3].SnsDestination); i4++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EventDestination[i3].SnsDestination[i4].TopicArn), Extract: resource.ExtractParamPath("arn", true), @@ -159,13 +138,10 @@ func (mg *ConfigurationSetEventDestination) ResolveReferences( // ResolveReferen } } { - m, l, err = apisresolver.GetManagedResource("sesv2.aws.upbound.io", - - "v1beta1", "ConfigurationSet", "ConfigurationSetList") + m, l, err = apisresolver.GetManagedResource("sesv2.aws.upbound.io", "v1beta1", "ConfigurationSet", "ConfigurationSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ConfigurationSetName), Extract: reference.ExternalName(), @@ -183,13 +159,10 @@ func (mg *ConfigurationSetEventDestination) ResolveReferences( // ResolveReferen for i3 := 0; i3 < len(mg.Spec.InitProvider.EventDestination); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.EventDestination[i3].KinesisFirehoseDestination); i4++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EventDestination[i3].KinesisFirehoseDestination[i4].DeliveryStreamArn), Extract: resource.ExtractParamPath("arn", false), @@ -209,15 +182,10 @@ func (mg *ConfigurationSetEventDestination) ResolveReferences( // ResolveReferen for i3 := 0; i3 < len(mg.Spec.InitProvider.EventDestination); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.EventDestination[i3].KinesisFirehoseDestination); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EventDestination[i3].KinesisFirehoseDestination[i4].IAMRoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -237,15 +205,10 @@ func (mg *ConfigurationSetEventDestination) ResolveReferences( // ResolveReferen for i3 := 0; i3 < len(mg.Spec.InitProvider.EventDestination); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.EventDestination[i3].PinpointDestination); i4++ { { - m, l, err = apisresolver.GetManagedResource("pinpoint.aws.upbound.io", - - "v1beta1", "App", "AppList") + m, l, err = apisresolver.GetManagedResource("pinpoint.aws.upbound.io", "v1beta1", "App", "AppList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EventDestination[i3].PinpointDestination[i4].ApplicationArn), Extract: resource.ExtractParamPath("arn", true), @@ -265,15 +228,10 @@ func (mg *ConfigurationSetEventDestination) ResolveReferences( // ResolveReferen for i3 := 0; i3 < len(mg.Spec.InitProvider.EventDestination); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.EventDestination[i3].SnsDestination); i4++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EventDestination[i3].SnsDestination[i4].TopicArn), Extract: resource.ExtractParamPath("arn", true), @@ -298,15 +256,12 @@ func (mg *ConfigurationSetEventDestination) ResolveReferences( // ResolveReferen func (mg *EmailIdentity) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sesv2.aws.upbound.io", - - "v1beta1", "ConfigurationSet", "ConfigurationSetList") + m, l, err = apisresolver.GetManagedResource("sesv2.aws.upbound.io", "v1beta1", "ConfigurationSet", "ConfigurationSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -325,9 +280,7 @@ func (mg *EmailIdentity) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.ConfigurationSetName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ConfigurationSetNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sesv2.aws.upbound.io", - - "v1beta1", "ConfigurationSet", "ConfigurationSetList") + m, l, err = apisresolver.GetManagedResource("sesv2.aws.upbound.io", "v1beta1", "ConfigurationSet", "ConfigurationSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/sfn/v1beta1/zz_generated.resolvers.go b/apis/sfn/v1beta1/zz_generated.resolvers.go index bd79d3e0e3..4165b1def7 100644 --- a/apis/sfn/v1beta1/zz_generated.resolvers.go +++ b/apis/sfn/v1beta1/zz_generated.resolvers.go @@ -21,19 +21,14 @@ func (mg *StateMachine) ResolveReferences( // ResolveReferences of this StateMac ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,13 +45,9 @@ func (mg *StateMachine) ResolveReferences( // ResolveReferences of this StateMac mg.Spec.ForProvider.RoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/signer/v1beta1/zz_generated.resolvers.go b/apis/signer/v1beta1/zz_generated.resolvers.go index 8b5f36c483..bd4a5eb916 100644 --- a/apis/signer/v1beta1/zz_generated.resolvers.go +++ b/apis/signer/v1beta1/zz_generated.resolvers.go @@ -20,15 +20,12 @@ func (mg *SigningJob) ResolveReferences( // ResolveReferences of this SigningJob ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", - - "v1beta1", "SigningProfile", "SigningProfileList") + m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", "v1beta1", "SigningProfile", "SigningProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -47,9 +44,7 @@ func (mg *SigningJob) ResolveReferences( // ResolveReferences of this SigningJob mg.Spec.ForProvider.ProfileName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ProfileNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", - - "v1beta1", "SigningProfile", "SigningProfileList") + m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", "v1beta1", "SigningProfile", "SigningProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -75,15 +70,12 @@ func (mg *SigningJob) ResolveReferences( // ResolveReferences of this SigningJob func (mg *SigningProfilePermission) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", - - "v1beta1", "SigningProfile", "SigningProfileList") + m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", "v1beta1", "SigningProfile", "SigningProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -102,9 +94,7 @@ func (mg *SigningProfilePermission) ResolveReferences(ctx context.Context, c cli mg.Spec.ForProvider.ProfileName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ProfileNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", - - "v1beta1", "SigningProfile", "SigningProfileList") + m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", "v1beta1", "SigningProfile", "SigningProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -123,9 +113,7 @@ func (mg *SigningProfilePermission) ResolveReferences(ctx context.Context, c cli mg.Spec.ForProvider.ProfileVersion = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ProfileVersionRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", - - "v1beta1", "SigningProfile", "SigningProfileList") + m, l, err = apisresolver.GetManagedResource("signer.aws.upbound.io", "v1beta1", "SigningProfile", "SigningProfileList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/sns/v1beta1/zz_generated.resolvers.go b/apis/sns/v1beta1/zz_generated.resolvers.go index 80701f535c..a2c2ab4914 100644 --- a/apis/sns/v1beta1/zz_generated.resolvers.go +++ b/apis/sns/v1beta1/zz_generated.resolvers.go @@ -22,19 +22,14 @@ func (mg *PlatformApplication) ResolveReferences( // ResolveReferences of this P ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -51,13 +46,9 @@ func (mg *PlatformApplication) ResolveReferences( // ResolveReferences of this P mg.Spec.ForProvider.FailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FailureFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -74,13 +65,9 @@ func (mg *PlatformApplication) ResolveReferences( // ResolveReferences of this P mg.Spec.ForProvider.SuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SuccessFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -97,13 +84,9 @@ func (mg *PlatformApplication) ResolveReferences( // ResolveReferences of this P mg.Spec.InitProvider.FailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.FailureFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -127,19 +110,14 @@ func (mg *PlatformApplication) ResolveReferences( // ResolveReferences of this P func (mg *SMSPreferences) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -156,13 +134,9 @@ func (mg *SMSPreferences) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.DeliveryStatusIAMRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DeliveryStatusIAMRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -186,19 +160,14 @@ func (mg *SMSPreferences) ResolveReferences(ctx context.Context, c client.Reader func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -215,13 +184,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.ApplicationFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ApplicationFailureFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -238,13 +203,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.ApplicationSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ApplicationSuccessFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -261,13 +222,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.FirehoseFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FirehoseFailureFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -284,13 +241,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.FirehoseSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.FirehoseSuccessFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -307,13 +260,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.HTTPFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.HTTPFailureFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -330,13 +279,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.HTTPSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.HTTPSuccessFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -353,13 +298,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.LambdaFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LambdaFailureFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -376,13 +317,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.LambdaSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LambdaSuccessFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -399,13 +336,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.SqsFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SqsFailureFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -422,13 +355,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.SqsSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SqsSuccessFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -445,13 +374,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.ApplicationFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ApplicationFailureFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -468,13 +393,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.ApplicationSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ApplicationSuccessFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -491,13 +412,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.FirehoseFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.FirehoseFailureFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -514,13 +431,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.FirehoseSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.FirehoseSuccessFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -537,13 +450,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.HTTPFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.HTTPFailureFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -560,13 +469,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.HTTPSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.HTTPSuccessFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -583,13 +488,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.LambdaFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.LambdaFailureFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -606,13 +507,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.LambdaSuccessFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.LambdaSuccessFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -629,13 +526,9 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.SqsFailureFeedbackRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.SqsFailureFeedbackRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -659,19 +552,14 @@ func (mg *Topic) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *TopicPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -688,13 +576,9 @@ func (mg *TopicPolicy) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.Arn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -718,19 +602,14 @@ func (mg *TopicPolicy) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *TopicSubscription) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -747,13 +626,9 @@ func (mg *TopicSubscription) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.Endpoint = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.EndpointRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -770,13 +645,9 @@ func (mg *TopicSubscription) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.SubscriptionRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.SubscriptionRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -793,13 +664,9 @@ func (mg *TopicSubscription) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.ForProvider.TopicArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TopicArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -816,13 +683,9 @@ func (mg *TopicSubscription) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.InitProvider.Endpoint = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.EndpointRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -839,13 +702,9 @@ func (mg *TopicSubscription) ResolveReferences(ctx context.Context, c client.Rea mg.Spec.InitProvider.SubscriptionRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.SubscriptionRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/sqs/v1beta1/zz_generated.resolvers.go b/apis/sqs/v1beta1/zz_generated.resolvers.go index 916dc2b0f6..85c18baa31 100644 --- a/apis/sqs/v1beta1/zz_generated.resolvers.go +++ b/apis/sqs/v1beta1/zz_generated.resolvers.go @@ -20,19 +20,14 @@ func (mg *QueuePolicy) ResolveReferences( // ResolveReferences of this QueuePoli ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -49,13 +44,9 @@ func (mg *QueuePolicy) ResolveReferences( // ResolveReferences of this QueuePoli mg.Spec.ForProvider.QueueURL = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.QueueURLRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -79,19 +70,14 @@ func (mg *QueuePolicy) ResolveReferences( // ResolveReferences of this QueuePoli func (mg *QueueRedriveAllowPolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -108,13 +94,9 @@ func (mg *QueueRedriveAllowPolicy) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.QueueURL = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.QueueURLRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -138,19 +120,14 @@ func (mg *QueueRedriveAllowPolicy) ResolveReferences(ctx context.Context, c clie func (mg *QueueRedrivePolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -167,13 +144,9 @@ func (mg *QueueRedrivePolicy) ResolveReferences(ctx context.Context, c client.Re mg.Spec.ForProvider.QueueURL = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.QueueURLRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", - - "v1beta1", "Queue", "QueueList") + m, l, err = apisresolver.GetManagedResource("sqs.aws.upbound.io", "v1beta1", "Queue", "QueueList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/apis/ssm/v1beta1/zz_generated.resolvers.go b/apis/ssm/v1beta1/zz_generated.resolvers.go index 47000e344f..399d6a93ff 100644 --- a/apis/ssm/v1beta1/zz_generated.resolvers.go +++ b/apis/ssm/v1beta1/zz_generated.resolvers.go @@ -22,19 +22,14 @@ func (mg *Activation) ResolveReferences( // ResolveReferences of this Activation ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -51,13 +46,9 @@ func (mg *Activation) ResolveReferences( // ResolveReferences of this Activation mg.Spec.ForProvider.IAMRole = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.IAMRoleRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -81,18 +72,14 @@ func (mg *Activation) ResolveReferences( // ResolveReferences of this Activation func (mg *Association) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", - - "v1beta1", "Document", "DocumentList") + m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", "v1beta1", "Document", "DocumentList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -109,12 +96,9 @@ func (mg *Association) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.Name = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.NameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", - - "v1beta1", "Document", "DocumentList") + m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", "v1beta1", "Document", "DocumentList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -138,15 +122,12 @@ func (mg *Association) ResolveReferences(ctx context.Context, c client.Reader) e func (mg *DefaultPatchBaseline) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", - - "v1beta1", "PatchBaseline", "PatchBaselineList") + m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", "v1beta1", "PatchBaseline", "PatchBaselineList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -165,9 +146,7 @@ func (mg *DefaultPatchBaseline) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.BaselineID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BaselineIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", - - "v1beta1", "PatchBaseline", "PatchBaselineList") + m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", "v1beta1", "PatchBaseline", "PatchBaselineList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -186,9 +165,7 @@ func (mg *DefaultPatchBaseline) ResolveReferences(ctx context.Context, c client. mg.Spec.ForProvider.OperatingSystem = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.OperatingSystemRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", - - "v1beta1", "PatchBaseline", "PatchBaselineList") + m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", "v1beta1", "PatchBaseline", "PatchBaselineList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -207,9 +184,7 @@ func (mg *DefaultPatchBaseline) ResolveReferences(ctx context.Context, c client. mg.Spec.InitProvider.BaselineID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.BaselineIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", - - "v1beta1", "PatchBaseline", "PatchBaselineList") + m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", "v1beta1", "PatchBaseline", "PatchBaselineList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -235,15 +210,12 @@ func (mg *DefaultPatchBaseline) ResolveReferences(ctx context.Context, c client. func (mg *MaintenanceWindowTarget) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", - - "v1beta1", "MaintenanceWindow", "MaintenanceWindowList") + m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", "v1beta1", "MaintenanceWindow", "MaintenanceWindowList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -262,9 +234,7 @@ func (mg *MaintenanceWindowTarget) ResolveReferences(ctx context.Context, c clie mg.Spec.ForProvider.WindowID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.WindowIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", - - "v1beta1", "MaintenanceWindow", "MaintenanceWindowList") + m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", "v1beta1", "MaintenanceWindow", "MaintenanceWindowList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -290,19 +260,14 @@ func (mg *MaintenanceWindowTarget) ResolveReferences(ctx context.Context, c clie func (mg *MaintenanceWindowTask) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -319,12 +284,9 @@ func (mg *MaintenanceWindowTask) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.ServiceRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServiceRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -345,15 +307,10 @@ func (mg *MaintenanceWindowTask) ResolveReferences(ctx context.Context, c client for i4 := 0; i4 < len(mg.Spec.ForProvider.TaskInvocationParameters[i3].RunCommandParameters); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.TaskInvocationParameters[i3].RunCommandParameters[i4].NotificationConfig); i5++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.TaskInvocationParameters[i3].RunCommandParameters[i4].NotificationConfig[i5].NotificationArn), Extract: resource.ExtractParamPath("arn", true), @@ -374,15 +331,10 @@ func (mg *MaintenanceWindowTask) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.ForProvider.TaskInvocationParameters); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.TaskInvocationParameters[i3].RunCommandParameters); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.TaskInvocationParameters[i3].RunCommandParameters[i4].OutputS3Bucket), Extract: resource.ExtractResourceID(), @@ -402,15 +354,10 @@ func (mg *MaintenanceWindowTask) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.ForProvider.TaskInvocationParameters); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.TaskInvocationParameters[i3].RunCommandParameters); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.TaskInvocationParameters[i3].RunCommandParameters[i4].ServiceRoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -428,13 +375,10 @@ func (mg *MaintenanceWindowTask) ResolveReferences(ctx context.Context, c client } } { - m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", - - "v1beta1", "MaintenanceWindow", "MaintenanceWindowList") + m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", "v1beta1", "MaintenanceWindow", "MaintenanceWindowList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.WindowID), Extract: resource.ExtractResourceID(), @@ -449,13 +393,9 @@ func (mg *MaintenanceWindowTask) ResolveReferences(ctx context.Context, c client mg.Spec.ForProvider.WindowID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.WindowIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -472,12 +412,9 @@ func (mg *MaintenanceWindowTask) ResolveReferences(ctx context.Context, c client mg.Spec.InitProvider.ServiceRoleArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ServiceRoleArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -498,15 +435,10 @@ func (mg *MaintenanceWindowTask) ResolveReferences(ctx context.Context, c client for i4 := 0; i4 < len(mg.Spec.InitProvider.TaskInvocationParameters[i3].RunCommandParameters); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.TaskInvocationParameters[i3].RunCommandParameters[i4].NotificationConfig); i5++ { { - m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", - - "v1beta1", "Topic", "TopicList") + m, l, err = apisresolver.GetManagedResource("sns.aws.upbound.io", "v1beta1", "Topic", "TopicList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.TaskInvocationParameters[i3].RunCommandParameters[i4].NotificationConfig[i5].NotificationArn), Extract: resource.ExtractParamPath("arn", true), @@ -527,15 +459,10 @@ func (mg *MaintenanceWindowTask) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.InitProvider.TaskInvocationParameters); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.TaskInvocationParameters[i3].RunCommandParameters); i4++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.TaskInvocationParameters[i3].RunCommandParameters[i4].OutputS3Bucket), Extract: resource.ExtractResourceID(), @@ -555,15 +482,10 @@ func (mg *MaintenanceWindowTask) ResolveReferences(ctx context.Context, c client for i3 := 0; i3 < len(mg.Spec.InitProvider.TaskInvocationParameters); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.TaskInvocationParameters[i3].RunCommandParameters); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.TaskInvocationParameters[i3].RunCommandParameters[i4].ServiceRoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -581,13 +503,10 @@ func (mg *MaintenanceWindowTask) ResolveReferences(ctx context.Context, c client } } { - m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", - - "v1beta1", "MaintenanceWindow", "MaintenanceWindowList") + m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", "v1beta1", "MaintenanceWindow", "MaintenanceWindowList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.WindowID), Extract: resource.ExtractResourceID(), @@ -609,15 +528,12 @@ func (mg *MaintenanceWindowTask) ResolveReferences(ctx context.Context, c client func (mg *PatchGroup) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", - - "v1beta1", "PatchBaseline", "PatchBaselineList") + m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", "v1beta1", "PatchBaseline", "PatchBaselineList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -636,9 +552,7 @@ func (mg *PatchGroup) ResolveReferences(ctx context.Context, c client.Reader) er mg.Spec.ForProvider.BaselineID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BaselineIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", - - "v1beta1", "PatchBaseline", "PatchBaselineList") + m, l, err = apisresolver.GetManagedResource("ssm.aws.upbound.io", "v1beta1", "PatchBaseline", "PatchBaselineList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -664,7 +578,6 @@ func (mg *PatchGroup) ResolveReferences(ctx context.Context, c client.Reader) er func (mg *ResourceDataSync) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -672,15 +585,10 @@ func (mg *ResourceDataSync) ResolveReferences(ctx context.Context, c client.Read for i3 := 0; i3 < len(mg.Spec.ForProvider.S3Destination); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.S3Destination[i3].BucketName), Extract: reference.ExternalName(), @@ -698,15 +606,10 @@ func (mg *ResourceDataSync) ResolveReferences(ctx context.Context, c client.Read } for i3 := 0; i3 < len(mg.Spec.ForProvider.S3Destination); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.S3Destination[i3].Region), Extract: resource.ExtractParamPath("region", false), @@ -724,15 +627,10 @@ func (mg *ResourceDataSync) ResolveReferences(ctx context.Context, c client.Read } for i3 := 0; i3 < len(mg.Spec.InitProvider.S3Destination); i3++ { { - m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", - - "v1beta1", "Bucket", "BucketList") + m, l, err = apisresolver.GetManagedResource("s3.aws.upbound.io", "v1beta1", "Bucket", "BucketList") if err != nil { - return errors.Wrap( - err, "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.S3Destination[i3].BucketName), Extract: reference.ExternalName(), diff --git a/apis/ssoadmin/v1beta1/zz_generated.resolvers.go b/apis/ssoadmin/v1beta1/zz_generated.resolvers.go index 1b04e107e0..0c43e7136f 100644 --- a/apis/ssoadmin/v1beta1/zz_generated.resolvers.go +++ b/apis/ssoadmin/v1beta1/zz_generated.resolvers.go @@ -22,15 +22,12 @@ func (mg *AccountAssignment) ResolveReferences( // ResolveReferences of this Acc ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ssoadmin.aws.upbound.io", - - "v1beta1", "PermissionSet", "PermissionSetList") + m, l, err = apisresolver.GetManagedResource("ssoadmin.aws.upbound.io", "v1beta1", "PermissionSet", "PermissionSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -49,12 +46,9 @@ func (mg *AccountAssignment) ResolveReferences( // ResolveReferences of this Acc mg.Spec.ForProvider.PermissionSetArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.PermissionSetArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("identitystore.aws.upbound.io", - - "v1beta1", "Group", "GroupList") + m, l, err = apisresolver.GetManagedResource("identitystore.aws.upbound.io", "v1beta1", "Group", "GroupList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -78,7 +72,6 @@ func (mg *AccountAssignment) ResolveReferences( // ResolveReferences of this Acc func (mg *CustomerManagedPolicyAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -86,13 +79,10 @@ func (mg *CustomerManagedPolicyAttachment) ResolveReferences(ctx context.Context for i3 := 0; i3 < len(mg.Spec.ForProvider.CustomerManagedPolicyReference); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.CustomerManagedPolicyReference[i3].Name), Extract: reference.ExternalName(), @@ -109,13 +99,10 @@ func (mg *CustomerManagedPolicyAttachment) ResolveReferences(ctx context.Context } { - m, l, err = apisresolver.GetManagedResource("ssoadmin.aws.upbound.io", - - "v1beta1", "PermissionSet", "PermissionSetList") + m, l, err = apisresolver.GetManagedResource("ssoadmin.aws.upbound.io", "v1beta1", "PermissionSet", "PermissionSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.PermissionSetArn), Extract: resource.ExtractParamPath("arn", true), @@ -132,13 +119,10 @@ func (mg *CustomerManagedPolicyAttachment) ResolveReferences(ctx context.Context for i3 := 0; i3 < len(mg.Spec.InitProvider.CustomerManagedPolicyReference); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.CustomerManagedPolicyReference[i3].Name), Extract: reference.ExternalName(), @@ -162,15 +146,12 @@ func (mg *CustomerManagedPolicyAttachment) ResolveReferences(ctx context.Context func (mg *ManagedPolicyAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ssoadmin.aws.upbound.io", - - "v1beta1", "PermissionSet", "PermissionSetList") + m, l, err = apisresolver.GetManagedResource("ssoadmin.aws.upbound.io", "v1beta1", "PermissionSet", "PermissionSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -196,15 +177,12 @@ func (mg *ManagedPolicyAttachment) ResolveReferences(ctx context.Context, c clie func (mg *PermissionSetInlinePolicy) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ssoadmin.aws.upbound.io", - - "v1beta1", "PermissionSet", "PermissionSetList") + m, l, err = apisresolver.GetManagedResource("ssoadmin.aws.upbound.io", "v1beta1", "PermissionSet", "PermissionSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -230,15 +208,12 @@ func (mg *PermissionSetInlinePolicy) ResolveReferences(ctx context.Context, c cl func (mg *PermissionsBoundaryAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ssoadmin.aws.upbound.io", - - "v1beta1", "PermissionSet", "PermissionSetList") + m, l, err = apisresolver.GetManagedResource("ssoadmin.aws.upbound.io", "v1beta1", "PermissionSet", "PermissionSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -260,13 +235,10 @@ func (mg *PermissionsBoundaryAttachment) ResolveReferences(ctx context.Context, for i3 := 0; i3 < len(mg.Spec.ForProvider.PermissionsBoundary); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.PermissionsBoundary[i3].CustomerManagedPolicyReference); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.PermissionsBoundary[i3].CustomerManagedPolicyReference[i4].Name), Extract: reference.ExternalName(), @@ -286,13 +258,10 @@ func (mg *PermissionsBoundaryAttachment) ResolveReferences(ctx context.Context, for i3 := 0; i3 < len(mg.Spec.InitProvider.PermissionsBoundary); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.PermissionsBoundary[i3].CustomerManagedPolicyReference); i4++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Policy", "PolicyList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Policy", "PolicyList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.PermissionsBoundary[i3].CustomerManagedPolicyReference[i4].Name), Extract: reference.ExternalName(), diff --git a/apis/timestreamwrite/v1beta1/zz_generated.resolvers.go b/apis/timestreamwrite/v1beta1/zz_generated.resolvers.go index 0ab5e9c55b..6f06a6b4fa 100644 --- a/apis/timestreamwrite/v1beta1/zz_generated.resolvers.go +++ b/apis/timestreamwrite/v1beta1/zz_generated.resolvers.go @@ -12,28 +12,22 @@ import ( errors "github.com/pkg/errors" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - client "sigs.k8s.io/controller-runtime/pkg/client" - - // ResolveReferences of this Database. apisresolver "github.com/upbound/provider-aws/internal/apis" + client "sigs.k8s.io/controller-runtime/pkg/client" ) -func (mg *Database) ResolveReferences(ctx context.Context, c client.Reader) error { +func (mg *Database) ResolveReferences( // ResolveReferences of this Database. + ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,13 +44,9 @@ func (mg *Database) ResolveReferences(ctx context.Context, c client.Reader) erro mg.Spec.ForProvider.KMSKeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KMSKeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -80,15 +70,12 @@ func (mg *Database) ResolveReferences(ctx context.Context, c client.Reader) erro func (mg *Table) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("timestreamwrite.aws.upbound.io", - - "v1beta1", "Database", "DatabaseList") + m, l, err = apisresolver.GetManagedResource("timestreamwrite.aws.upbound.io", "v1beta1", "Database", "DatabaseList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } diff --git a/apis/transcribe/v1beta1/zz_generated.resolvers.go b/apis/transcribe/v1beta1/zz_generated.resolvers.go index 7f2aeabd5c..2ec2d97327 100644 --- a/apis/transcribe/v1beta1/zz_generated.resolvers.go +++ b/apis/transcribe/v1beta1/zz_generated.resolvers.go @@ -21,7 +21,6 @@ func (mg *LanguageModel) ResolveReferences( // ResolveReferences of this Languag ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -29,15 +28,10 @@ func (mg *LanguageModel) ResolveReferences( // ResolveReferences of this Languag for i3 := 0; i3 < len(mg.Spec.ForProvider.InputDataConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.InputDataConfig[i3].DataAccessRoleArn), Extract: resource.ExtractParamPath("arn", true), @@ -55,15 +49,10 @@ func (mg *LanguageModel) ResolveReferences( // ResolveReferences of this Languag } for i3 := 0; i3 < len(mg.Spec.InitProvider.InputDataConfig); i3++ { { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.InputDataConfig[i3].DataAccessRoleArn), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/transfer/v1beta1/zz_generated.resolvers.go b/apis/transfer/v1beta1/zz_generated.resolvers.go index 118ee4c30b..21be376023 100644 --- a/apis/transfer/v1beta1/zz_generated.resolvers.go +++ b/apis/transfer/v1beta1/zz_generated.resolvers.go @@ -23,18 +23,14 @@ import ( func (mg *SSHKey) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", - - "v1beta1", "Server", "ServerList") + m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", "v1beta1", "Server", "ServerList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -51,9 +47,7 @@ func (mg *SSHKey) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.ServerID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServerIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -72,12 +66,9 @@ func (mg *SSHKey) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.UserName = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.UserNameRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", - - "v1beta1", "Server", "ServerList") + m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", "v1beta1", "Server", "ServerList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -94,9 +85,7 @@ func (mg *SSHKey) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.ServerID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.ServerIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", - - "v1beta1", "User", "UserList") + m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", "v1beta1", "User", "UserList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -122,18 +111,14 @@ func (mg *SSHKey) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *Server) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -150,12 +135,9 @@ func (mg *Server) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.Certificate = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.CertificateRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", - - "v1beta1", "Directory", "DirectoryList") + m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", "v1beta1", "Directory", "DirectoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -174,15 +156,10 @@ func (mg *Server) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.EndpointDetails); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EndpointDetails[i3].VPCID), Extract: resource.ExtractResourceID(), @@ -199,15 +176,10 @@ func (mg *Server) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LoggingRole), Extract: resource.ExtractParamPath("arn", true), @@ -222,12 +194,9 @@ func (mg *Server) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.ForProvider.LoggingRole = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.LoggingRoleRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", - - "v1beta1", "Certificate", "CertificateList") + m, l, err = apisresolver.GetManagedResource("acm.aws.upbound.io", "v1beta1", "Certificate", "CertificateList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -244,12 +213,9 @@ func (mg *Server) ResolveReferences(ctx context.Context, c client.Reader) error mg.Spec.InitProvider.Certificate = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.CertificateRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", - - "v1beta1", "Directory", "DirectoryList") + m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", "v1beta1", "Directory", "DirectoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -268,15 +234,10 @@ func (mg *Server) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.InitProvider.EndpointDetails); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "VPC", "VPCList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "VPC", "VPCList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EndpointDetails[i3].VPCID), Extract: resource.ExtractResourceID(), @@ -293,15 +254,10 @@ func (mg *Server) ResolveReferences(ctx context.Context, c client.Reader) error } { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LoggingRole), Extract: resource.ExtractParamPath("arn", true), @@ -323,18 +279,14 @@ func (mg *Server) ResolveReferences(ctx context.Context, c client.Reader) error func (mg *Tag) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", - - "v1beta1", "Server", "ServerList") + m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", "v1beta1", "Server", "ServerList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -351,12 +303,9 @@ func (mg *Tag) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.ResourceArn = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ResourceArnRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", - - "v1beta1", "Server", "ServerList") + m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", "v1beta1", "Server", "ServerList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -380,19 +329,14 @@ func (mg *Tag) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *User) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -409,12 +353,9 @@ func (mg *User) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.Role = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RoleRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", - - "v1beta1", "Server", "ServerList") + m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", "v1beta1", "Server", "ServerList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -431,13 +372,9 @@ func (mg *User) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.ForProvider.ServerID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServerIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", - - "v1beta1", "Role", "RoleList") + m, l, err = apisresolver.GetManagedResource("iam.aws.upbound.io", "v1beta1", "Role", "RoleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -454,12 +391,9 @@ func (mg *User) ResolveReferences(ctx context.Context, c client.Reader) error { mg.Spec.InitProvider.Role = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.RoleRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", - - "v1beta1", "Server", "ServerList") + m, l, err = apisresolver.GetManagedResource("transfer.aws.upbound.io", "v1beta1", "Server", "ServerList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -483,7 +417,6 @@ func (mg *User) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *Workflow) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -492,14 +425,10 @@ func (mg *Workflow) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.ForProvider.Steps); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Steps[i3].CustomStepDetails); i4++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Steps[i3].CustomStepDetails[i4].Target), Extract: resource.ExtractParamPath("arn", true), @@ -519,14 +448,10 @@ func (mg *Workflow) ResolveReferences(ctx context.Context, c client.Reader) erro for i3 := 0; i3 < len(mg.Spec.InitProvider.Steps); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Steps[i3].CustomStepDetails); i4++ { { - m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", - - "v1beta1", "Function", "FunctionList") + m, l, err = apisresolver.GetManagedResource("lambda.aws.upbound.io", "v1beta1", "Function", "FunctionList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Steps[i3].CustomStepDetails[i4].Target), Extract: resource.ExtractParamPath("arn", true), diff --git a/apis/waf/v1beta1/zz_generated.resolvers.go b/apis/waf/v1beta1/zz_generated.resolvers.go index bae2b10187..2fce48b378 100644 --- a/apis/waf/v1beta1/zz_generated.resolvers.go +++ b/apis/waf/v1beta1/zz_generated.resolvers.go @@ -21,7 +21,6 @@ func (mg *RateBasedRule) ResolveReferences( // ResolveReferences of this RateBas ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -29,15 +28,10 @@ func (mg *RateBasedRule) ResolveReferences( // ResolveReferences of this RateBas for i3 := 0; i3 < len(mg.Spec.ForProvider.Predicates); i3++ { { - m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", - - "v1beta1", "IPSet", "IPSetList") + m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", "v1beta1", "IPSet", "IPSetList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Predicates[i3].DataID), Extract: resource.ExtractResourceID(), @@ -55,15 +49,10 @@ func (mg *RateBasedRule) ResolveReferences( // ResolveReferences of this RateBas } for i3 := 0; i3 < len(mg.Spec.InitProvider.Predicates); i3++ { { - m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", - - "v1beta1", "IPSet", "IPSetList") + m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", "v1beta1", "IPSet", "IPSetList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Predicates[i3].DataID), Extract: resource.ExtractResourceID(), @@ -87,7 +76,6 @@ func (mg *RateBasedRule) ResolveReferences( // ResolveReferences of this RateBas func (mg *RegexMatchSet) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -95,13 +83,10 @@ func (mg *RegexMatchSet) ResolveReferences(ctx context.Context, c client.Reader) for i3 := 0; i3 < len(mg.Spec.ForProvider.RegexMatchTuple); i3++ { { - m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", - - "v1beta1", "RegexPatternSet", "RegexPatternSetList") + m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", "v1beta1", "RegexPatternSet", "RegexPatternSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RegexMatchTuple[i3].RegexPatternSetID), Extract: resource.ExtractResourceID(), @@ -119,13 +104,10 @@ func (mg *RegexMatchSet) ResolveReferences(ctx context.Context, c client.Reader) } for i3 := 0; i3 < len(mg.Spec.InitProvider.RegexMatchTuple); i3++ { { - m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", - - "v1beta1", "RegexPatternSet", "RegexPatternSetList") + m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", "v1beta1", "RegexPatternSet", "RegexPatternSetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RegexMatchTuple[i3].RegexPatternSetID), Extract: resource.ExtractResourceID(), @@ -149,7 +131,6 @@ func (mg *RegexMatchSet) ResolveReferences(ctx context.Context, c client.Reader) func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -157,15 +138,10 @@ func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.ForProvider.Predicates); i3++ { { - m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", - - "v1beta1", "IPSet", "IPSetList") + m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", "v1beta1", "IPSet", "IPSetList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Predicates[i3].DataID), Extract: resource.ExtractResourceID(), @@ -183,15 +159,10 @@ func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { } for i3 := 0; i3 < len(mg.Spec.InitProvider.Predicates); i3++ { { - m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", - - "v1beta1", "IPSet", "IPSetList") + m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", "v1beta1", "IPSet", "IPSetList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Predicates[i3].DataID), Extract: resource.ExtractResourceID(), @@ -215,7 +186,6 @@ func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *WebACL) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -223,13 +193,10 @@ func (mg *WebACL) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.LoggingConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LoggingConfiguration[i3].LogDestination), Extract: resource.ExtractParamPath("arn", false), @@ -247,15 +214,10 @@ func (mg *WebACL) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.Rules); i3++ { { - m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", - - "v1beta1", "Rule", "RuleList") + m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", "v1beta1", "Rule", "RuleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Rules[i3].RuleID), Extract: resource.ExtractResourceID(), @@ -273,13 +235,10 @@ func (mg *WebACL) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.LoggingConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LoggingConfiguration[i3].LogDestination), Extract: resource.ExtractParamPath("arn", false), @@ -297,15 +256,10 @@ func (mg *WebACL) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.Rules); i3++ { { - m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", - - "v1beta1", "Rule", "RuleList") + m, l, err = apisresolver.GetManagedResource("waf.aws.upbound.io", "v1beta1", "Rule", "RuleList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Rules[i3].RuleID), Extract: resource.ExtractResourceID(), diff --git a/apis/wafregional/v1beta1/zz_generated.resolvers.go b/apis/wafregional/v1beta1/zz_generated.resolvers.go index e60eff2a56..f632f1e935 100644 --- a/apis/wafregional/v1beta1/zz_generated.resolvers.go +++ b/apis/wafregional/v1beta1/zz_generated.resolvers.go @@ -21,7 +21,6 @@ func (mg *RateBasedRule) ResolveReferences( // ResolveReferences of this RateBas ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -29,14 +28,10 @@ func (mg *RateBasedRule) ResolveReferences( // ResolveReferences of this RateBas for i3 := 0; i3 < len(mg.Spec.ForProvider.Predicate); i3++ { { - m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", - - "v1beta1", "IPSet", "IPSetList") + m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", "v1beta1", "IPSet", "IPSetList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Predicate[i3].DataID), Extract: resource.ExtractResourceID(), @@ -54,14 +49,10 @@ func (mg *RateBasedRule) ResolveReferences( // ResolveReferences of this RateBas } for i3 := 0; i3 < len(mg.Spec.InitProvider.Predicate); i3++ { { - m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", - - "v1beta1", "IPSet", "IPSetList") + m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", "v1beta1", "IPSet", "IPSetList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Predicate[i3].DataID), Extract: resource.ExtractResourceID(), @@ -85,7 +76,6 @@ func (mg *RateBasedRule) ResolveReferences( // ResolveReferences of this RateBas func (mg *RegexMatchSet) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -93,14 +83,10 @@ func (mg *RegexMatchSet) ResolveReferences(ctx context.Context, c client.Reader) for i3 := 0; i3 < len(mg.Spec.ForProvider.RegexMatchTuple); i3++ { { - m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", - - "v1beta1", "RegexPatternSet", "RegexPatternSetList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", "v1beta1", "RegexPatternSet", "RegexPatternSetList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RegexMatchTuple[i3].RegexPatternSetID), Extract: resource.ExtractResourceID(), @@ -118,14 +104,10 @@ func (mg *RegexMatchSet) ResolveReferences(ctx context.Context, c client.Reader) } for i3 := 0; i3 < len(mg.Spec.InitProvider.RegexMatchTuple); i3++ { { - m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", - - "v1beta1", "RegexPatternSet", "RegexPatternSetList") - if err != - nil { + m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", "v1beta1", "RegexPatternSet", "RegexPatternSetList") + if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RegexMatchTuple[i3].RegexPatternSetID), Extract: resource.ExtractResourceID(), @@ -149,7 +131,6 @@ func (mg *RegexMatchSet) ResolveReferences(ctx context.Context, c client.Reader) func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -157,14 +138,10 @@ func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { for i3 := 0; i3 < len(mg.Spec.ForProvider.Predicate); i3++ { { - m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", - - "v1beta1", "IPSet", "IPSetList") + m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", "v1beta1", "IPSet", "IPSetList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Predicate[i3].DataID), Extract: resource.ExtractResourceID(), @@ -182,14 +159,10 @@ func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { } for i3 := 0; i3 < len(mg.Spec.InitProvider.Predicate); i3++ { { - m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", - - "v1beta1", "IPSet", "IPSetList") + m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", "v1beta1", "IPSet", "IPSetList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Predicate[i3].DataID), Extract: resource.ExtractResourceID(), @@ -213,7 +186,6 @@ func (mg *Rule) ResolveReferences(ctx context.Context, c client.Reader) error { func (mg *WebACL) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse @@ -221,13 +193,10 @@ func (mg *WebACL) ResolveReferences(ctx context.Context, c client.Reader) error for i3 := 0; i3 < len(mg.Spec.ForProvider.LoggingConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.LoggingConfiguration[i3].LogDestination), Extract: resource.ExtractParamPath("arn", false), @@ -245,14 +214,10 @@ func (mg *WebACL) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.ForProvider.Rule); i3++ { { - m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", - - "v1beta1", "Rule", "RuleList") + m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", "v1beta1", "Rule", "RuleList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Rule[i3].RuleID), Extract: resource.ExtractResourceID(), @@ -270,13 +235,10 @@ func (mg *WebACL) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.LoggingConfiguration); i3++ { { - m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", - - "v1beta1", "DeliveryStream", "DeliveryStreamList") + m, l, err = apisresolver.GetManagedResource("firehose.aws.upbound.io", "v1beta1", "DeliveryStream", "DeliveryStreamList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.LoggingConfiguration[i3].LogDestination), Extract: resource.ExtractParamPath("arn", false), @@ -294,14 +256,10 @@ func (mg *WebACL) ResolveReferences(ctx context.Context, c client.Reader) error } for i3 := 0; i3 < len(mg.Spec.InitProvider.Rule); i3++ { { - m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", - - "v1beta1", "Rule", "RuleList") + m, l, err = apisresolver.GetManagedResource("wafregional.aws.upbound.io", "v1beta1", "Rule", "RuleList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Rule[i3].RuleID), Extract: resource.ExtractResourceID(), diff --git a/apis/workspaces/v1beta1/zz_generated.resolvers.go b/apis/workspaces/v1beta1/zz_generated.resolvers.go index 0197535381..601e5fa334 100644 --- a/apis/workspaces/v1beta1/zz_generated.resolvers.go +++ b/apis/workspaces/v1beta1/zz_generated.resolvers.go @@ -21,19 +21,15 @@ func (mg *Directory) ResolveReferences( // ResolveReferences of this Directory. ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", - - "v1beta1", "Directory", "DirectoryList") + m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", "v1beta1", "Directory", "DirectoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,9 +46,7 @@ func (mg *Directory) ResolveReferences( // ResolveReferences of this Directory. mg.Spec.ForProvider.DirectoryID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.DirectoryIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -73,13 +67,10 @@ func (mg *Directory) ResolveReferences( // ResolveReferences of this Directory. for i3 := 0; i3 < len(mg.Spec.ForProvider.WorkspaceCreationProperties); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.WorkspaceCreationProperties[i3].CustomSecurityGroupID), Extract: resource.ExtractResourceID(), @@ -96,14 +87,10 @@ func (mg *Directory) ResolveReferences( // ResolveReferences of this Directory. } { - m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", - - "v1beta1", "Directory", "DirectoryList") + m, l, err = apisresolver.GetManagedResource("ds.aws.upbound.io", "v1beta1", "Directory", "DirectoryList") if err != nil { - return errors. - Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DirectoryID), Extract: resource.ExtractResourceID(), @@ -118,9 +105,7 @@ func (mg *Directory) ResolveReferences( // ResolveReferences of this Directory. mg.Spec.InitProvider.DirectoryID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.InitProvider.DirectoryIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "Subnet", "SubnetList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "Subnet", "SubnetList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } @@ -141,13 +126,10 @@ func (mg *Directory) ResolveReferences( // ResolveReferences of this Directory. for i3 := 0; i3 < len(mg.Spec.InitProvider.WorkspaceCreationProperties); i3++ { { - m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", - - "v1beta1", "SecurityGroup", "SecurityGroupList") + m, l, err = apisresolver.GetManagedResource("ec2.aws.upbound.io", "v1beta1", "SecurityGroup", "SecurityGroupList") if err != nil { return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.WorkspaceCreationProperties[i3].CustomSecurityGroupID), Extract: resource.ExtractResourceID(), diff --git a/apis/xray/v1beta1/zz_generated.resolvers.go b/apis/xray/v1beta1/zz_generated.resolvers.go index 50ccc72a80..33d2824215 100644 --- a/apis/xray/v1beta1/zz_generated.resolvers.go +++ b/apis/xray/v1beta1/zz_generated.resolvers.go @@ -21,19 +21,14 @@ func (mg *EncryptionConfig) ResolveReferences( // ResolveReferences of this Encr ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList - r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse var err error { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ @@ -50,13 +45,9 @@ func (mg *EncryptionConfig) ResolveReferences( // ResolveReferences of this Encr mg.Spec.ForProvider.KeyID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.KeyIDRef = rsp.ResolvedReference { - m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", - - "v1beta1", "Key", "KeyList") + m, l, err = apisresolver.GetManagedResource("kms.aws.upbound.io", "v1beta1", "Key", "KeyList") if err != nil { - return errors.Wrap(err, - "failed to get the reference target managed resource and its list for reference resolution", - ) + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") } rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ diff --git a/go.mod b/go.mod index 0ecdd3a124..ab11b5ce15 100644 --- a/go.mod +++ b/go.mod @@ -277,4 +277,4 @@ replace github.com/hashicorp/terraform-provider-aws => github.com/upbound/terraf replace github.com/hashicorp/terraform-plugin-log => github.com/gdavison/terraform-plugin-log v0.0.0-20230928191232-6c653d8ef8fb -replace github.com/crossplane/upjet => github.com/ulucinar/upbound-upjet v0.0.0-20240123140434-676239ae43d1 +replace github.com/crossplane/upjet => github.com/ulucinar/upbound-upjet v0.0.0-20240124000648-55ef33c2e22d diff --git a/go.sum b/go.sum index b19d385339..5c99a17510 100644 --- a/go.sum +++ b/go.sum @@ -554,8 +554,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ= github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w= -github.com/ulucinar/upbound-upjet v0.0.0-20240123140434-676239ae43d1 h1:DkRxHtA2aJknhB0OKzLovGz+EjhaO6ilWgUVXwEvfpw= -github.com/ulucinar/upbound-upjet v0.0.0-20240123140434-676239ae43d1/go.mod h1:nyvdbW1znPjCFn9h7uwhTEeumNEmgFwoqbrHP7oOw3U= +github.com/ulucinar/upbound-upjet v0.0.0-20240124000648-55ef33c2e22d h1:P4YMFsB5Gz30v7+1KIDFxXjXH4bdXgM3S9VcRFMSHP0= +github.com/ulucinar/upbound-upjet v0.0.0-20240124000648-55ef33c2e22d/go.mod h1:2nKu8GTR2rx4TWnopLXevUzfjI/QUXhpwBfMXoCYGL8= github.com/upbound/terraform-provider-aws v0.0.0-20231221174129-7cc0c6603869 h1:F6JOaiqx7J76/u/M8gAa99Me67/+i9wyPD7pWomES8k= github.com/upbound/terraform-provider-aws v0.0.0-20231221174129-7cc0c6603869/go.mod h1:Kb86v3lyFUggXmDTi53PPHLENdWUdD8t3IfjS7rFd+0= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=