terraform-google-lb-http icon indicating copy to clipboard operation
terraform-google-lb-http copied to clipboard

feat: support cdn_policy

Open zchee opened this issue 3 years ago β€’ 4 comments

support cdn_policy for google_compute_backend_service.

zchee avatar Jun 18 '22 21:06 zchee

Thanks for the PR! πŸš€ Unfortunately it looks like some of our CI checks failed. See the Contributing Guide for details.

  • ⚠️check_terraform Failed Terraform check. More details below.
Running terraform fmt
Running terraform validate
terraform_validate . 
Success!
The configuration is valid.
terraform_validate ./examples/cloudrun 
Success!
The configuration is valid.
terraform_validate ./examples/https-gke 
β•·
β”‚

Warning: 
Argument is deprecated
β”‚

β”‚

 with tls_self_signed_cert.example,
β”‚

 on tls.tf line 23, in resource "tls_self_signed_cert" "example":
β”‚

 23:   key_algorithm   = 
tls_private_key.example.algorithm
β”‚

β”‚

This is now ignored, as the key algorithm is inferred from the
β”‚

`private_key_pem`.
β•΅
β•·
β”‚

Error: 
Invalid value for module argument
β”‚

β”‚

 on main.tf line 49, in module "gce-lb-https":
β”‚

 49:   backends = 
{
β”‚

 50:     default = {
β”‚

 51:       description                     = null
β”‚

 52:       protocol                        = "HTTP"
β”‚

 53:       port                            = var.service_port
β”‚

 54:       port_name                       = var.service_port_name
β”‚

 55:       timeout_sec                     = 10
β”‚

 56:       connection_draining_timeout_sec = null
β”‚

 57:       enable_cdn                      = false
β”‚

 58:       security_policy                 = null
β”‚

 59:       session_affinity                = null
β”‚

 60:       affinity_cookie_ttl_sec         = null
β”‚

 61:       custom_request_headers          = null
β”‚

 62:       custom_response_headers         = null
β”‚

 63:       health_check = {
β”‚

 64:         check_interval_sec  = null
β”‚

 65:         timeout_sec         = null
β”‚

 66:         healthy_threshold   = null
β”‚

 67:         unhealthy_threshold = null
β”‚

 68:         request_path        = "/"
β”‚

 69:         port                = var.service_port
β”‚

 70:         host                = null
β”‚

 71:         logging             = true
β”‚

 72:       }
β”‚

 73:       log_config = {
β”‚

 74:         enable      = true
β”‚

 75:         sample_rate = 1.0
β”‚

 76:       }
β”‚

 77:       groups = [
β”‚

 78:         {
β”‚

 79:           # Each node pool instance group should be added to the backend.
β”‚

 80:           group                        = var.backend
β”‚

 81:           balancing_mode               = null
β”‚

 82:           capacity_scaler              = null
β”‚

 83:           description                  = null
β”‚

 84:           max_connections              = null
β”‚

 85:           max_connections_per_instance = null
β”‚

 86:           max_connections_per_endpoint = null
β”‚

 87:           max_rate                     = null
β”‚

 88:           max_rate_per_instance        = null
β”‚

 89:           max_rate_per_endpoint        = null
β”‚

 90:           max_utilization              = null
β”‚

 91:         },
β”‚

 92:       ]
β”‚

 93:       iap_config = {
β”‚

 94:         enable               = false
β”‚

 95:         oauth2_client_id     = ""
β”‚

 96:         oauth2_client_secret = ""
β”‚

 97:       }
β”‚

 98:     }
β”‚

 99:   }
β”‚

β”‚

The given value is not suitable for child module variable "backends"
β”‚

defined at ../../variables.tf:81,1-20: element "default": attribute
β”‚

"cdn_policy" is required.
β•΅
terraform_validate ./examples/https-gke/gke-node-port 
Success!
The configuration is valid.
terraform_validate ./examples/https-redirect 
β•·
β”‚

Warning: 
Argument is deprecated
β”‚

β”‚

 with tls_self_signed_cert.example,
β”‚

 on tls.tf line 23, in resource "tls_self_signed_cert" "example":
β”‚

 23:   key_algorithm   = 
tls_private_key.example.algorithm
β”‚

β”‚

This is now ignored, as the key algorithm is inferred from the
β”‚

`private_key_pem`.
β•΅
Success!
The configuration is valid, but there were some
validation warnings as shown above.
terraform_validate ./examples/mig-nat-http-lb 
β•·
β”‚

Error: 
Invalid value for module argument
β”‚

β”‚

 on main.tf line 101, in module "gce-lb-http":
β”‚

101:   backends = 
{
β”‚

102:     default = {
β”‚

103:       description                     = null
β”‚

104:       protocol                        = "HTTP"
β”‚

105:       port                            = 80
β”‚

106:       port_name                       = "http"
β”‚

107:       timeout_sec                     = 10
β”‚

108:       connection_draining_timeout_sec = null
β”‚

109:       enable_cdn                      = false
β”‚

110:       security_policy                 = null
β”‚

111:       session_affinity                = null
β”‚

112:       affinity_cookie_ttl_sec         = null
β”‚

113:       custom_request_headers          = null
β”‚

114:       custom_response_headers         = null
β”‚

115:       health_check = {
β”‚

116:         check_interval_sec  = null
β”‚

117:         timeout_sec         = null
β”‚

118:         healthy_threshold   = null
β”‚

119:         unhealthy_threshold = null
β”‚

120:         request_path        = "/"
β”‚

121:         port                = 80
β”‚

122:         host                = null
β”‚

123:         logging             = null
β”‚

124:       }
β”‚

125:       log_config = {
β”‚

126:         enable      = false
β”‚

127:         sample_rate = null
β”‚

128:       }
β”‚

129:       groups = [
β”‚

130:         {
β”‚

131:           group                        = module.mig.instance_group
β”‚

132:           balancing_mode               = null
β”‚

133:           capacity_scaler              = null
β”‚

134:           description                  = null
β”‚

135:           max_connections              = null
β”‚

136:           max_connections_per_instance = null
β”‚

137:           max_connections_per_endpoint = null
β”‚

138:           max_rate                     = null
β”‚

139:           max_rate_per_instance        = null
β”‚

140:           max_rate_per_endpoint        = null
β”‚

141:           max_utilization              = null
β”‚

142:         }
β”‚

143:       ]
β”‚

144:       iap_config = {
β”‚

145:         enable               = false
β”‚

146:         oauth2_client_id     = ""
β”‚

147:         oauth2_client_secret = ""
β”‚

148:       }
β”‚

149:     }
β”‚

150:   }
β”‚

β”‚

The given value is not suitable for child module variable "backends"
β”‚

defined at ../../variables.tf:81,1-20: element "default": attribute
β”‚

"cdn_policy" is required.
β•΅
terraform_validate ./examples/multi-backend-multi-mig-bucket-https-lb 
β•·
β”‚

Warning: 
Argument is deprecated
β”‚

β”‚

 with tls_self_signed_cert.example,
β”‚

 on tls.tf line 23, in resource "tls_self_signed_cert" "example":
β”‚

 23:   key_algorithm   = 
tls_private_key.example.algorithm
β”‚

β”‚

This is now ignored, as the key algorithm is inferred from the
β”‚

`private_key_pem`.
β•΅
Success!
The configuration is valid, but there were some
validation warnings as shown above.
terraform_validate ./examples/multi-mig-http-lb 
Success!
The configuration is valid.
terraform_validate ./examples/multiple-certs 
β•·
β”‚

Warning: 
Argument is deprecated
β”‚

β”‚

 with tls_self_signed_cert.example,
β”‚

 on tls.tf line 25, in resource "tls_self_signed_cert" "example":
β”‚

 25:   key_algorithm   = 
tls_private_key.example[count.index].algorithm
β”‚

β”‚

This is now ignored, as the key algorithm is inferred from the
β”‚

`private_key_pem`.
β•΅
β•·
β”‚

Error: 
Invalid value for module argument
β”‚

β”‚

 on main.tf line 139, in module "gce-lb-https":
β”‚

139:   backends = 
{
β”‚

140:     default = {
β”‚

141:       description                     = null
β”‚

142:       protocol                        = "HTTP"
β”‚

143:       port                            = 80
β”‚

144:       port_name                       = "http"
β”‚

145:       timeout_sec                     = 10
β”‚

146:       connection_draining_timeout_sec = null
β”‚

147:       enable_cdn                      = false
β”‚

148:       security_policy                 = null
β”‚

149:       session_affinity                = null
β”‚

150:       affinity_cookie_ttl_sec         = null
β”‚

151:       custom_request_headers          = null
β”‚

152:       custom_response_headers         = null
β”‚

153:       health_check = local.health_check
β”‚

154:       log_config = {
β”‚

155:         enable      = true
β”‚

156:         sample_rate = 1.0
β”‚

157:       }
β”‚

158:       groups = [
β”‚

159:         {
β”‚

160:           group                        = module.mig1.instance_group
β”‚

161:           balancing_mode               = null
β”‚

162:           capacity_scaler              = null
β”‚

163:           description                  = null
β”‚

164:           max_connections              = null
β”‚

165:           max_connections_per_instance = null
β”‚

166:           max_connections_per_endpoint = null
β”‚

167:           max_rate                     = null
β”‚

168:           max_rate_per_instance        = null
β”‚

169:           max_rate_per_endpoint        = null
β”‚

170:           max_utilization              = null
β”‚

171:         },
β”‚

172:         {
β”‚

173:           group                        = module.mig2.instance_group
β”‚

174:           balancing_mode               = null
β”‚

175:           capacity_scaler              = null
β”‚

176:           description                  = null
β”‚

177:           max_connections              = null
β”‚

178:           max_connections_per_instance = null
β”‚

179:           max_connections_per_endpoint = null
β”‚

180:           max_rate                     = null
β”‚

181:           max_rate_per_instance        = null
β”‚

182:           max_rate_per_endpoint        = null
β”‚

183:           max_utilization              = null
β”‚

184:         },
β”‚

185:         {
β”‚

186:           group                        = module.mig3.instance_group
β”‚

187:           balancing_mode               = null
β”‚

188:           capacity_scaler              = null
β”‚

189:           description                  = null
β”‚

190:           max_connections              = null
β”‚

191:           max_connections_per_instance = null
β”‚

192:           max_connections_per_endpoint = null
β”‚

193:           max_rate                     = null
β”‚

194:           max_rate_per_instance        = null
β”‚

195:           max_rate_per_endpoint        = null
β”‚

196:           max_utilization              = null
β”‚

197:         },
β”‚

198:       ]
β”‚

199:       iap_config = {
β”‚

200:         enable               = false
β”‚

201:         oauth2_client_id     = ""
β”‚

202:         oauth2_client_secret = ""
β”‚

203:       }
β”‚

204:     }
β”‚

205:     mig1 = {
β”‚

206:       description                     = null
β”‚

207:       protocol                        = "HTTP"
β”‚

208:       port                            = 80
β”‚

209:       port_name                       = "http"
β”‚

210:       timeout_sec                     = 10
β”‚

211:       connection_draining_timeout_sec = null
β”‚

212:       enable_cdn                      = false
β”‚

213:       security_policy                 = null
β”‚

214:       session_affinity                = null
β”‚

215:       affinity_cookie_ttl_sec         = null
β”‚

216:       custom_request_headers          = null
β”‚

217:       custom_response_headers         = null
β”‚

218:       health_check = local.health_check
β”‚

219:       log_config = {
β”‚

220:         enable      = true
β”‚

221:         sample_rate = 1.0
β”‚

222:       }
β”‚

223:       groups = [
β”‚

224:         {
β”‚

225:           group                        = module.mig1.instance_group
β”‚

226:           balancing_mode               = null
β”‚

227:           capacity_scaler              = null
β”‚

228:           description                  = null
β”‚

229:           max_connections              = null
β”‚

230:           max_connections_per_instance = null
β”‚

231:           max_connections_per_endpoint = null
β”‚

232:           max_rate                     = null
β”‚

233:           max_rate_per_instance        = null
β”‚

234:           max_rate_per_endpoint        = null
β”‚

235:           max_utilization              = null
β”‚

236:         },
β”‚

237:       ]
β”‚

238:       iap_config = {
β”‚

239:         enable               = false
β”‚

240:         oauth2_client_id     = ""
β”‚

241:         oauth2_client_secret = ""
β”‚

242:       }
β”‚

243:     }
β”‚

244:     mig2 = {
β”‚

245:       description                     = null
β”‚

246:       protocol                        = "HTTP"
β”‚

247:       port                            = 80
β”‚

248:       port_name                       = "http"
β”‚

249:       timeout_sec                     = 10
β”‚

250:       connection_draining_timeout_sec = null
β”‚

251:       enable_cdn                      = false
β”‚

252:       security_policy                 = null
β”‚

253:       session_affinity                = null
β”‚

254:       affinity_cookie_ttl_sec         = null
β”‚

255:       custom_request_headers          = null
β”‚

256:       custom_response_headers         = null
β”‚

257:       health_check = local.health_check
β”‚

258:       log_config = {
β”‚

259:         enable      = true
β”‚

260:         sample_rate = 1.0
β”‚

261:       }
β”‚

262:       groups = [
β”‚

263:         {
β”‚

264:           group                        = module.mig2.instance_group
β”‚

265:           balancing_mode               = null
β”‚

266:           capacity_scaler              = null
β”‚

267:           description                  = null
β”‚

268:           max_connections              = null
β”‚

269:           max_connections_per_instance = null
β”‚

270:           max_connections_per_endpoint = null
β”‚

271:           max_rate                     = null
β”‚

272:           max_rate_per_instance        = null
β”‚

273:           max_rate_per_endpoint        = null
β”‚

274:           max_utilization              = null
β”‚

275:         },
β”‚

276:       ]
β”‚

277:       iap_config = {
β”‚

278:         enable               = false
β”‚

279:         oauth2_client_id     = ""
β”‚

280:         oauth2_client_secret = ""
β”‚

281:       }
β”‚

282:     }
β”‚

283:     mig3 = {
β”‚

284:       description                     = null
β”‚

285:       protocol                        = "HTTP"
β”‚

286:       port                            = 80
β”‚

287:       port_name                       = "http"
β”‚

288:       timeout_sec                     = 10
β”‚

289:       connection_draining_timeout_sec = null
β”‚

290:       enable_cdn                      = false
β”‚

291:       security_policy                 = null
β”‚

292:       session_affinity                = null
β”‚

293:       affinity_cookie_ttl_sec         = null
β”‚

294:       custom_request_headers          = null
β”‚

295:       custom_response_headers         = null
β”‚

296:       health_check = local.health_check
β”‚

297:       log_config = {
β”‚

298:         enable      = true
β”‚

299:         sample_rate = 1.0
β”‚

300:       }
β”‚

301:       groups = [
β”‚

302:         {
β”‚

303:           group                        = module.mig3.instance_group
β”‚

304:           balancing_mode               = null
β”‚

305:           capacity_scaler              = null
β”‚

306:           description                  = null
β”‚

307:           max_connections              = null
β”‚

308:           max_connections_per_instance = null
β”‚

309:           max_connections_per_endpoint = null
β”‚

310:           max_rate                     = null
β”‚

311:           max_rate_per_instance        = null
β”‚

312:           max_rate_per_endpoint        = null
β”‚

313:           max_utilization              = null
β”‚

314:         },
β”‚

315:       ]
β”‚

316:       iap_config = {
β”‚

317:         enable               = false
β”‚

318:         oauth2_client_id     = ""
β”‚

319:         oauth2_client_secret = ""
β”‚

320:       }
β”‚

321:     }
β”‚

322:   }
β”‚

β”‚

The given value is not suitable for child module variable "backends"
β”‚

defined at ../../variables.tf:81,1-20: element "mig1": attribute
β”‚

"cdn_policy" is required.
β•΅
terraform_validate ./examples/shared-vpc 
Success!
The configuration is valid.
terraform_validate ./modules/dynamic_backends 
Success!
The configuration is valid.
terraform_validate ./modules/serverless_negs 
Success!
The configuration is valid.
terraform_validate ./test/fixtures/cloudrun 
Success!
The configuration is valid.
terraform_validate ./test/fixtures/https-redirect 
β•·
β”‚

Warning: 
Argument is deprecated
β”‚

β”‚

 with module.example.tls_self_signed_cert.example,
β”‚

 on ../../../examples/https-redirect/tls.tf line 23, in resource "tls_self_signed_cert" "example":
β”‚

 23:   key_algorithm   = 
tls_private_key.example.algorithm
β”‚

β”‚

This is now ignored, as the key algorithm is inferred from the
β”‚

`private_key_pem`.
β•΅
Success!
The configuration is valid, but there were some
validation warnings as shown above.
terraform_validate ./test/fixtures/mig_nat 
β•·
β”‚

Error: 
Invalid value for module argument
β”‚

β”‚

 on ../../../examples/mig-nat-http-lb/main.tf line 101, in module "gce-lb-http":
β”‚

101:   backends = 
{
β”‚

102:     default = {
β”‚

103:       description                     = null
β”‚

104:       protocol                        = "HTTP"
β”‚

105:       port                            = 80
β”‚

106:       port_name                       = "http"
β”‚

107:       timeout_sec                     = 10
β”‚

108:       connection_draining_timeout_sec = null
β”‚

109:       enable_cdn                      = false
β”‚

110:       security_policy                 = null
β”‚

111:       session_affinity                = null
β”‚

112:       affinity_cookie_ttl_sec         = null
β”‚

113:       custom_request_headers          = null
β”‚

114:       custom_response_headers         = null
β”‚

115:       health_check = {
β”‚

116:         check_interval_sec  = null
β”‚

117:         timeout_sec         = null
β”‚

118:         healthy_threshold   = null
β”‚

119:         unhealthy_threshold = null
β”‚

120:         request_path        = "/"
β”‚

121:         port                = 80
β”‚

122:         host                = null
β”‚

123:         logging             = null
β”‚

124:       }
β”‚

125:       log_config = {
β”‚

126:         enable      = false
β”‚

127:         sample_rate = null
β”‚

128:       }
β”‚

129:       groups = [
β”‚

130:         {
β”‚

131:           group                        = module.mig.instance_group
β”‚

132:           balancing_mode               = null
β”‚

133:           capacity_scaler              = null
β”‚

134:           description                  = null
β”‚

135:           max_connections              = null
β”‚

136:           max_connections_per_instance = null
β”‚

137:           max_connections_per_endpoint = null
β”‚

138:           max_rate                     = null
β”‚

139:           max_rate_per_instance        = null
β”‚

140:           max_rate_per_endpoint        = null
β”‚

141:           max_utilization              = null
β”‚

142:         }
β”‚

143:       ]
β”‚

144:       iap_config = {
β”‚

145:         enable               = false
β”‚

146:         oauth2_client_id     = ""
β”‚

147:         oauth2_client_secret = ""
β”‚

148:       }
β”‚

149:     }
β”‚

150:   }
β”‚

β”‚

The given value is not suitable for child module variable "backends"
β”‚

defined at ../../../variables.tf:81,1-20: element "default": attribute
β”‚

"cdn_policy" is required.
β•΅
terraform_validate ./test/fixtures/multi_certs 
β•·
β”‚

Warning: 
Argument is deprecated
β”‚

β”‚

 with module.example.tls_self_signed_cert.example,
β”‚

 on ../../../examples/multiple-certs/tls.tf line 25, in resource "tls_self_signed_cert" "example":
β”‚

 25:   key_algorithm   = 
tls_private_key.example[count.index].algorithm
β”‚

β”‚

This is now ignored, as the key algorithm is inferred from the
β”‚

`private_key_pem`.
β•΅
β•·
β”‚

Error: 
Invalid value for module argument
β”‚

β”‚

 on ../../../examples/multiple-certs/main.tf line 139, in module "gce-lb-https":
β”‚

139:   backends = 
{
β”‚

140:     default = {
β”‚

141:       description                     = null
β”‚

142:       protocol                        = "HTTP"
β”‚

143:       port                            = 80
β”‚

144:       port_name                       = "http"
β”‚

145:       timeout_sec                     = 10
β”‚

146:       connection_draining_timeout_sec = null
β”‚

147:       enable_cdn                      = false
β”‚

148:       security_policy                 = null
β”‚

149:       session_affinity                = null
β”‚

150:       affinity_cookie_ttl_sec         = null
β”‚

151:       custom_request_headers          = null
β”‚

152:       custom_response_headers         = null
β”‚

153:       health_check = local.health_check
β”‚

154:       log_config = {
β”‚

155:         enable      = true
β”‚

156:         sample_rate = 1.0
β”‚

157:       }
β”‚

158:       groups = [
β”‚

159:         {
β”‚

160:           group                        = module.mig1.instance_group
β”‚

161:           balancing_mode               = null
β”‚

162:           capacity_scaler              = null
β”‚

163:           description                  = null
β”‚

164:           max_connections              = null
β”‚

165:           max_connections_per_instance = null
β”‚

166:           max_connections_per_endpoint = null
β”‚

167:           max_rate                     = null
β”‚

168:           max_rate_per_instance        = null
β”‚

169:           max_rate_per_endpoint        = null
β”‚

170:           max_utilization              = null
β”‚

171:         },
β”‚

172:         {
β”‚

173:           group                        = module.mig2.instance_group
β”‚

174:           balancing_mode               = null
β”‚

175:           capacity_scaler              = null
β”‚

176:           description                  = null
β”‚

177:           max_connections              = null
β”‚

178:           max_connections_per_instance = null
β”‚

179:           max_connections_per_endpoint = null
β”‚

180:           max_rate                     = null
β”‚

181:           max_rate_per_instance        = null
β”‚

182:           max_rate_per_endpoint        = null
β”‚

183:           max_utilization              = null
β”‚

184:         },
β”‚

185:         {
β”‚

186:           group                        = module.mig3.instance_group
β”‚

187:           balancing_mode               = null
β”‚

188:           capacity_scaler              = null
β”‚

189:           description                  = null
β”‚

190:           max_connections              = null
β”‚

191:           max_connections_per_instance = null
β”‚

192:           max_connections_per_endpoint = null
β”‚

193:           max_rate                     = null
β”‚

194:           max_rate_per_instance        = null
β”‚

195:           max_rate_per_endpoint        = null
β”‚

196:           max_utilization              = null
β”‚

197:         },
β”‚

198:       ]
β”‚

199:       iap_config = {
β”‚

200:         enable               = false
β”‚

201:         oauth2_client_id     = ""
β”‚

202:         oauth2_client_secret = ""
β”‚

203:       }
β”‚

204:     }
β”‚

205:     mig1 = {
β”‚

206:       description                     = null
β”‚

207:       protocol                        = "HTTP"
β”‚

208:       port                            = 80
β”‚

209:       port_name                       = "http"
β”‚

210:       timeout_sec                     = 10
β”‚

211:       connection_draining_timeout_sec = null
β”‚

212:       enable_cdn                      = false
β”‚

213:       security_policy                 = null
β”‚

214:       session_affinity                = null
β”‚

215:       affinity_cookie_ttl_sec         = null
β”‚

216:       custom_request_headers          = null
β”‚

217:       custom_response_headers         = null
β”‚

218:       health_check = local.health_check
β”‚

219:       log_config = {
β”‚

220:         enable      = true
β”‚

221:         sample_rate = 1.0
β”‚

222:       }
β”‚

223:       groups = [
β”‚

224:         {
β”‚

225:           group                        = module.mig1.instance_group
β”‚

226:           balancing_mode               = null
β”‚

227:           capacity_scaler              = null
β”‚

228:           description                  = null
β”‚

229:           max_connections              = null
β”‚

230:           max_connections_per_instance = null
β”‚

231:           max_connections_per_endpoint = null
β”‚

232:           max_rate                     = null
β”‚

233:           max_rate_per_instance        = null
β”‚

234:           max_rate_per_endpoint        = null
β”‚

235:           max_utilization              = null
β”‚

236:         },
β”‚

237:       ]
β”‚

238:       iap_config = {
β”‚

239:         enable               = false
β”‚

240:         oauth2_client_id     = ""
β”‚

241:         oauth2_client_secret = ""
β”‚

242:       }
β”‚

243:     }
β”‚

244:     mig2 = {
β”‚

245:       description                     = null
β”‚

246:       protocol                        = "HTTP"
β”‚

247:       port                            = 80
β”‚

248:       port_name                       = "http"
β”‚

249:       timeout_sec                     = 10
β”‚

250:       connection_draining_timeout_sec = null
β”‚

251:       enable_cdn                      = false
β”‚

252:       security_policy                 = null
β”‚

253:       session_affinity                = null
β”‚

254:       affinity_cookie_ttl_sec         = null
β”‚

255:       custom_request_headers          = null
β”‚

256:       custom_response_headers         = null
β”‚

257:       health_check = local.health_check
β”‚

258:       log_config = {
β”‚

259:         enable      = true
β”‚

260:         sample_rate = 1.0
β”‚

261:       }
β”‚

262:       groups = [
β”‚

263:         {
β”‚

264:           group                        = module.mig2.instance_group
β”‚

265:           balancing_mode               = null
β”‚

266:           capacity_scaler              = null
β”‚

267:           description                  = null
β”‚

268:           max_connections              = null
β”‚

269:           max_connections_per_instance = null
β”‚

270:           max_connections_per_endpoint = null
β”‚

271:           max_rate                     = null
β”‚

272:           max_rate_per_instance        = null
β”‚

273:           max_rate_per_endpoint        = null
β”‚

274:           max_utilization              = null
β”‚

275:         },
β”‚

276:       ]
β”‚

277:       iap_config = {
β”‚

278:         enable               = false
β”‚

279:         oauth2_client_id     = ""
β”‚

280:         oauth2_client_secret = ""
β”‚

281:       }
β”‚

282:     }
β”‚

283:     mig3 = {
β”‚

284:       description                     = null
β”‚

285:       protocol                        = "HTTP"
β”‚

286:       port                            = 80
β”‚

287:       port_name                       = "http"
β”‚

288:       timeout_sec                     = 10
β”‚

289:       connection_draining_timeout_sec = null
β”‚

290:       enable_cdn                      = false
β”‚

291:       security_policy                 = null
β”‚

292:       session_affinity                = null
β”‚

293:       affinity_cookie_ttl_sec         = null
β”‚

294:       custom_request_headers          = null
β”‚

295:       custom_response_headers         = null
β”‚

296:       health_check = local.health_check
β”‚

297:       log_config = {
β”‚

298:         enable      = true
β”‚

299:         sample_rate = 1.0
β”‚

300:       }
β”‚

301:       groups = [
β”‚

302:         {
β”‚

303:           group                        = module.mig3.instance_group
β”‚

304:           balancing_mode               = null
β”‚

305:           capacity_scaler              = null
β”‚

306:           description                  = null
β”‚

307:           max_connections              = null
β”‚

308:           max_connections_per_instance = null
β”‚

309:           max_connections_per_endpoint = null
β”‚

310:           max_rate                     = null
β”‚

311:           max_rate_per_instance        = null
β”‚

312:           max_rate_per_endpoint        = null
β”‚

313:           max_utilization              = null
β”‚

314:         },
β”‚

315:       ]
β”‚

316:       iap_config = {
β”‚

317:         enable               = false
β”‚

318:         oauth2_client_id     = ""
β”‚

319:         oauth2_client_secret = ""
β”‚

320:       }
β”‚

321:     }
β”‚

322:   }
β”‚

β”‚

The given value is not suitable for child module variable "backends"
β”‚

defined at ../../../variables.tf:81,1-20: element "mig2": attribute
β”‚

"cdn_policy" is required.
β•΅
terraform_validate ./test/fixtures/multi_mig 
Success!
The configuration is valid.
terraform_validate ./test/setup 
Success!
The configuration is valid.

comment-bot-dev avatar Jun 18 '22 21:06 comment-bot-dev

Warning: Argument is deprecated

Where is ? πŸ€”

zchee avatar Jun 18 '22 21:06 zchee

I'll fix

zchee avatar Jun 18 '22 22:06 zchee

@zchee I’ve added support for the cdn_policy in this https://github.com/terraform-google-modules/terraform-google-lb-http/pull/244 PR. If what I’ve done doesn’t cover your use case, I’m more than happy to update my PR to encompass it.

benhinchley avatar Jul 04 '22 23:07 benhinchley

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Sep 03 '22 23:09 github-actions[bot]