Skip to content

Commit

Permalink
Add Dialogflow Agent resource (#3014) (#5559)
Browse files Browse the repository at this point in the history
* Dialogflow Agent support

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician committed Jan 31, 2020
1 parent dc4257b commit 6441479
Show file tree
Hide file tree
Showing 8 changed files with 980 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/3014.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
google_dialogflow_agent
```
3 changes: 3 additions & 0 deletions google/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ type Config struct {
ContainerAnalysisBasePath string
DataprocBasePath string
DeploymentManagerBasePath string
DialogflowBasePath string
DNSBasePath string
FilestoreBasePath string
FirestoreBasePath string
Expand Down Expand Up @@ -218,6 +219,7 @@ var ComputeDefaultBasePath = "https://www.googleapis.com/compute/v1/"
var ContainerAnalysisDefaultBasePath = "https://containeranalysis.googleapis.com/v1/"
var DataprocDefaultBasePath = "https://dataproc.googleapis.com/v1/"
var DeploymentManagerDefaultBasePath = "https://www.googleapis.com/deploymentmanager/v2/"
var DialogflowDefaultBasePath = "https://dialogflow.googleapis.com/v2/"
var DNSDefaultBasePath = "https://www.googleapis.com/dns/v1/"
var FilestoreDefaultBasePath = "https://file.googleapis.com/v1/"
var FirestoreDefaultBasePath = "https://firestore.googleapis.com/v1/"
Expand Down Expand Up @@ -693,6 +695,7 @@ func ConfigureBasePaths(c *Config) {
c.ContainerAnalysisBasePath = ContainerAnalysisDefaultBasePath
c.DataprocBasePath = DataprocDefaultBasePath
c.DeploymentManagerBasePath = DeploymentManagerDefaultBasePath
c.DialogflowBasePath = DialogflowDefaultBasePath
c.DNSBasePath = DNSDefaultBasePath
c.FilestoreBasePath = FilestoreDefaultBasePath
c.FirestoreBasePath = FirestoreDefaultBasePath
Expand Down
14 changes: 12 additions & 2 deletions google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,14 @@ func Provider() terraform.ResourceProvider {
"GOOGLE_DEPLOYMENT_MANAGER_CUSTOM_ENDPOINT",
}, DeploymentManagerDefaultBasePath),
},
"dialogflow_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_DIALOGFLOW_CUSTOM_ENDPOINT",
}, DialogflowDefaultBasePath),
},
"dns_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -478,9 +486,9 @@ func Provider() terraform.ResourceProvider {
return provider
}

// Generated resources: 97
// Generated resources: 98
// Generated IAM resources: 48
// Total generated resources: 145
// Total generated resources: 146
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand Down Expand Up @@ -569,6 +577,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_container_analysis_note": resourceContainerAnalysisNote(),
"google_dataproc_autoscaling_policy": resourceDataprocAutoscalingPolicy(),
"google_deployment_manager_deployment": resourceDeploymentManagerDeployment(),
"google_dialogflow_agent": resourceDialogflowAgent(),
"google_dns_managed_zone": resourceDNSManagedZone(),
"google_filestore_instance": resourceFilestoreInstance(),
"google_firestore_index": resourceFirestoreIndex(),
Expand Down Expand Up @@ -797,6 +806,7 @@ func providerConfigure(d *schema.ResourceData, p *schema.Provider, terraformVers
config.ContainerAnalysisBasePath = d.Get("container_analysis_custom_endpoint").(string)
config.DataprocBasePath = d.Get("dataproc_custom_endpoint").(string)
config.DeploymentManagerBasePath = d.Get("deployment_manager_custom_endpoint").(string)
config.DialogflowBasePath = d.Get("dialogflow_custom_endpoint").(string)
config.DNSBasePath = d.Get("dns_custom_endpoint").(string)
config.FilestoreBasePath = d.Get("filestore_custom_endpoint").(string)
config.FirestoreBasePath = d.Get("firestore_custom_endpoint").(string)
Expand Down
Loading

0 comments on commit 6441479

Please sign in to comment.