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 support for checker_type in uptime_check_config #5987

Merged
merged 2 commits into from
May 11, 2022
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
8 changes: 8 additions & 0 deletions mmv1/products/monitoring/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1765,6 +1765,14 @@ objects:
message is returned. Not specifying this field will result in uptime checks
running from all regions.
item_type: Api::Type::String
- !ruby/object:Api::Type::Enum
name: checkerType
Copy link
Member

Choose a reason for hiding this comment

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

Is this field updatable? If not, we probably need to add input: true.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've tested this and if you changed the monitoredResource away from servicedirectory_service to say uptime_url to be able to use the STATIC_IP_CHECKERS checkerType the api returns a 400 as you can't change the host. So I think it's fine to be not updateable. I'll set it to input: true

input: true
description: The checker type to use for the check. If the monitored resource type
is servicedirectory_service, checkerType must be set to VPC_CHECKERS.
values:
- :STATIC_IP_CHECKERS
- :VPC_CHECKERS
- !ruby/object:Api::Type::NestedObject
name: httpCheck
description: Contains information needed to make an HTTP or HTTPS check.
Expand Down
2 changes: 2 additions & 0 deletions mmv1/products/monitoring/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides
resourceGroup.groupId: !ruby/object:Overrides::Terraform::PropertyOverride
custom_expand: "templates/terraform/custom_expand/resource_from_self_link.go.erb"
custom_flatten: "templates/terraform/custom_flatten/group_id_to_name.erb"
checkerType: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true

MetricDescriptor: !ruby/object:Overrides::Terraform::ResourceOverride
async: !ruby/object:Provider::Terraform::PollAsync
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@ resource "google_monitoring_uptime_check_config" "<%= ctx[:primary_resource_id]
content_matchers {
content = "example"
}

checker_type = "STATIC_IP_CHECKERS"
}