func validateAWSConfig()

in internal/iamrolesanywhere/aws_config.go [78:114]


func validateAWSConfig(cfg AWSConfig) error {
	var errs []error

	if cfg.TrustAnchorARN == "" {
		errs = append(errs, errors.New("TrustAnchorARN cannot be empty"))
	}

	if cfg.ProfileARN == "" {
		errs = append(errs, errors.New("ProfileARN cannot be empty"))
	}

	if cfg.RoleARN == "" {
		errs = append(errs, errors.New("RoleARN cannot be empty"))
	}

	if cfg.Region == "" {
		errs = append(errs, errors.New("Region cannot be empty"))
	}

	if cfg.NodeName == "" {
		errs = append(errs, errors.New("NodeName cannot be empty"))
	}

	if cfg.SigningHelperBinPath == "" {
		errs = append(errs, errors.New("Signing helper path cannot be empty"))
	}

	if cfg.CertificatePath == "" {
		errs = append(errs, errors.New("CertificatePath cannot be empty"))
	}

	if cfg.PrivateKeyPath == "" {
		errs = append(errs, errors.New("PrivateKeyPath cannot be empty"))
	}

	return errors.Join(errs...)
}