createsnapshot

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Output

type Output struct {
	// DiskNames optionally contains the names of the disks copied to a target project.
	DiskNames []string
}

Output contains the output of this function.

func Execute

func Execute(ctx context.Context, values *Values, services *Services) (*Output, error)

Execute creates a snapshot of an instance's disk.

For a given supported finding pull each disk associated with the affected instance.

  • Check to make sure we haven't created a snapshot for this finding recently.
  • Create a new snapshot for each disk labeled with the finding and current time.

In order for the snapshot to be create the service account must be granted the correct role on the affected project. At this time this grant is defined per project but should be changed to support folder and organization level grants.

type Services

type Services struct {
	Host     *services.Host
	Logger   *services.Logger
	Resource *services.Resource
}

Services contains the services needed for this function.

type Values

type Values struct {
	DryRun    bool
	ProjectID string
	RuleName  string
	Instance  string
	Zone      string
	Output    []string

	Turbinia struct {
		ProjectID string
		Topic     string
		Zone      string
	}
}

Values contains the required values needed for this function.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL