variable"num"{type=numberdefault=nullnullable=truevalidation{condition=(var.num==null?true:(var.num>=0&&var.num<=1))error_message="Value must be between 0 and 1."}}resource"google_compute_region_autoscaler""sample"{ # 省略dynamic"cpu_utilization"{for_each=var.num!=null?[true]:[]content{target=var.num}}}