Skip to content

Commit

Permalink
New Resource : google_dialogflowcx_agent (#4818) (#3324)
Browse files Browse the repository at this point in the history
Co-authored-by: Riley Karson <rileykarson@google.com>
Signed-off-by: Modular Magician <magic-modules@google.com>

Co-authored-by: Riley Karson <rileykarson@google.com>
  • Loading branch information
modular-magician and rileykarson authored Jun 9, 2021
1 parent e303da7 commit 5b32d0f
Show file tree
Hide file tree
Showing 8 changed files with 1,032 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/4818.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
`google_dialogflow_cx_agent`
```
3 changes: 3 additions & 0 deletions google-beta/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ type Config struct {
DatastoreBasePath string
DeploymentManagerBasePath string
DialogflowBasePath string
DialogflowCXBasePath string
DNSBasePath string
EssentialContactsBasePath string
FilestoreBasePath string
Expand Down Expand Up @@ -209,6 +210,7 @@ var DataprocMetastoreDefaultBasePath = "https://metastore.googleapis.com/v1beta/
var DatastoreDefaultBasePath = "https://datastore.googleapis.com/v1/"
var DeploymentManagerDefaultBasePath = "https://www.googleapis.com/deploymentmanager/v2/"
var DialogflowDefaultBasePath = "https://dialogflow.googleapis.com/v2/"
var DialogflowCXDefaultBasePath = "https://{{location}}-dialogflow.googleapis.com/v3/"
var DNSDefaultBasePath = "https://dns.googleapis.com/dns/v1beta2/"
var EssentialContactsDefaultBasePath = "https://essentialcontacts.googleapis.com/v1beta1/"
var FilestoreDefaultBasePath = "https://file.googleapis.com/v1beta1/"
Expand Down Expand Up @@ -1034,6 +1036,7 @@ func ConfigureBasePaths(c *Config) {
c.DatastoreBasePath = DatastoreDefaultBasePath
c.DeploymentManagerBasePath = DeploymentManagerDefaultBasePath
c.DialogflowBasePath = DialogflowDefaultBasePath
c.DialogflowCXBasePath = DialogflowCXDefaultBasePath
c.DNSBasePath = DNSDefaultBasePath
c.EssentialContactsBasePath = EssentialContactsDefaultBasePath
c.FilestoreBasePath = FilestoreDefaultBasePath
Expand Down
14 changes: 12 additions & 2 deletions google-beta/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,14 @@ func Provider() *schema.Provider {
"GOOGLE_DIALOGFLOW_CUSTOM_ENDPOINT",
}, DialogflowDefaultBasePath),
},
"dialogflow_cx_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_DIALOGFLOW_CX_CUSTOM_ENDPOINT",
}, DialogflowCXDefaultBasePath),
},
"dns_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -839,9 +847,9 @@ func Provider() *schema.Provider {
return provider
}

// Generated resources: 223
// Generated resources: 224
// Generated IAM resources: 117
// Total generated resources: 340
// Total generated resources: 341
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand Down Expand Up @@ -1042,6 +1050,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_dialogflow_intent": resourceDialogflowIntent(),
"google_dialogflow_entity_type": resourceDialogflowEntityType(),
"google_dialogflow_fulfillment": resourceDialogflowFulfillment(),
"google_dialogflow_cx_agent": resourceDialogflowCXAgent(),
"google_dns_managed_zone": resourceDNSManagedZone(),
"google_dns_policy": resourceDNSPolicy(),
"google_dns_record_set": resourceDNSResourceDnsRecordSet(),
Expand Down Expand Up @@ -1432,6 +1441,7 @@ func providerConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr
config.DatastoreBasePath = d.Get("datastore_custom_endpoint").(string)
config.DeploymentManagerBasePath = d.Get("deployment_manager_custom_endpoint").(string)
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)
Expand Down
Loading

0 comments on commit 5b32d0f

Please sign in to comment.