Skip to content

Conversation

@aslilac
Copy link
Member

@aslilac aslilac commented Apr 15, 2025

...so that terraform has access to all of the fields that it's supposed to!

@aslilac aslilac requested a review from Emyrk April 15, 2025 17:16
@Emyrk
Copy link
Member

Emyrk commented Apr 15, 2025

We might want to add something like this:

	if o.Groups == nil {
		o.Groups = make([]string, 0)
	}
	
	if o.RBACRoles == nil {
		o.RBACRoles = make([]WorkspaceOwnerRBACRole, 0)
	}

nil vs empty slice might behave differently when actually using the type in terraform.

@aslilac aslilac requested a review from Emyrk April 15, 2025 17:52
@aslilac
Copy link
Member Author

aslilac commented Apr 15, 2025

I already allocate a slice regardless of length for the roles. poking at the resulting object did reveal that not allocating a slice for groups causes problems, so I do that now as well.

@aslilac aslilac merged commit 1998a47 into main Apr 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants