func AddLicense(dir string) error {
	fn := func(path string, info os.FileInfo, err error) error {
		if err != nil {
			return fmt.Errorf("walk path %q: %v", path, err)
		}
		if !isTerraformFile(path) {
			return nil
		}
		if err := writeLicense(path, info.Mode()); err != nil {
			return err
		}
		return nil
	}
	if err := filepath.Walk(dir, fn); err != nil {
		return err
	}
	return nil
}
AddLicense adds Google LLC Apache 2.0 license header to Terraform files in dir.
package licenseutil
import (
	"bytes"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"strings"
)
var license = []byte(`# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http: 
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
`)