gcp

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON2HCL

func JSON2HCL(w io.Writer, json []byte) error

JSON2HCL takes a JSON representation of a GCP resource and writes the equivalent HCL (Terraform) representation to the supplied io.Writer

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

A Client holds a connected Google compute.Service and context

func (*Client) Connect

func (g *Client) Connect() error

Connect connects the Client to Google Cloud with your application default credentials

func (*Client) DNSManagedZones

func (g *Client) DNSManagedZones(project string) (dnszones []*dns.ManagedZone, e error)

DNSManagedZones returns all DNS managed zones in the specified project

func (*Client) Instances

func (g *Client) Instances(project, zone string) (instances []*compute.Instance, e error)

Instances returns all compute instances in the specified project and zone

func (*Client) ListDNSManagedZones

func (g *Client) ListDNSManagedZones(w io.Writer, project string) error

ListDNSManagedZones gets the list of all DNS managed zones in the specified project and prints their names to the specified io.Writer.

func (*Client) ListInstances

func (g *Client) ListInstances(w io.Writer, project string, zone string) error

ListInstances gets the list of all GCP instances in the specified project and writes an HCL representation of each to the specified io.Writer.

func (*Client) ListZones

func (g *Client) ListZones(w io.Writer, project string) error

ListZones gets the list of all zones in the specified project and prints their names to the specified io.Writer.

func (*Client) Zones

func (g *Client) Zones(project string) (zones []*compute.Zone, e error)

Zones returns all zones in the specified project

Directories

Path Synopsis
cmd
gcp

Jump to

Keyboard shortcuts

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