Skip to content

Commit

Permalink
Drop unused CheckStackReadyForCreateCluster method
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrisker committed Jun 27, 2022
1 parent a4f8a65 commit a6f808e
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions pkg/aws/cloudformation.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@ package aws

import (
"fmt"
"os"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cloudformation"
"github.com/aws/aws-sdk-go/service/iam"
"github.com/sirupsen/logrus"

"github.com/openshift/rosa/assets"
rprtr "github.com/openshift/rosa/pkg/reporter"
)

func readCloudFormationTemplate(path string) (string, error) {
Expand All @@ -40,18 +37,6 @@ func readCloudFormationTemplate(path string) (string, error) {
return string(cfTemplate), nil
}

// Validations will validate if CF stack/users exist
func CheckStackReadyForCreateCluster(reporter *rprtr.Object, logger *logrus.Logger) {
client := GetAWSClientForUserRegion(reporter, logger)
reporter.Debugf("Validating cloudformation stack exists")
stackExist, _, err := client.CheckStackReadyOrNotExisting(OsdCcsAdminStackName)
if !stackExist || err != nil {
reporter.Errorf("Cloudformation stack does not exist. Run `rosa init` first")
os.Exit(1)
}
reporter.Debugf("cloudformation stack is valid!")
}

// Ensure osdCcsAdmin IAM user is created
func (c *awsClient) EnsureOsdCcsAdminUser(stackName string, adminUserName string, awsRegion string) (bool, error) {
userExists := true
Expand Down

0 comments on commit a6f808e

Please sign in to comment.