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

cloudbuild_trigger should support build.tags #1623

Closed
magiconair opened this issue Jun 8, 2018 · 2 comments
Closed

cloudbuild_trigger should support build.tags #1623

magiconair opened this issue Jun 8, 2018 · 2 comments

Comments

@magiconair
Copy link
Contributor

Terraform Version

Terraform v0.11.7
+ provider.google v1.14.0

Affected Resource(s)

Please list the resources as a list, for example:

  • google_cloudbuild_trigger

Terraform Configuration Files

resource "google_cloudbuild_trigger" "my-client" {
  project     = "${var.project_id}"
  description = "Build my-client"
  filename    = "cloudbuild-client.yaml"
  trigger_template {
    project   = "${var.project_id}"
    repo_name = "github-client"
    tag_name  = "v\\d.*"
  }
  build {
    tags = ["my-client"]
  }
}

Expected Behavior

build.tags should be permitted.

Actual Behavior

Error: google_cloudbuild_trigger.my-client: "filename": conflicts with build ([]map[string]interface {}{map[string]interface {}{"tags":[]interface {}{"my-client"}}})

Steps to Reproduce

  1. terraform plan

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

I have tried this but that didn't have the desired effect:

diff --git a/google/resource_cloudbuild_build_trigger.go b/google/resource_cloudbuild_build_trigger.go
index 278e803..b952ef9 100644
--- a/google/resource_cloudbuild_build_trigger.go
+++ b/google/resource_cloudbuild_build_trigger.go
@@ -40,7 +40,7 @@ func resourceCloudBuildTrigger() *schema.Resource {
                                Type:          schema.TypeString,
                                Optional:      true,
                                ForceNew:      true,
-                               ConflictsWith: []string{"build"},
+                               ConflictsWith: []string{"build.step", "build.images"},
                        },
                        "build": {
                                Type:        schema.TypeList,
@magiconair
Copy link
Contributor Author

Actually, that is wrong since the tags are specified in the cloudbuild.yaml file.

@ghost
Copy link

ghost commented Nov 18, 2018

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant