Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add access approval settings resources #7010

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changelog/3828.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```release-note:new-resource
`google_folder_access_approval_settings`
```
```release-note:new-resource
`google_organization_access_approval_settings`
```
```release-note:new-resource
`google_project_access_approval_settings`
```
3 changes: 3 additions & 0 deletions google/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ type Config struct {

tokenSource oauth2.TokenSource

AccessApprovalBasePath string
AccessContextManagerBasePath string
ActiveDirectoryBasePath string
AppEngineBasePath string
Expand Down Expand Up @@ -225,6 +226,7 @@ type Config struct {
}

// Generated product base paths
var AccessApprovalDefaultBasePath = "https://accessapproval.googleapis.com/v1/"
var AccessContextManagerDefaultBasePath = "https://accesscontextmanager.googleapis.com/v1/"
var ActiveDirectoryDefaultBasePath = "https://managedidentities.googleapis.com/v1/"
var AppEngineDefaultBasePath = "https://appengine.googleapis.com/v1/"
Expand Down Expand Up @@ -771,6 +773,7 @@ func removeBasePathVersion(url string) string {
// values to a default. After using this, you should call config.LoadAndValidate.
func ConfigureBasePaths(c *Config) {
// Generated Products
c.AccessApprovalBasePath = AccessApprovalDefaultBasePath
c.AccessContextManagerBasePath = AccessContextManagerDefaultBasePath
c.ActiveDirectoryBasePath = ActiveDirectoryDefaultBasePath
c.AppEngineBasePath = AppEngineDefaultBasePath
Expand Down
16 changes: 14 additions & 2 deletions google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ func Provider() terraform.ResourceProvider {
},

// Generated Products
"access_approval_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_ACCESS_APPROVAL_CUSTOM_ENDPOINT",
}, AccessApprovalDefaultBasePath),
},
"access_context_manager_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -607,9 +615,9 @@ func Provider() terraform.ResourceProvider {
return provider
}

// Generated resources: 149
// Generated resources: 152
// Generated IAM resources: 57
// Total generated resources: 206
// Total generated resources: 209
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand All @@ -618,6 +626,9 @@ func ResourceMap() map[string]*schema.Resource {
func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
return mergeResourceMaps(
map[string]*schema.Resource{
"google_folder_access_approval_settings": resourceAccessApprovalFolderSettings(),
"google_project_access_approval_settings": resourceAccessApprovalProjectSettings(),
"google_organization_access_approval_settings": resourceAccessApprovalOrganizationSettings(),
"google_access_context_manager_access_policy": resourceAccessContextManagerAccessPolicy(),
"google_access_context_manager_access_level": resourceAccessContextManagerAccessLevel(),
"google_access_context_manager_service_perimeter": resourceAccessContextManagerServicePerimeter(),
Expand Down Expand Up @@ -993,6 +1004,7 @@ func providerConfigure(d *schema.ResourceData, p *schema.Provider, terraformVers
config.BatchingConfig = batchCfg

// Generated products
config.AccessApprovalBasePath = d.Get("access_approval_custom_endpoint").(string)
config.AccessContextManagerBasePath = d.Get("access_context_manager_custom_endpoint").(string)
config.ActiveDirectoryBasePath = d.Get("active_directory_custom_endpoint").(string)
config.AppEngineBasePath = d.Get("app_engine_custom_endpoint").(string)
Expand Down
Loading