Skip to content

Commit 77621c6

Browse files
committed
work
1 parent 74685dc commit 77621c6

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

mws/resource_mws_workspaces.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,13 @@ func ResourceMwsWorkspaces() common.Resource {
169169
}
170170

171171
var workspaceRunningUpdatesAllowed = map[string]struct{}{
172-
"credentials_id": {},
173-
"custom_tags": {},
172+
"credentials_id": {},
173+
"custom_tags": {},
174174
"managed_services_customer_managed_key_id": {},
175-
"network_id": {},
176-
"private_access_settings_id": {},
177-
"storage_customer_managed_key_id": {},
178-
"token": {},
175+
"network_id": {},
176+
"private_access_settings_id": {},
177+
"storage_customer_managed_key_id": {},
178+
"token": {},
179179
}
180180

181181
workspaceSchema := common.StructToSchema(workspace{},

mws/resource_mws_workspaces_test.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ func TestResourceWorkspaceCreate(t *testing.T) {
9191
CustomTags: map[string]string{
9292
"SoldToCode": "1234",
9393
},
94+
ForceSendFields: []string{"IsNoPublicIpEnabled"},
9495
}).Return(mockWaiter, nil)
9596
a.GetMockWorkspacesAPI().EXPECT().Get(mock.Anything, provisioning.GetWorkspaceRequest{
9697
WorkspaceId: 1234,
@@ -157,7 +158,8 @@ func TestResourceWorkspaceCreateGcp(t *testing.T) {
157158
GcpManagedNetworkConfig: &provisioning.GcpManagedNetworkConfig{
158159
SubnetCidr: "a",
159160
},
160-
WorkspaceName: "labdata",
161+
WorkspaceName: "labdata",
162+
ForceSendFields: []string{"IsNoPublicIpEnabled"},
161163
}).Return(mockWaiter, nil)
162164
a.GetMockWorkspacesAPI().EXPECT().Get(mock.Anything, provisioning.GetWorkspaceRequest{
163165
WorkspaceId: 1234,
@@ -253,7 +255,8 @@ func TestResourceWorkspaceCreateGcpPsc(t *testing.T) {
253255
GcpManagedNetworkConfig: &provisioning.GcpManagedNetworkConfig{
254256
SubnetCidr: "a",
255257
},
256-
WorkspaceName: "labdata",
258+
WorkspaceName: "labdata",
259+
ForceSendFields: []string{"IsNoPublicIpEnabled"},
257260
}).Return(mockWaiter, nil)
258261
a.GetMockWorkspacesAPI().EXPECT().Get(mock.Anything, provisioning.GetWorkspaceRequest{
259262
WorkspaceId: 1234,
@@ -329,6 +332,7 @@ func TestResourceWorkspaceCreateGcpCmk(t *testing.T) {
329332
WorkspaceName: "labdata",
330333
ManagedServicesCustomerManagedKeyId: "managed_services_cmk",
331334
StorageCustomerManagedKeyId: "storage_cmk",
335+
ForceSendFields: []string{"IsNoPublicIpEnabled"},
332336
}).Return(mockWaiter, nil)
333337
a.GetMockWorkspacesAPI().EXPECT().Get(mock.Anything, provisioning.GetWorkspaceRequest{
334338
WorkspaceId: 1234,
@@ -396,6 +400,7 @@ func TestResourceWorkspaceCreateWithIsNoPublicIPEnabledFalse(t *testing.T) {
396400
NetworkId: "fgh",
397401
ManagedServicesCustomerManagedKeyId: "def",
398402
StorageCustomerManagedKeyId: "def",
403+
ForceSendFields: []string{"IsNoPublicIpEnabled"},
399404
}).Return(mockWaiter, nil)
400405
a.GetMockWorkspacesAPI().EXPECT().Get(mock.Anything, provisioning.GetWorkspaceRequest{
401406
WorkspaceId: 1234,
@@ -456,6 +461,7 @@ func TestResourceWorkspaceCreateLegacyConfig(t *testing.T) {
456461
StorageConfigurationId: "ghi",
457462
NetworkId: "fgh",
458463
ManagedServicesCustomerManagedKeyId: "def",
464+
ForceSendFields: []string{"IsNoPublicIpEnabled"},
459465
}).Return(mockWaiter, nil)
460466
a.GetMockWorkspacesAPI().EXPECT().Get(mock.Anything, provisioning.GetWorkspaceRequest{
461467
WorkspaceId: 1234,
@@ -926,6 +932,7 @@ func TestCreateFailsAndCleansUp(t *testing.T) {
926932
NetworkId: "fgh",
927933
ManagedServicesCustomerManagedKeyId: "def",
928934
StorageCustomerManagedKeyId: "def",
935+
ForceSendFields: []string{"IsNoPublicIpEnabled"},
929936
}).Return(mockWaiter, nil)
930937

931938
// Expect the Get call to retrieve the failed workspace
@@ -1235,6 +1242,7 @@ func TestResourceWorkspaceCreateGcpManagedVPC(t *testing.T) {
12351242
DeploymentName: "900150983cd24fb0",
12361243
Location: "bcd",
12371244
WorkspaceName: "labdata",
1245+
ForceSendFields: []string{"IsNoPublicIpEnabled"},
12381246
}).Return(mockWaiter, nil)
12391247

12401248
// Expect the Get call to retrieve the workspace

0 commit comments

Comments
 (0)