Skip to content

Commit

Permalink
Workspaces: Fix directory type (#7625)
Browse files Browse the repository at this point in the history
  • Loading branch information
archinksagar committed May 6, 2024
1 parent 06d0b2a commit fa52c54
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions moto/workspaces/models.py
Expand Up @@ -58,7 +58,8 @@ def __init__(
self.modification_states: List[
Dict[str, str]
] = [] # modify_workspace_properties
self.related_workspaces: List[Dict[str, str]] = [] # create_standy_workspace
# create_standy_workspace
self.related_workspaces: List[Dict[str, str]] = []
self.data_replication_settings: Dict[str, Any] = {}
# The properties of the standby WorkSpace related to related_workspaces
self.standby_workspaces_properties: List[Dict[str, Any]] = []
Expand Down Expand Up @@ -141,7 +142,13 @@ def __init__(
self.dns_ip_addresses = directory.dns_ip_addrs
self.customer_username = "Administrator"
self.iam_rold_id = f"arn:aws:iam::{account_id}:role/workspaces_DefaultRole"
self.directory_type = directory.directory_type
dir_type = directory.directory_type
if dir_type == "ADConnector":
self.directory_type = "AD_CONNECTOR"
elif dir_type == "SimpleAD":
self.directory_type = "SIMPLE_AD"
else:
self.directory_type = dir_type
self.workspace_security_group_id = security_group_id
self.state = "REGISTERED"
# Default values for workspace_creation_properties
Expand Down

0 comments on commit fa52c54

Please sign in to comment.