Skip to content

Commit

Permalink
correct required image_type (#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen Rumney committed Sep 1, 2021
1 parent 375479c commit 0e2bb75
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ resource "google_container_node_pool" "good_example" {
oauth_scopes = [
"https://www.googleapis.com/auth/cloud-platform"
]
image_type = "COS"
image_type = "COS_CONTAINERD"
}
}
`},
Expand All @@ -108,7 +108,7 @@ resource "google_container_node_pool" "good_example" {
if imageTypeAttr := resourceBlock.GetBlock("node_config").GetAttribute("image_type"); imageTypeAttr.IsNil() { // alert on use of default value
set.AddResult().
WithDescription("Resource '%s' uses default value for node_config.image_type", resourceBlock.FullName())
} else if imageTypeAttr.NotEqual("COS") {
} else if imageTypeAttr.NotEqual("COS_CONTAINERD", block.IgnoreCase) {
set.AddResult().
WithDescription("Resource '%s' does not have node_config.image_type set to COS", resourceBlock.FullName()).
WithAttribute(imageTypeAttr)
Expand Down

0 comments on commit 0e2bb75

Please sign in to comment.