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 Workflows Resource #8549

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
3 changes: 3 additions & 0 deletions .changelog/4308.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
`google_workflows_workflow`
```
3 changes: 3 additions & 0 deletions google/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ type Config struct {
StorageBasePath string
TPUBasePath string
VPCAccessBasePath string
WorkflowsBasePath string

CloudBillingBasePath string
ComposerBasePath string
Expand Down Expand Up @@ -222,6 +223,7 @@ var SQLDefaultBasePath = "https://sqladmin.googleapis.com/sql/v1beta4/"
var StorageDefaultBasePath = "https://storage.googleapis.com/storage/v1/"
var TPUDefaultBasePath = "https://tpu.googleapis.com/v1/"
var VPCAccessDefaultBasePath = "https://vpcaccess.googleapis.com/v1/"
var WorkflowsDefaultBasePath = "https://workflows.googleapis.com/v1/"

var DefaultClientScopes = []string{
"https://www.googleapis.com/auth/compute",
Expand Down Expand Up @@ -1015,6 +1017,7 @@ func ConfigureBasePaths(c *Config) {
c.StorageBasePath = StorageDefaultBasePath
c.TPUBasePath = TPUDefaultBasePath
c.VPCAccessBasePath = VPCAccessDefaultBasePath
c.WorkflowsBasePath = WorkflowsDefaultBasePath

// Handwritten Products / Versioned / Atypical Entries
c.CloudBillingBasePath = CloudBillingDefaultBasePath
Expand Down
14 changes: 12 additions & 2 deletions google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,14 @@ func Provider() *schema.Provider {
"GOOGLE_VPC_ACCESS_CUSTOM_ENDPOINT",
}, VPCAccessDefaultBasePath),
},
"workflows_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_WORKFLOWS_CUSTOM_ENDPOINT",
}, WorkflowsDefaultBasePath),
},

// Handwritten Products / Versioned / Atypical Entries
CloudBillingCustomEndpointEntryKey: CloudBillingCustomEndpointEntry,
Expand Down Expand Up @@ -717,9 +725,9 @@ func Provider() *schema.Provider {
return provider
}

// Generated resources: 182
// Generated resources: 183
// Generated IAM resources: 75
// Total generated resources: 257
// Total generated resources: 258
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand Down Expand Up @@ -985,6 +993,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_storage_hmac_key": resourceStorageHmacKey(),
"google_tpu_node": resourceTPUNode(),
"google_vpc_access_connector": resourceVPCAccessConnector(),
"google_workflows_workflow": resourceWorkflowsWorkflow(),
},
map[string]*schema.Resource{
"google_app_engine_application": resourceAppEngineApplication(),
Expand Down Expand Up @@ -1228,6 +1237,7 @@ func providerConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr
config.StorageBasePath = d.Get("storage_custom_endpoint").(string)
config.TPUBasePath = d.Get("tpu_custom_endpoint").(string)
config.VPCAccessBasePath = d.Get("vpc_access_custom_endpoint").(string)
config.WorkflowsBasePath = d.Get("workflows_custom_endpoint").(string)

// Handwritten Products / Versioned / Atypical Entries

Expand Down
4 changes: 2 additions & 2 deletions google/resource_source_repo_repository_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func TestAccSourceRepoRepository_sourcerepoRepositoryFullExample(t *testing.T) {

func testAccSourceRepoRepository_sourcerepoRepositoryFullExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_service_account" "test-account" {
resource "google_service_account" "test_account" {
account_id = "tf-test-my-account%{random_suffix}"
display_name = "Test Service Account"
}
Expand All @@ -101,7 +101,7 @@ resource "google_sourcerepo_repository" "my-repo" {
pubsub_configs {
topic = google_pubsub_topic.topic.id
message_format = "JSON"
service_account_email = google_service_account.test-account.email
service_account_email = google_service_account.test_account.email
}
}
`, context)
Expand Down
Loading