google

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoogleProviderBlockSchema = &hclext.BodySchema{
	Attributes: []hclext.AttributeSchema{
		{Name: "project"},
	},
}

GoogleProviderBlockSchema is a schema of `google` provider block

Functions

func GetProject

func GetProject(runner tflint.Runner) (string, error)

GetProject retrieves project_id from the "provider" block in the Terraform configuration and environment variables

Types

type Client

type Client struct {
	ServiceUsage *serviceusage.Service
}

Client is a wrapper of the Google API client

func NewClient

func NewClient() (*Client, error)

NewClient returns a new Client

type Config

type Config struct {
	DeepCheck bool `hclext:"deep_check,optional"`
}

Config is the configuration for the ruleset.

type RuleSet

type RuleSet struct {
	tflint.BuiltinRuleSet
	// contains filtered or unexported fields
}

RuleSet is the custom ruleset for the Google provider plugin.

func (*RuleSet) ApplyConfig

func (r *RuleSet) ApplyConfig(body *hclext.BodyContent) error

ApplyConfig reflects the plugin configuration to the ruleset.

func (*RuleSet) ConfigSchema added in v0.16.0

func (r *RuleSet) ConfigSchema() *hclext.BodySchema

func (*RuleSet) NewRunner added in v0.23.0

func (r *RuleSet) NewRunner(runner tflint.Runner) (tflint.Runner, error)

NewRunner injects a custom Google runner

type Runner

type Runner struct {
	tflint.Runner
	Client  *Client
	Project string
}

Runner is a wrapper of RPC client for inserting custom actions for Google provider.

func NewRunner

func NewRunner(runner tflint.Runner, config *Config) (*Runner, error)

NewRunner returns a custom Google runner.

func (*Runner) ParentProject

func (r *Runner) ParentProject() string

ParentProject returns a part of the API path about the parent project

Jump to

Keyboard shortcuts

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