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

Make path_rule Optional in google_url_map's path_matcher block. #118

Merged
merged 6 commits into from
Jun 19, 2017

Conversation

rileykarson
Copy link
Collaborator

Make path_rule Optional in google_url_map's path_matcher block.

Fixes #113
@danawillow


func testAccComputeUrlMap_noPathRules(bsName, hcName, umName string) string {
return fmt.Sprintf(`
resource "google_compute_backend_service" "foobar" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the indentation and line up the spacing in these resources?
i.e. for this one:

resource "google_compute_backend_service" "foobar" {
    name          = "urlmap-test-%s"
    health_checks = ["${google_compute_http_health_check.zero.self_link}"]
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


* `name` - (Required) The name of the `path_matcher` resource. Used by the
`host_rule` block above.
* `default_service` - (Required) The URL or [valid partial url](https://cloud.google.com/compute/docs/reference/latest/urlMaps#pathMatcher.defaultService)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a valid partial url is set, will it return that same partial url on read? my gut says no, in which case we should request the full url to avoid perpetual diffs (or needing to set it to computed).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

}

resource "google_compute_url_map" "foobar" {
name = "urlmap-test-%s"
default_service = "${google_compute_backend_service.foobar.self_link}"
name = "urlmap-test-%s"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a few of these have spaces instead of tabs, which is messing up the indentation in github

}

resource "google_compute_url_map" "foobar" {
name = "urlmap-test-%s"
default_service = "${google_compute_backend_service.foobar.self_link}"
name = "urlmap-test-%s"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here oo

}

resource "google_compute_url_map" "foobar" {
name = "urlmap-test-%s"
default_service = "${google_compute_backend_service.foobar.self_link}"
name = "urlmap-test-%s"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

}

resource "google_compute_url_map" "foobar" {
name = "urlmap-test-%s"
default_service = "${google_compute_backend_service.foobar.self_link}"
name = "urlmap-test-%s"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

}

resource "google_compute_url_map" "foobar" {
name = "urlmap-test-%s"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

@rileykarson
Copy link
Collaborator Author

@danawillow: Done for all. The test configurations were indented with spaces, so I updated them to tabs like most of our other configurations.

@danawillow
Copy link
Contributor

LGTM, merge at will

@rileykarson rileykarson merged commit aa48489 into hashicorp:master Jun 19, 2017
gh-mlfowler pushed a commit to gh-mlfowler/terraform-provider-google that referenced this pull request Jun 20, 2017
…icorp#118)

* Made path_rule optional for path_matcher in google_compute_url_map.

* Updated google_compute_url_map docs.

* Updated test configuration formatting.
pdecat pushed a commit to pdecat/terraform-provider-google that referenced this pull request Jun 29, 2017
…icorp#118)

* Made path_rule optional for path_matcher in google_compute_url_map.

* Updated google_compute_url_map docs.

* Updated test configuration formatting.
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
…icorp#118)

* Made path_rule optional for path_matcher in google_compute_url_map.

* Updated google_compute_url_map docs.

* Updated test configuration formatting.
luis-silva pushed a commit to luis-silva/terraform-provider-google that referenced this pull request May 21, 2019
luis-silva pushed a commit to luis-silva/terraform-provider-google that referenced this pull request May 21, 2019
@ghost
Copy link

ghost commented Mar 31, 2020

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 👉 hashibot-feedback@hashicorp.com. Thanks!

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

Successfully merging this pull request may close these issues.

google_compute_url_map: "path_matcher.0.path_rule": required field is not set
2 participants