From 59d279dda4c7874050c26f47b14fed0ed8a1e9ae Mon Sep 17 00:00:00 2001 From: hunterkepley Date: Thu, 12 Dec 2024 15:54:06 -0500 Subject: [PATCH] OCM-13068 | fix: Add required flags to oprole creation for cluster manual mode --- cmd/create/cluster/cmd.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/create/cluster/cmd.go b/cmd/create/cluster/cmd.go index c3c9ec38b..1d65b2ef2 100644 --- a/cmd/create/cluster/cmd.go +++ b/cmd/create/cluster/cmd.go @@ -3447,6 +3447,13 @@ func run(cmd *cobra.Command, _ []string) { if !output.HasFlag() || r.Reporter.IsTerminal() { r.Reporter.Infof("Preparing to create operator roles.") } + // Set flags for HCP shared VPC if needed + if vpcEndpointRoleArn != "" && route53RoleArn != "" && isHostedCP { + operatorroles.Cmd.Flags().Set(route53RoleArnFlag, route53RoleArn) + operatorroles.Cmd.Flags().Set(vpcEndpointRoleArnFlag, vpcEndpointRoleArn) + operatorroles.Cmd.Flags().Set(operatorroles.HostedCpFlag, strconv.FormatBool(isHostedCP)) + operatorroles.Cmd.Flags().Set(operatorroles.OidcConfigIdFlag, oidcConfig.ID()) + } operatorroles.Cmd.Run(operatorroles.Cmd, []string{clusterName, mode, permissionsBoundary}) if !output.HasFlag() || r.Reporter.IsTerminal() { r.Reporter.Infof("Preparing to create OIDC Provider.")