Skip to content

Commit

Permalink
Promote google_essential_contacts_contact to GA (#5097) (#9822)
Browse files Browse the repository at this point in the history
* promote resource

Co-authored-by: upodroid <[email protected]>

* fix import

* remove deprecated api and contact_id

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Aug 16, 2021
1 parent 3e09ae7 commit 737df0f
Show file tree
Hide file tree
Showing 7 changed files with 564 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .changelog/5097.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
essentialcontacts: promoted `google_essential_contacts_contact` to GA
```
4 changes: 4 additions & 0 deletions google/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ type Config struct {
DialogflowBasePath string
DialogflowCXBasePath string
DNSBasePath string
EssentialContactsBasePath string
FilestoreBasePath string
FirestoreBasePath string
GameServicesBasePath string
Expand Down Expand Up @@ -201,6 +202,7 @@ const DeploymentManagerBasePathKey = "DeploymentManager"
const DialogflowBasePathKey = "Dialogflow"
const DialogflowCXBasePathKey = "DialogflowCX"
const DNSBasePathKey = "DNS"
const EssentialContactsBasePathKey = "EssentialContacts"
const FilestoreBasePathKey = "Filestore"
const FirestoreBasePathKey = "Firestore"
const GameServicesBasePathKey = "GameServices"
Expand Down Expand Up @@ -283,6 +285,7 @@ var DefaultBasePaths = map[string]string{
DialogflowBasePathKey: "https://dialogflow.googleapis.com/v2/",
DialogflowCXBasePathKey: "https://dialogflow.googleapis.com/v3/",
DNSBasePathKey: "https://dns.googleapis.com/dns/v1/",
EssentialContactsBasePathKey: "https://essentialcontacts.googleapis.com/v1/",
FilestoreBasePathKey: "https://file.googleapis.com/v1/",
FirestoreBasePathKey: "https://firestore.googleapis.com/v1/",
GameServicesBasePathKey: "https://gameservices.googleapis.com/v1/",
Expand Down Expand Up @@ -1121,6 +1124,7 @@ func ConfigureBasePaths(c *Config) {
c.DialogflowBasePath = DefaultBasePaths[DialogflowBasePathKey]
c.DialogflowCXBasePath = DefaultBasePaths[DialogflowCXBasePathKey]
c.DNSBasePath = DefaultBasePaths[DNSBasePathKey]
c.EssentialContactsBasePath = DefaultBasePaths[EssentialContactsBasePathKey]
c.FilestoreBasePath = DefaultBasePaths[FilestoreBasePathKey]
c.FirestoreBasePath = DefaultBasePaths[FirestoreBasePathKey]
c.GameServicesBasePath = DefaultBasePaths[GameServicesBasePathKey]
Expand Down
14 changes: 12 additions & 2 deletions google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,14 @@ func Provider() *schema.Provider {
"GOOGLE_DNS_CUSTOM_ENDPOINT",
}, DefaultBasePaths[DNSBasePathKey]),
},
"essential_contacts_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_ESSENTIAL_CONTACTS_CUSTOM_ENDPOINT",
}, DefaultBasePaths[EssentialContactsBasePathKey]),
},
"filestore_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -799,9 +807,9 @@ func Provider() *schema.Provider {
return provider
}

// Generated resources: 212
// Generated resources: 213
// Generated IAM resources: 90
// Total generated resources: 302
// Total generated resources: 303
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand Down Expand Up @@ -979,6 +987,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_dns_managed_zone": resourceDNSManagedZone(),
"google_dns_policy": resourceDNSPolicy(),
"google_dns_record_set": resourceDNSResourceDnsRecordSet(),
"google_essential_contacts_contact": resourceEssentialContactsContact(),
"google_filestore_instance": resourceFilestoreInstance(),
"google_firestore_index": resourceFirestoreIndex(),
"google_firestore_document": resourceFirestoreDocument(),
Expand Down Expand Up @@ -1353,6 +1362,7 @@ func providerConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr
config.DialogflowBasePath = d.Get("dialogflow_custom_endpoint").(string)
config.DialogflowCXBasePath = d.Get("dialogflow_cx_custom_endpoint").(string)
config.DNSBasePath = d.Get("dns_custom_endpoint").(string)
config.EssentialContactsBasePath = d.Get("essential_contacts_custom_endpoint").(string)
config.FilestoreBasePath = d.Get("filestore_custom_endpoint").(string)
config.FirestoreBasePath = d.Get("firestore_custom_endpoint").(string)
config.GameServicesBasePath = d.Get("game_services_custom_endpoint").(string)
Expand Down
Loading

0 comments on commit 737df0f

Please sign in to comment.