-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change ServicePerimeterResource to use a policy level mutex lock (#12725
- Loading branch information
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
mmv1/templates/terraform/encoders/access_context_manager_service_perimeter_resource.go.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Set the access_policy_id field from part of the perimeter_name parameter. | ||
|
||
// The is logic is inside the encoder since the access_policy_id field is part of | ||
// the mutex lock and encoders run before the lock is set. | ||
parts := strings.Split(d.Get("perimeter_name").(string), "/") | ||
d.Set("access_policy_id", fmt.Sprintf("accessPolicies/%s", parts[1])) | ||
|
||
return obj, nil |