Skip to content

Commit 5e76079

Browse files
author
Ciprian Tibulca
authored
CLOUDP-229525: allow all api calls for gov (#2651)
1 parent a76f170 commit 5e76079

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internal/store/peering_connections.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func (s *Store) AWSContainers(projectID string) ([]atlasv2.CloudProviderContaine
175175
// GCPContainers encapsulates the logic to manage different cloud providers.
176176
func (s *Store) GCPContainers(projectID string) ([]atlasv2.CloudProviderContainer, error) {
177177
switch s.service {
178-
case config.CloudService:
178+
case config.CloudService, config.CloudGovService:
179179
result, _, err := s.clientv2.NetworkPeeringApi.ListPeeringContainerByCloudProvider(s.ctx, projectID).
180180
PageNum(0).
181181
ItemsPerPage(maxPerPage).

internal/store/private_endpoints.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (s *Store) DataLakeDeletePrivateEndpoint(projectID, endpointID string) erro
168168
// CreateInterfaceEndpoint encapsulates the logic to manage different cloud providers.
169169
func (s *Store) CreateInterfaceEndpoint(projectID, provider, endpointServiceID string, createRequest *atlasv2.CreateEndpointRequest) (*atlasv2.PrivateLinkEndpoint, error) {
170170
switch s.service {
171-
case config.CloudService:
171+
case config.CloudService, config.CloudGovService:
172172
result, _, err := s.clientv2.PrivateEndpointServicesApi.CreatePrivateEndpoint(s.ctx, projectID, provider,
173173
endpointServiceID, createRequest).Execute()
174174
return result, err
@@ -180,7 +180,7 @@ func (s *Store) CreateInterfaceEndpoint(projectID, provider, endpointServiceID s
180180
// InterfaceEndpoint encapsulates the logic to manage different cloud providers.
181181
func (s *Store) InterfaceEndpoint(projectID, cloudProvider, endpointServiceID, privateEndpointID string) (*atlasv2.PrivateLinkEndpoint, error) {
182182
switch s.service {
183-
case config.CloudService:
183+
case config.CloudService, config.CloudGovService:
184184
result, _, err := s.clientv2.PrivateEndpointServicesApi.GetPrivateEndpoint(s.ctx, projectID, cloudProvider, endpointServiceID, privateEndpointID).Execute()
185185
return result, err
186186
default:
@@ -191,7 +191,7 @@ func (s *Store) InterfaceEndpoint(projectID, cloudProvider, endpointServiceID, p
191191
// DeleteInterfaceEndpoint encapsulates the logic to manage different cloud providers.
192192
func (s *Store) DeleteInterfaceEndpoint(projectID, provider, endpointServiceID, privateEndpointID string) error {
193193
switch s.service {
194-
case config.CloudService:
194+
case config.CloudService, config.CloudGovService:
195195
_, _, err := s.clientv2.PrivateEndpointServicesApi.DeletePrivateEndpoint(s.ctx, projectID, provider, privateEndpointID, endpointServiceID).Execute()
196196
return err
197197
default:
@@ -202,7 +202,7 @@ func (s *Store) DeleteInterfaceEndpoint(projectID, provider, endpointServiceID,
202202
// UpdateRegionalizedPrivateEndpointSetting encapsulates the logic to manage different cloud providers.
203203
func (s *Store) UpdateRegionalizedPrivateEndpointSetting(projectID string, enabled bool) (*atlasv2.ProjectSettingItem, error) {
204204
switch s.service {
205-
case config.CloudService:
205+
case config.CloudService, config.CloudGovService:
206206
setting := atlasv2.ProjectSettingItem{
207207
Enabled: enabled,
208208
}
@@ -217,7 +217,7 @@ func (s *Store) UpdateRegionalizedPrivateEndpointSetting(projectID string, enabl
217217
// RegionalizedPrivateEndpointSetting encapsulates the logic to manage different cloud providers.
218218
func (s *Store) RegionalizedPrivateEndpointSetting(projectID string) (*atlasv2.ProjectSettingItem, error) {
219219
switch s.service {
220-
case config.CloudService:
220+
case config.CloudService, config.CloudGovService:
221221
result, _, err := s.clientv2.PrivateEndpointServicesApi.GetRegionalizedPrivateEndpointSetting(s.ctx, projectID).Execute()
222222
return result, err
223223
default:

0 commit comments

Comments
 (0)