mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
21 lines
384 B
Go
21 lines
384 B
Go
package gcp
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/afero"
|
|
)
|
|
|
|
// Writer implements ConfigWriter.
|
|
type Writer struct {
|
|
fs afero.Afero
|
|
}
|
|
|
|
// WriteGCEConf persists the GCE config on disk.
|
|
func (w *Writer) WriteGCEConf(config string) error {
|
|
if err := w.fs.WriteFile("/etc/gce.conf", []byte(config), 0o644); err != nil {
|
|
return fmt.Errorf("writing gce config: %w", err)
|
|
}
|
|
return nil
|
|
}
|