Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) DescribeCacheParameterGroups() (map[string]bool, error)
- func (c *Client) DescribeCacheSubnetGroups() (map[string]bool, error)
- func (c *Client) DescribeDBParameterGroups() (map[string]bool, error)
- func (c *Client) DescribeDBSubnetGroups() (map[string]bool, error)
- func (c *Client) DescribeEgressOnlyInternetGateways() (map[string]bool, error)
- func (c *Client) DescribeInstances() (map[string]bool, error)
- func (c *Client) DescribeInternetGateways() (map[string]bool, error)
- func (c *Client) DescribeKeyPairs() (map[string]bool, error)
- func (c *Client) DescribeNatGateways() (map[string]bool, error)
- func (c *Client) DescribeNetworkInterfaces() (map[string]bool, error)
- func (c *Client) DescribeOptionGroups() (map[string]bool, error)
- func (c *Client) DescribeRouteTables() (map[string]bool, error)
- func (c *Client) DescribeSecurityGroups() (map[string]bool, error)
- func (c *Client) DescribeSubnets() (map[string]bool, error)
- func (c *Client) DescribeVpcPeeringConnections() (map[string]bool, error)
- func (c *Client) ListInstanceProfiles() (map[string]bool, error)
- type Config
- type Credentials
- type RuleSet
- type Runner
Constants ¶
This section is empty.
Variables ¶
var AwsProviderAssumeRoleBlockShema = &hclext.BodySchema{ Attributes: []hclext.AttributeSchema{ {Name: "role_arn", Required: true}, {Name: "session_name"}, {Name: "external_id"}, {Name: "policy"}, }, }
AwsProviderAssumeRoleBlockShema is a schema of `assume_role` block
var AwsProviderBlockSchema = &hclext.BodySchema{ Attributes: []hclext.AttributeSchema{ {Name: "access_key"}, {Name: "secret_key"}, {Name: "profile"}, {Name: "shared_credentials_file"}, {Name: "region"}, }, Blocks: []hclext.BlockSchema{ { Type: "assume_role", Body: AwsProviderAssumeRoleBlockShema, }, }, }
AwsProviderBlockSchema is a schema of `aws` provider block
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
IAM iamiface.IAMAPI
EC2 ec2iface.EC2API
RDS rdsiface.RDSAPI
ElastiCache elasticacheiface.ElastiCacheAPI
ELB elbiface.ELBAPI
ELBV2 elbv2iface.ELBV2API
ECS ecsiface.ECSAPI
}
Client is a wrapper of the AWS SDK client It has interfaces for each services to make testing easier
func NewClient ¶
func NewClient(creds Credentials) (*Client, error)
NewClient returns a new Client with configured session
func (*Client) DescribeCacheParameterGroups ¶
DescribeCacheParameterGroups is a wrapper of DescribeCacheParameterGroups
func (*Client) DescribeCacheSubnetGroups ¶
DescribeCacheSubnetGroups is a wrapper of DescribeCacheSubnetGroups
func (*Client) DescribeDBParameterGroups ¶
DescribeDBParameterGroups is a wrapper of DescribeDBParameterGroups
func (*Client) DescribeDBSubnetGroups ¶
DescribeDBSubnetGroups is a wrapper of DescribeDBSubnetGroups
func (*Client) DescribeEgressOnlyInternetGateways ¶
DescribeEgressOnlyInternetGateways is wrapper of DescribeEgressOnlyInternetGateways
func (*Client) DescribeInstances ¶
DescribeInstances is a wrapper of DescribeInstances
func (*Client) DescribeInternetGateways ¶
DescribeInternetGateways is a wrapper of DescribeInternetGateways
func (*Client) DescribeKeyPairs ¶
DescribeKeyPairs is a wrapper of DescribeKeyPairs
func (*Client) DescribeNatGateways ¶
DescribeNatGateways is a wrapper of DescribeNatGateways
func (*Client) DescribeNetworkInterfaces ¶
DescribeNetworkInterfaces is a wrapper of DescribeNetworkInterfaces
func (*Client) DescribeOptionGroups ¶
DescribeOptionGroups is a wrapper of DescribeOptionGroups
func (*Client) DescribeRouteTables ¶
DescribeRouteTables is a wrapper of DescribeRouteTables
func (*Client) DescribeSecurityGroups ¶
DescribeSecurityGroups is a wrapper of DescribeSecurityGroups
func (*Client) DescribeSubnets ¶
DescribeSubnets is a wrapper of DescribeSubnets
func (*Client) DescribeVpcPeeringConnections ¶
DescribeVpcPeeringConnections is a wrapper of DescribeVpcPeeringConnections
type Config ¶
type Config struct {
DeepCheck bool `hclext:"deep_check,optional"`
AccessKey string `hclext:"access_key,optional"`
SecretKey string `hclext:"secret_key,optional"`
Region string `hclext:"region,optional"`
Profile string `hclext:"profile,optional"`
}
Config is the configuration for the ruleset.
type Credentials ¶
type Credentials struct {
AccessKey string
SecretKey string
Profile string
CredsFile string
AssumeRoleARN string
AssumeRoleExternalID string
AssumeRolePolicy string
AssumeRoleSessionName string
Region string
}
Credentials is credentials for AWS used in deep check mode
func GetCredentialsFromProvider ¶
func GetCredentialsFromProvider(runner tflint.Runner) (Credentials, error)
GetCredentialsFromProvider retrieves credentials from the "provider" block in the Terraform configuration
func (Credentials) Merge ¶
func (c Credentials) Merge(other Credentials) Credentials
Merge returns a merged credentials
type RuleSet ¶
type RuleSet struct {
tflint.BuiltinRuleSet
// contains filtered or unexported fields
}
RuleSet is the custom ruleset for the AWS 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.13.0
func (r *RuleSet) ConfigSchema() *hclext.BodySchema
type Runner ¶
Runner is a wrapper of RPC client for inserting custom actions for AWS provider.
func (*Runner) EachStringSliceExprs ¶
func (r *Runner) EachStringSliceExprs(expr hcl.Expression, proc func(val string, expr hcl.Expression)) error
EachStringSliceExprs iterates an evaluated value and the corresponding expression If the given expression is a static list, get an expression for each value If not, the given expression is used as it is