Skip to content

Commit ce0799a

Browse files
add os config patch deployment resource (#3721) (#2253)
* add os config patch deployment * add validation fix encoder * remove commented out code * add goo to patchConfig Signed-off-by: Modular Magician <[email protected]>
1 parent 80e0ea3 commit ce0799a

File tree

8 files changed

+4341
-2
lines changed

8 files changed

+4341
-2
lines changed

.changelog/3721.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-resource
2+
`google_os_config_patch_deployment`
3+
```

google-beta/config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ type Config struct {
120120
MonitoringBasePath string
121121
NetworkManagementBasePath string
122122
NotebooksBasePath string
123+
OSConfigBasePath string
123124
OSLoginBasePath string
124125
PubsubBasePath string
125126
RedisBasePath string
@@ -276,6 +277,7 @@ var MLEngineDefaultBasePath = "https://ml.googleapis.com/v1/"
276277
var MonitoringDefaultBasePath = "https://monitoring.googleapis.com/"
277278
var NetworkManagementDefaultBasePath = "https://networkmanagement.googleapis.com/v1/"
278279
var NotebooksDefaultBasePath = "https://notebooks.googleapis.com/v1beta1/"
280+
var OSConfigDefaultBasePath = "https://osconfig.googleapis.com/v1/"
279281
var OSLoginDefaultBasePath = "https://oslogin.googleapis.com/v1/"
280282
var PubsubDefaultBasePath = "https://pubsub.googleapis.com/v1/"
281283
var RedisDefaultBasePath = "https://redis.googleapis.com/v1beta1/"
@@ -816,6 +818,7 @@ func ConfigureBasePaths(c *Config) {
816818
c.MonitoringBasePath = MonitoringDefaultBasePath
817819
c.NetworkManagementBasePath = NetworkManagementDefaultBasePath
818820
c.NotebooksBasePath = NotebooksDefaultBasePath
821+
c.OSConfigBasePath = OSConfigDefaultBasePath
819822
c.OSLoginBasePath = OSLoginDefaultBasePath
820823
c.PubsubBasePath = PubsubDefaultBasePath
821824
c.RedisBasePath = RedisDefaultBasePath

google-beta/provider.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,14 @@ func Provider() terraform.ResourceProvider {
429429
"GOOGLE_NOTEBOOKS_CUSTOM_ENDPOINT",
430430
}, NotebooksDefaultBasePath),
431431
},
432+
"os_config_custom_endpoint": {
433+
Type: schema.TypeString,
434+
Optional: true,
435+
ValidateFunc: validateCustomEndpoint,
436+
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
437+
"GOOGLE_OS_CONFIG_CUSTOM_ENDPOINT",
438+
}, OSConfigDefaultBasePath),
439+
},
432440
"os_login_custom_endpoint": {
433441
Type: schema.TypeString,
434442
Optional: true,
@@ -673,9 +681,9 @@ func Provider() terraform.ResourceProvider {
673681
return provider
674682
}
675683

676-
// Generated resources: 168
684+
// Generated resources: 169
677685
// Generated IAM resources: 66
678-
// Total generated resources: 234
686+
// Total generated resources: 235
679687
func ResourceMap() map[string]*schema.Resource {
680688
resourceMap, _ := ResourceMapWithErrors()
681689
return resourceMap
@@ -870,6 +878,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
870878
"google_notebooks_environment": resourceNotebooksEnvironment(),
871879
"google_notebooks_instance": resourceNotebooksInstance(),
872880
"google_notebooks_location": resourceNotebooksLocation(),
881+
"google_os_config_patch_deployment": resourceOSConfigPatchDeployment(),
873882
"google_os_login_ssh_public_key": resourceOSLoginSSHPublicKey(),
874883
"google_pubsub_topic": resourcePubsubTopic(),
875884
"google_pubsub_topic_iam_binding": ResourceIamBinding(PubsubTopicIamSchema, PubsubTopicIamUpdaterProducer, PubsubTopicIdParseFunc),
@@ -1127,6 +1136,7 @@ func providerConfigure(d *schema.ResourceData, p *schema.Provider, terraformVers
11271136
config.MonitoringBasePath = d.Get("monitoring_custom_endpoint").(string)
11281137
config.NetworkManagementBasePath = d.Get("network_management_custom_endpoint").(string)
11291138
config.NotebooksBasePath = d.Get("notebooks_custom_endpoint").(string)
1139+
config.OSConfigBasePath = d.Get("os_config_custom_endpoint").(string)
11301140
config.OSLoginBasePath = d.Get("os_login_custom_endpoint").(string)
11311141
config.PubsubBasePath = d.Get("pubsub_custom_endpoint").(string)
11321142
config.RedisBasePath = d.Get("redis_custom_endpoint").(string)

0 commit comments

Comments
 (0)