-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add support for Beyondcorp AppConnector resource * Disabling IAM policy until policy bindings are fixed * Adding support for Beyondcorp AppGateway resource * 1. Addressing PR comments 2. Setting appGateway resoruce to be non updatable. 3. Added a test to verify update/patch ot app connector Signed-off-by: Modular Magician <magic-modules@google.com> Signed-off-by: Modular Magician <magic-modules@google.com>
- Loading branch information
1 parent
061f418
commit 6771e71
Showing
13 changed files
with
1,932 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
```release-note:new-resource | ||
`google_beyondcorp_app_connector` | ||
``` | ||
```release-note:new-resource | ||
`google_beyondcorp_app_gateway` | ||
``` |
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,75 @@ | ||
// ---------------------------------------------------------------------------- | ||
// | ||
// *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
// | ||
// ---------------------------------------------------------------------------- | ||
// | ||
// This file is automatically generated by Magic Modules and manual | ||
// changes will be clobbered when the file is regenerated. | ||
// | ||
// Please read more about how to change this file in | ||
// .github/CONTRIBUTING.md. | ||
// | ||
// ---------------------------------------------------------------------------- | ||
|
||
package google | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
"time" | ||
) | ||
|
||
type BeyondcorpOperationWaiter struct { | ||
Config *Config | ||
UserAgent string | ||
Project string | ||
CommonOperationWaiter | ||
} | ||
|
||
func (w *BeyondcorpOperationWaiter) QueryOp() (interface{}, error) { | ||
if w == nil { | ||
return nil, fmt.Errorf("Cannot query operation, it's unset or nil.") | ||
} | ||
// Returns the proper get. | ||
url := fmt.Sprintf("%s%s", w.Config.BeyondcorpBasePath, w.CommonOperationWaiter.Op.Name) | ||
|
||
return sendRequest(w.Config, "GET", w.Project, url, w.UserAgent, nil) | ||
} | ||
|
||
func createBeyondcorpWaiter(config *Config, op map[string]interface{}, project, activity, userAgent string) (*BeyondcorpOperationWaiter, error) { | ||
w := &BeyondcorpOperationWaiter{ | ||
Config: config, | ||
UserAgent: userAgent, | ||
Project: project, | ||
} | ||
if err := w.CommonOperationWaiter.SetOp(op); err != nil { | ||
return nil, err | ||
} | ||
return w, nil | ||
} | ||
|
||
// nolint: deadcode,unused | ||
func beyondcorpOperationWaitTimeWithResponse(config *Config, op map[string]interface{}, response *map[string]interface{}, project, activity, userAgent string, timeout time.Duration) error { | ||
w, err := createBeyondcorpWaiter(config, op, project, activity, userAgent) | ||
if err != nil { | ||
return err | ||
} | ||
if err := OperationWait(w, activity, timeout, config.PollInterval); err != nil { | ||
return err | ||
} | ||
return json.Unmarshal([]byte(w.CommonOperationWaiter.Op.Response), response) | ||
} | ||
|
||
func beyondcorpOperationWaitTime(config *Config, op map[string]interface{}, project, activity, userAgent string, timeout time.Duration) error { | ||
if val, ok := op["name"]; !ok || val == "" { | ||
// This was a synchronous call - there is no operation to wait for. | ||
return nil | ||
} | ||
w, err := createBeyondcorpWaiter(config, op, project, activity, userAgent) | ||
if err != nil { | ||
// If w is nil, the op was synchronous. | ||
return err | ||
} | ||
return OperationWait(w, activity, timeout, config.PollInterval) | ||
} |
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
Oops, something went wrong.