google

package
v0.10.7 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BigQueryDatasetUsageSchema = []*schema.UsageItem{
	{Key: "monthly_queries_tb", ValueType: schema.Float64, DefaultValue: 0},
}
View Source
var BigQueryTableUsageSchema = []*schema.UsageItem{
	{Key: "monthly_streaming_inserts_mb", ValueType: schema.Float64, DefaultValue: 0},
	{Key: "monthly_storage_write_api_gb", ValueType: schema.Float64, DefaultValue: 0},
	{Key: "monthly_storage_read_api_tb", ValueType: schema.Float64, DefaultValue: 0},
	{Key: "monthly_active_storage_gb", ValueType: schema.Float64, DefaultValue: 0},
	{Key: "monthly_long_term_storage_gb", ValueType: schema.Float64, DefaultValue: 0},
}
View Source
var CloudFunctionsFunctionUsageSchema = []*schema.UsageItem{
	{Key: "request_duration_ms", ValueType: schema.Int64, DefaultValue: 0},
	{Key: "monthly_function_invocations", ValueType: schema.Int64, DefaultValue: 0},
	{Key: "monthly_outbound_data_gb", ValueType: schema.Float64, DefaultValue: 0},
}
View Source
var ComputeAddressUsageSchema = []*schema.UsageItem{}
View Source
var ComputeDiskUsageSchema = []*schema.UsageItem{}

ComputeDiskUsageSchema defines a list which represents the usage schema of ComputeDisk.

View Source
var ComputeExternalVPNGatewayNetworkEgressUsageSchema = []*schema.UsageItem{
	{ValueType: schema.Float64, DefaultValue: 0, Key: "asia"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "worldwide"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "china"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "australia"},
}
View Source
var ComputeExternalVPNGatewayUsageSchema = []*schema.UsageItem{
	{
		Key:          "monthly_egress_data_transfer_gb",
		ValueType:    schema.SubResourceUsage,
		DefaultValue: &usage.ResourceUsage{Name: "monthly_egress_data_transfer_gb", Items: ComputeExternalVPNGatewayNetworkEgressUsageSchema},
	},
}
View Source
var ComputeForwardingRuleUsageSchema = []*schema.UsageItem{{Key: "monthly_ingress_data_gb", ValueType: schema.Float64, DefaultValue: 0}}
View Source
var ComputeImageUsageSchema = []*schema.UsageItem{
	{Key: "storage_gb", DefaultValue: 0, ValueType: schema.Float64},
}

ComputeImageUsageSchema defines a list which represents the usage schema of ComputeImage.

View Source
var ComputeInstanceGroupManagerUsageSchema = []*schema.UsageItem{}

ComputeInstanceGroupManagerUsageSchema defines a list which represents the usage schema of ComputeInstanceGroupManager.

View Source
var ComputeInstanceUsageSchema = []*schema.UsageItem{}

ComputeInstanceUsageSchema defines a list which represents the usage schema of ComputeInstance.

View Source
var ComputeMachineImageUsageSchema = []*schema.UsageItem{
	{Key: "storage_gb", DefaultValue: 0, ValueType: schema.Float64},
}

ComputeMachineImageUsageSchema defines a list which represents the usage schema of ComputeMachineImage.

View Source
var ComputeRegionInstanceGroupManagerUsageSchema = []*schema.UsageItem{}

ComputeRegionInstanceGroupManagerUsageSchema defines a list which represents the usage schema of ComputeRegionInstanceGroupManager.

View Source
var ComputeRouterNATUsageSchema = []*schema.UsageItem{
	{Key: "assigned_vms", ValueType: schema.Int64, DefaultValue: 0},
	{Key: "monthly_data_processed_gb", ValueType: schema.Float64, DefaultValue: 0},
}
View Source
var ComputeSnapshotUsageSchema = []*schema.UsageItem{
	{Key: "storage_gb", DefaultValue: 0, ValueType: schema.Float64},
}

ComputeSnapshotUsageSchema defines a list which represents the usage schema of ComputeSnapshot.

View Source
var ComputeTargetGRPCProxyUsageSchema = []*schema.UsageItem{{Key: "monthly_proxy_instances", ValueType: schema.Float64, DefaultValue: 0.000000}, {Key: "monthly_data_processed_gb", ValueType: schema.Float64, DefaultValue: 0}}
View Source
var ComputeVPNGatewayNetworkEgressUsageSchema = []*schema.UsageItem{
	{ValueType: schema.Float64, DefaultValue: 0, Key: "same_region"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "us_or_canada"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "europe"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "asia"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "south_america"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "oceania"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "worldwide"},
}
View Source
var ComputeVPNGatewayUsageSchema = []*schema.UsageItem{
	{
		Key:          "monthly_egress_data_transfer_gb",
		ValueType:    schema.SubResourceUsage,
		DefaultValue: &usage.ResourceUsage{Name: "monthly_egress_data_transfer_gb", Items: ComputeVPNGatewayNetworkEgressUsageSchema},
	},
}
View Source
var ComputeVPNTunnelUsageSchema = []*schema.UsageItem{}
View Source
var ContainerClusterUsageSchema = []*schema.UsageItem{
	{Key: "nodes", DefaultValue: 0, ValueType: schema.Int64},
	{Key: "autopilot_vcpu_count", DefaultValue: 0, ValueType: schema.Float64},
	{Key: "autopilot_memory_gb", DefaultValue: 0, ValueType: schema.Float64},
	{Key: "autopilot_ephemeral_storage_gb", DefaultValue: 0, ValueType: schema.Float64},
}

ContainerClusterUsageSchema defines a list which represents the usage schema of ContainerCluster. Nested wildcard node_pool usage is mapped on provider level.

View Source
var ContainerNodePoolUsageSchema = []*schema.UsageItem{
	{Key: "nodes", DefaultValue: 0, ValueType: schema.Int64},
}

ContainerNodePoolUsageSchema defines a list which represents the usage schema of ContainerNodePool.

View Source
var ContainerRegistryNetworkEgressUsageSchema = []*schema.UsageItem{
	{ValueType: schema.Float64, DefaultValue: 0, Key: "same_continent"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "asia"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "worldwide"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "china"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "australia"},
}
View Source
var ContainerRegistryUsageSchema = []*schema.UsageItem{
	{Key: "storage_gb", ValueType: schema.Float64, DefaultValue: 0},
	{Key: "monthly_class_a_operations", ValueType: schema.Int64, DefaultValue: 0},
	{Key: "monthly_class_b_operations", ValueType: schema.Int64, DefaultValue: 0},
	{Key: "monthly_data_retrieval_gb", ValueType: schema.Float64, DefaultValue: 0},
	{
		Key:          "monthly_egress_data_transfer_gb",
		ValueType:    schema.SubResourceUsage,
		DefaultValue: &usage.ResourceUsage{Name: "monthly_egress_data_transfer_gb", Items: ContainerRegistryNetworkEgressUsageSchema},
	},
}
View Source
var DNSManagedZoneUsageSchema = []*schema.UsageItem{}
View Source
var DNSRecordSetUsageSchema = []*schema.UsageItem{
	{Key: "monthly_queries", ValueType: schema.Int64, DefaultValue: 0},
}
View Source
var KMSCryptoKeyUsageSchema = []*schema.UsageItem{{Key: "key_versions", ValueType: schema.Int64, DefaultValue: 0}, {Key: "monthly_key_operations", ValueType: schema.Int64, DefaultValue: 0}}
View Source
var LoggingUsageSchema = []*schema.UsageItem{
	{Key: "monthly_logging_data_gb", ValueType: schema.Float64, DefaultValue: 0},
}
View Source
var MonitoringMetricDescriptorUsageSchema = []*schema.UsageItem{
	{Key: "monthly_monitoring_data_mb", ValueType: schema.Int64, DefaultValue: 0},
	{Key: "monthly_api_calls", ValueType: schema.Int64, DefaultValue: 0},
}
View Source
var PubSubSubscriptionUsageSchema = []*schema.UsageItem{
	{Key: "monthly_message_data_tb", ValueType: schema.Float64, DefaultValue: 0.0},
	{Key: "storage_gb", ValueType: schema.Float64, DefaultValue: 0},
	{Key: "snapshot_storage_gb", ValueType: schema.Float64, DefaultValue: 0.0},
}
View Source
var PubSubTopicUsageSchema = []*schema.UsageItem{
	{Key: "monthly_message_data_tb", ValueType: schema.Float64, DefaultValue: 0.0},
}
View Source
var RedisInstanceUsageSchema = []*schema.UsageItem{}
View Source
var RegionUsageSchema = []*schema.UsageItem{
	{ValueType: schema.Float64, DefaultValue: 0, Key: "asia_east1"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "asia_east2"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "asia_northeast1"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "asia_northeast2"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "asia_northeast3"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "asia_south1"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "asia_south2"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "asia_southeast1"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "asia_southeast2"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "australia_southeast1"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "australia_southeast2"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "europe_central2"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "europe_north1"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "europe_west1"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "europe_west2"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "europe_west3"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "europe_west4"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "europe_west6"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "northamerica_northeast1"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "northamerica_northeast2"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "southamerica_east1"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "southamerica_west1"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "us_central1"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "us_east1"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "us_east4"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "us_west1"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "us_west2"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "us_west3"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "us_west4"},
}

RegionUsageSchema is the schema representation of the RegionsUsage type. This can be used as a schema.SubResourceUsage to define a structure that's commonly used with resources that vary on a per region basis.

View Source
var SQLDatabaseInstanceUsageSchema = []*schema.UsageItem{{Key: "backup_storage_gb", ValueType: schema.Float64, DefaultValue: 0}}
View Source
var SecretManagerSecretUsageSchema = []*schema.UsageItem{
	{Key: "active_secret_versions", DefaultValue: 0, ValueType: schema.Int64},
	{Key: "monthly_access_operations", DefaultValue: 0, ValueType: schema.Int64},
	{Key: "monthly_rotation_notifications", DefaultValue: 0, ValueType: schema.Int64},
}

SecretManagerSecretUsageSchema defines a list which represents the usage schema of SecretManagerSecret.

View Source
var SecretManagerSecretVersionUsageSchema = []*schema.UsageItem{
	{Key: "monthly_access_operations", DefaultValue: 0, ValueType: schema.Int64},
}

SecretManagerSecretVersionUsageSchema defines a list which represents the usage schema of SecretManagerSecretVersion.

View Source
var StorageBucketNetworkEgressUsageSchema = []*schema.UsageItem{
	{ValueType: schema.Float64, DefaultValue: 0, Key: "same_continent"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "asia"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "worldwide"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "china"},
	{ValueType: schema.Float64, DefaultValue: 0, Key: "australia"},
}
View Source
var StorageBucketUsageSchema = []*schema.UsageItem{
	{Key: "storage_gb", ValueType: schema.Float64, DefaultValue: 0},
	{Key: "monthly_class_a_operations", ValueType: schema.Int64, DefaultValue: 0},
	{Key: "monthly_class_b_operations", ValueType: schema.Int64, DefaultValue: 0},
	{Key: "monthly_data_retrieval_gb", ValueType: schema.Float64, DefaultValue: 0},
	{
		Key:          "monthly_egress_data_transfer_gb",
		ValueType:    schema.SubResourceUsage,
		DefaultValue: &usage.ResourceUsage{Name: "monthly_egress_data_transfer_gb", Items: StorageBucketNetworkEgressUsageSchema},
	},
}

Functions

func GetFloatFieldValueByUsageTag added in v0.9.20

func GetFloatFieldValueByUsageTag(tagValue string, s interface{}) float64

Types

type ArtifactRegistryRepository added in v0.9.16

type ArtifactRegistryRepository struct {
	Address   string
	Region    string
	Continent string

	// StorageGB represents a usage cost that defines the amount of gb the artifact registry uses on a per monthly basis.
	StorageGB *float64 `infracost_usage:"storage_gb"`
	// MonthlyEgressDataTransferGB represents a complex usage cost that defines data transfer to different regions in the
	// google cloud infra. This does not include outbound internet egress (e.g. downloading artifact data to a local machine).
	MonthlyEgressDataTransferGB *RegionsUsage `infracost_usage:"monthly_egress_data_transfer_gb"`
}

ArtifactRegistryRepository struct represents a GCP artifact Registry. Artifact registry is essentially a next generation version of google's container registry. It allows users to store container images and language packages in the GCP.

Pricing for Artifact Registry is based on storage amounts and data transfer.

Resource information: https://cloud.google.com/artifact-registry Pricing information: https://cloud.google.com/artifact-registry/pricing

func (*ArtifactRegistryRepository) BuildResource added in v0.9.16

func (r *ArtifactRegistryRepository) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid ArtifactRegistryRepository struct. It returns ArtifactRegistryRepository as a schema.Resource with two main cost components: storage costs & egress costs.

Storage costs:

priced at $0.10 a month after artifact registry usage is > 0.5 GB. We ignore the free tier as there
is no way to currently tell if other artifact registry resources have gone beyond this free usage tier.

Network costs:

  1. free within the same region
  2. free from multi-region to a region within the same continent, e.g. europe -> europe-west1
  3. $0.01 when between different regions in North America continent
  4. $0.02 when between different regions in Europe continent
  5. $0.05 when between different regions in AsiaPacific continent
  6. $0.15 when between any region and Oceania continent
  7. $0.08 for all other intercontinental data transfer

This method is called after the resource is initialised by an IaC provider. See providers folder for more information.

func (*ArtifactRegistryRepository) PopulateUsage added in v0.9.16

func (r *ArtifactRegistryRepository) PopulateUsage(u *schema.UsageData)

PopulateUsage parses the u schema.UsageData into the ArtifactRegistryRepository. It uses the `infracost_usage` struct tags to populate data into the ArtifactRegistryRepository.

type BigQueryDataset added in v0.9.17

type BigQueryDataset struct {
	Address          string
	Region           string
	MonthlyQueriesTB *float64 `infracost_usage:"monthly_queries_tb"`
}

func (*BigQueryDataset) BuildResource added in v0.9.17

func (r *BigQueryDataset) BuildResource() *schema.Resource

func (*BigQueryDataset) PopulateUsage added in v0.9.17

func (r *BigQueryDataset) PopulateUsage(u *schema.UsageData)

type BigQueryTable added in v0.9.17

type BigQueryTable struct {
	Address                   string
	Region                    string
	MonthlyStreamingInsertsMB *float64 `infracost_usage:"monthly_streaming_inserts_mb"`
	MonthlyStorageWriteAPIGB  *float64 `infracost_usage:"monthly_storage_write_api_gb"`
	MonthlyStorageReadAPITB   *float64 `infracost_usage:"monthly_storage_read_api_tb"`
	MonthlyActiveStorageGB    *float64 `infracost_usage:"monthly_active_storage_gb"`
	MonthlyLongTermStorageGB  *float64 `infracost_usage:"monthly_long_term_storage_gb"`
}

func (*BigQueryTable) BuildResource added in v0.9.17

func (r *BigQueryTable) BuildResource() *schema.Resource

func (*BigQueryTable) PopulateUsage added in v0.9.17

func (r *BigQueryTable) PopulateUsage(u *schema.UsageData)

type CloudFunctionsFunction added in v0.9.17

type CloudFunctionsFunction struct {
	Address                    string
	Region                     string
	AvailableMemoryMB          *int64
	RequestDurationMs          *int64   `infracost_usage:"request_duration_ms"`
	MonthlyFunctionInvocations *int64   `infracost_usage:"monthly_function_invocations"`
	MonthlyOutboundDataGB      *float64 `infracost_usage:"monthly_outbound_data_gb"`
}

func (*CloudFunctionsFunction) BuildResource added in v0.9.17

func (r *CloudFunctionsFunction) BuildResource() *schema.Resource

func (*CloudFunctionsFunction) PopulateUsage added in v0.9.17

func (r *CloudFunctionsFunction) PopulateUsage(u *schema.UsageData)

type ComputeAddress added in v0.9.18

type ComputeAddress struct {
	Address                string
	Region                 string
	AddressType            string
	Purpose                string
	InstancePurchaseOption string
}

func (*ComputeAddress) BuildResource added in v0.9.18

func (r *ComputeAddress) BuildResource() *schema.Resource

func (*ComputeAddress) PopulateUsage added in v0.9.18

func (r *ComputeAddress) PopulateUsage(u *schema.UsageData)

type ComputeDisk added in v0.9.20

type ComputeDisk struct {
	Address string
	Region  string
	Type    string
	Size    float64
}

ComputeDisk struct represents Compute Disk resource.

func (*ComputeDisk) BuildResource added in v0.9.21

func (r *ComputeDisk) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid ComputeDisk struct. This method is called after the resource is initialised by an IaC provider. See providers folder for more information.

func (*ComputeDisk) PopulateUsage added in v0.9.21

func (r *ComputeDisk) PopulateUsage(u *schema.UsageData)

PopulateUsage parses the u schema.UsageData into the ComputeDisk. It uses the `infracost_usage` struct tags to populate data into the ComputeDisk.

type ComputeExternalVPNGateway added in v0.9.20

type ComputeExternalVPNGateway struct {
	Address string
	Region  string

	MonthlyEgressDataTransferGB *ComputeExternalVPNGatewayNetworkEgressUsage `infracost_usage:"monthly_egress_data_transfer_gb"`
}

func (*ComputeExternalVPNGateway) BuildResource added in v0.9.20

func (r *ComputeExternalVPNGateway) BuildResource() *schema.Resource

func (*ComputeExternalVPNGateway) PopulateUsage added in v0.9.20

func (r *ComputeExternalVPNGateway) PopulateUsage(u *schema.UsageData)

type ComputeExternalVPNGatewayNetworkEgressUsage added in v0.9.20

type ComputeExternalVPNGatewayNetworkEgressUsage struct {
	Asia      *float64 `infracost_usage:"asia"`
	Worldwide *float64 `infracost_usage:"worldwide"`
	China     *float64 `infracost_usage:"china"`
	Australia *float64 `infracost_usage:"australia"`

	NetworkEgressUsage
}

func (*ComputeExternalVPNGatewayNetworkEgressUsage) BuildResource added in v0.9.20

type ComputeForwardingRule added in v0.9.18

type ComputeForwardingRule struct {
	Address              string
	Region               string
	MonthlyIngressDataGB *float64 `infracost_usage:"monthly_ingress_data_gb"`
}

func (*ComputeForwardingRule) BuildResource added in v0.9.18

func (r *ComputeForwardingRule) BuildResource() *schema.Resource

func (*ComputeForwardingRule) PopulateUsage added in v0.9.18

func (r *ComputeForwardingRule) PopulateUsage(u *schema.UsageData)

type ComputeGuestAccelerator added in v0.9.20

type ComputeGuestAccelerator struct {
	Type  string
	Count int64
}

ComputeGuestAccelerator defines Guest Accelerator setup for Compute resources.

type ComputeImage added in v0.9.21

type ComputeImage struct {
	Address     string
	Region      string
	StorageSize float64

	// "usage" args
	StorageGB *float64 `infracost_usage:"storage_gb"`
}

ComputeImage struct represents Compute Image resource.

func (*ComputeImage) BuildResource added in v0.9.21

func (r *ComputeImage) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid ComputeImage struct. This method is called after the resource is initialised by an IaC provider. See providers folder for more information.

func (*ComputeImage) PopulateUsage added in v0.9.21

func (r *ComputeImage) PopulateUsage(u *schema.UsageData)

PopulateUsage parses the u schema.UsageData into the ComputeImage. It uses the `infracost_usage` struct tags to populate data into the ComputeImage.

type ComputeInstance added in v0.9.20

type ComputeInstance struct {
	Address string
	Region  string

	MachineType       string
	PurchaseOption    string
	Size              int64
	HasBootDisk       bool
	BootDiskSize      float64
	BootDiskType      string
	ScratchDisks      int
	GuestAccelerators []*ComputeGuestAccelerator
}

ComputeInstance struct represents Compute Instance resource.

func (*ComputeInstance) BuildResource added in v0.9.20

func (r *ComputeInstance) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid ComputeInstance struct. This method is called after the resource is initialised by an IaC provider. See providers folder for more information.

func (*ComputeInstance) PopulateUsage added in v0.9.20

func (r *ComputeInstance) PopulateUsage(u *schema.UsageData)

PopulateUsage parses the u schema.UsageData into the ComputeInstance. It uses the `infracost_usage` struct tags to populate data into the ComputeInstance.

type ComputeInstanceGroupManager added in v0.9.20

type ComputeInstanceGroupManager struct {
	Address string
	Region  string

	MachineType       string
	PurchaseOption    string
	TargetSize        int64
	Disks             []*ComputeDisk
	ScratchDisks      int
	GuestAccelerators []*ComputeGuestAccelerator
}

ComputeInstanceGroupManager struct represents Compute Instance Group Manager resource.

func (*ComputeInstanceGroupManager) BuildResource added in v0.9.20

func (r *ComputeInstanceGroupManager) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid ComputeInstanceGroupManager struct. This method is called after the resource is initialised by an IaC provider. See providers folder for more information.

func (*ComputeInstanceGroupManager) PopulateUsage added in v0.9.20

func (r *ComputeInstanceGroupManager) PopulateUsage(u *schema.UsageData)

PopulateUsage parses the u schema.UsageData into the ComputeInstanceGroupManager. It uses the `infracost_usage` struct tags to populate data into the ComputeInstanceGroupManager.

type ComputeMachineImage added in v0.9.21

type ComputeMachineImage struct {
	Address string
	Region  string

	// "usage" args
	StorageGB *float64 `infracost_usage:"storage_gb"`
}

ComputeMachineImage struct represents Compute Machine Image resource.

func (*ComputeMachineImage) BuildResource added in v0.9.21

func (r *ComputeMachineImage) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid ComputeMachineImage struct. This method is called after the resource is initialised by an IaC provider. See providers folder for more information.

func (*ComputeMachineImage) PopulateUsage added in v0.9.21

func (r *ComputeMachineImage) PopulateUsage(u *schema.UsageData)

PopulateUsage parses the u schema.UsageData into the ComputeMachineImage. It uses the `infracost_usage` struct tags to populate data into the ComputeMachineImage.

type ComputeRegionInstanceGroupManager added in v0.9.20

type ComputeRegionInstanceGroupManager struct {
	Address string
	Region  string

	MachineType       string
	PurchaseOption    string
	TargetSize        int64
	ScratchDisks      int
	Disks             []*ComputeDisk
	GuestAccelerators []*ComputeGuestAccelerator
}

ComputeRegionInstanceGroupManager struct represents Compute Region Instance Group Manager resource.

func (*ComputeRegionInstanceGroupManager) BuildResource added in v0.9.20

BuildResource builds a schema.Resource from a valid ComputeRegionInstanceGroupManager struct. This method is called after the resource is initialised by an IaC provider. See providers folder for more information.

func (*ComputeRegionInstanceGroupManager) PopulateUsage added in v0.9.20

func (r *ComputeRegionInstanceGroupManager) PopulateUsage(u *schema.UsageData)

PopulateUsage parses the u schema.UsageData into the ComputeRegionInstanceGroupManager. It uses the `infracost_usage` struct tags to populate data into the ComputeRegionInstanceGroupManager.

type ComputeRouterNAT added in v0.9.17

type ComputeRouterNAT struct {
	Address                string
	Region                 string
	AssignedVMs            *int64   `infracost_usage:"assigned_vms"`
	MonthlyDataProcessedGB *float64 `infracost_usage:"monthly_data_processed_gb"`
}

func (*ComputeRouterNAT) BuildResource added in v0.9.17

func (r *ComputeRouterNAT) BuildResource() *schema.Resource

func (*ComputeRouterNAT) PopulateUsage added in v0.9.17

func (r *ComputeRouterNAT) PopulateUsage(u *schema.UsageData)

type ComputeSnapshot added in v0.9.21

type ComputeSnapshot struct {
	Address  string
	Region   string
	DiskSize float64

	// "usage" args
	StorageGB *float64 `infracost_usage:"storage_gb"`
}

ComputeSnapshot struct represents Compute Snapshot resource.

func (*ComputeSnapshot) BuildResource added in v0.9.21

func (r *ComputeSnapshot) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid ComputeSnapshot struct. This method is called after the resource is initialised by an IaC provider. See providers folder for more information.

func (*ComputeSnapshot) PopulateUsage added in v0.9.21

func (r *ComputeSnapshot) PopulateUsage(u *schema.UsageData)

PopulateUsage parses the u schema.UsageData into the ComputeSnapshot. It uses the `infracost_usage` struct tags to populate data into the ComputeSnapshot.

type ComputeTargetGRPCProxy added in v0.9.18

type ComputeTargetGRPCProxy struct {
	Address                string
	Region                 string
	MonthlyProxyInstances  *float64 `infracost_usage:"monthly_proxy_instances"`
	MonthlyDataProcessedGB *float64 `infracost_usage:"monthly_data_processed_gb"`
}

func (*ComputeTargetGRPCProxy) BuildResource added in v0.9.18

func (r *ComputeTargetGRPCProxy) BuildResource() *schema.Resource

func (*ComputeTargetGRPCProxy) PopulateUsage added in v0.9.18

func (r *ComputeTargetGRPCProxy) PopulateUsage(u *schema.UsageData)

type ComputeVPNGateway added in v0.9.22

type ComputeVPNGateway struct {
	Address string
	Region  string

	MonthlyEgressDataTransferGB *ComputeVPNGatewayNetworkEgressUsage `infracost_usage:"monthly_egress_data_transfer_gb"`
}

func (*ComputeVPNGateway) BuildResource added in v0.9.22

func (r *ComputeVPNGateway) BuildResource() *schema.Resource

func (*ComputeVPNGateway) PopulateUsage added in v0.9.22

func (r *ComputeVPNGateway) PopulateUsage(u *schema.UsageData)

type ComputeVPNGatewayNetworkEgressUsage added in v0.9.20

type ComputeVPNGatewayNetworkEgressUsage struct {
	SameRegion   *float64 `infracost_usage:"same_region"`
	USOrCanada   *float64 `infracost_usage:"us_or_canada"`
	Europe       *float64 `infracost_usage:"europe"`
	Asia         *float64 `infracost_usage:"asia"`
	SouthAmerica *float64 `infracost_usage:"south_america"`
	Oceania      *float64 `infracost_usage:"oceania"`
	Worldwide    *float64 `infracost_usage:"worldwide"`

	NetworkEgressUsage
}

func (*ComputeVPNGatewayNetworkEgressUsage) BuildResource added in v0.9.20

type ComputeVPNTunnel added in v0.9.17

type ComputeVPNTunnel struct {
	Address string
	Region  string
}

func (*ComputeVPNTunnel) BuildResource added in v0.9.17

func (r *ComputeVPNTunnel) BuildResource() *schema.Resource

func (*ComputeVPNTunnel) PopulateUsage added in v0.9.17

func (r *ComputeVPNTunnel) PopulateUsage(u *schema.UsageData)

type ContainerCluster added in v0.9.20

type ContainerCluster struct {
	Address string
	Region  string

	AutopilotEnabled bool

	IsZone          bool
	DefaultNodePool *ContainerNodePool
	NodePools       []*ContainerNodePool

	// "usage" args
	DefaultNodePoolNodes        *int64   `infracost_usage:"nodes"`
	AutopilotVCPUCount          *float64 `infracost_usage:"autopilot_vcpu_count"`
	AutopilotMemoryGB           *float64 `infracost_usage:"autopilot_memory_gb"`
	AutopilotEphemeralStorageGB *float64 `infracost_usage:"autopilot_ephemeral_storage_gb"`
}

ContainerCluster struct represents Container Cluster resource.

func (*ContainerCluster) BuildResource added in v0.9.20

func (r *ContainerCluster) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid ContainerCluster struct. This method is called after the resource is initialised by an IaC provider. See providers folder for more information.

func (*ContainerCluster) PopulateUsage added in v0.9.20

func (r *ContainerCluster) PopulateUsage(u *schema.UsageData)

PopulateUsage parses the u schema.UsageData into the ContainerCluster. It uses the `infracost_usage` struct tags to populate data into the ContainerCluster.

type ContainerNodeConfig added in v0.9.20

type ContainerNodeConfig struct {
	MachineType       string
	PurchaseOption    string
	DiskType          string
	DiskSize          float64
	LocalSSDCount     int64
	GuestAccelerators []*ComputeGuestAccelerator
}

ContainerNodeConfig defines Node configuration for Container resources.

type ContainerNodePool added in v0.9.20

type ContainerNodePool struct {
	Address string
	Region  string

	Zones        int64
	CountPerZone int64
	NodeConfig   *ContainerNodeConfig

	// "usage" args
	Nodes *int64 `infracost_usage:"nodes"`
}

ContainerNodePool struct represents Container Cluster's Node Pool resource.

func (*ContainerNodePool) BuildResource added in v0.9.20

func (r *ContainerNodePool) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid ContainerNodePool struct. This method is called after the resource is initialised by an IaC provider. See providers folder for more information.

func (*ContainerNodePool) PopulateUsage added in v0.9.20

func (r *ContainerNodePool) PopulateUsage(u *schema.UsageData)

PopulateUsage parses the u schema.UsageData into the ContainerNodePool. It uses the `infracost_usage` struct tags to populate data into the ContainerNodePool.

type ContainerRegistry added in v0.9.22

type ContainerRegistry struct {
	Address                     string
	Region                      string
	Location                    string
	StorageClass                string
	StorageGB                   *float64                             `infracost_usage:"storage_gb"`
	MonthlyClassAOperations     *int64                               `infracost_usage:"monthly_class_a_operations"`
	MonthlyClassBOperations     *int64                               `infracost_usage:"monthly_class_b_operations"`
	MonthlyEgressDataTransferGB *ContainerRegistryNetworkEgressUsage `infracost_usage:"monthly_egress_data_transfer_gb"`
}

func (*ContainerRegistry) BuildResource added in v0.9.22

func (r *ContainerRegistry) BuildResource() *schema.Resource

func (*ContainerRegistry) PopulateUsage added in v0.9.22

func (r *ContainerRegistry) PopulateUsage(u *schema.UsageData)

type ContainerRegistryNetworkEgressUsage added in v0.9.20

type ContainerRegistryNetworkEgressUsage struct {
	SameContinent *float64 `infracost_usage:"same_continent"`
	Asia          *float64 `infracost_usage:"asia"`
	Worldwide     *float64 `infracost_usage:"worldwide"`
	China         *float64 `infracost_usage:"china"`
	Australia     *float64 `infracost_usage:"australia"`

	NetworkEgressUsage
}

func (*ContainerRegistryNetworkEgressUsage) BuildResource added in v0.9.20

type DNSManagedZone added in v0.9.17

type DNSManagedZone struct {
	Address string
}

func (*DNSManagedZone) BuildResource added in v0.9.17

func (r *DNSManagedZone) BuildResource() *schema.Resource

func (*DNSManagedZone) PopulateUsage added in v0.9.17

func (r *DNSManagedZone) PopulateUsage(u *schema.UsageData)

type DNSRecordSet added in v0.9.17

type DNSRecordSet struct {
	Address        string
	MonthlyQueries *int64 `infracost_usage:"monthly_queries"`
}

func (*DNSRecordSet) BuildResource added in v0.9.17

func (r *DNSRecordSet) BuildResource() *schema.Resource

func (*DNSRecordSet) PopulateUsage added in v0.9.17

func (r *DNSRecordSet) PopulateUsage(u *schema.UsageData)

type KMSCryptoKey added in v0.9.18

type KMSCryptoKey struct {
	Address              string
	Region               string
	VersionTemplate      string
	Algorithm            string
	ProtectionLevel      string
	RotationPeriod       string
	KeyVersions          *int64 `infracost_usage:"key_versions"`
	MonthlyKeyOperations *int64 `infracost_usage:"monthly_key_operations"`
}

func (*KMSCryptoKey) BuildResource added in v0.9.18

func (r *KMSCryptoKey) BuildResource() *schema.Resource

func (*KMSCryptoKey) PopulateUsage added in v0.9.18

func (r *KMSCryptoKey) PopulateUsage(u *schema.UsageData)

type Logging added in v0.9.17

type Logging struct {
	Address              string
	MonthlyLoggingDataGB *float64 `infracost_usage:"monthly_logging_data_gb"`
}

func (*Logging) BuildResource added in v0.9.17

func (r *Logging) BuildResource() *schema.Resource

func (*Logging) PopulateUsage added in v0.9.17

func (r *Logging) PopulateUsage(u *schema.UsageData)

type MonitoringMetricDescriptor added in v0.9.17

type MonitoringMetricDescriptor struct {
	Address                 string
	MonthlyMonitoringDataMB *int64 `infracost_usage:"monthly_monitoring_data_mb"`
	MonthlyAPICalls         *int64 `infracost_usage:"monthly_api_calls"`
}

func (*MonitoringMetricDescriptor) BuildResource added in v0.9.17

func (r *MonitoringMetricDescriptor) BuildResource() *schema.Resource

func (*MonitoringMetricDescriptor) PopulateUsage added in v0.9.17

func (r *MonitoringMetricDescriptor) PopulateUsage(u *schema.UsageData)

type NetworkEgressUsage added in v0.9.20

type NetworkEgressUsage struct {
	Address    string
	Region     string
	PrefixName string
}

type PubSubSubscription added in v0.9.17

type PubSubSubscription struct {
	Address              string
	MonthlyMessageDataTB *float64 `infracost_usage:"monthly_message_data_tb"`
	StorageGB            *float64 `infracost_usage:"storage_gb"`
	SnapshotStorageGB    *float64 `infracost_usage:"snapshot_storage_gb"`
}

func (*PubSubSubscription) BuildResource added in v0.9.17

func (r *PubSubSubscription) BuildResource() *schema.Resource

func (*PubSubSubscription) PopulateUsage added in v0.9.17

func (r *PubSubSubscription) PopulateUsage(u *schema.UsageData)

type PubSubTopic added in v0.9.17

type PubSubTopic struct {
	Address              string
	MonthlyMessageDataTB *float64 `infracost_usage:"monthly_message_data_tb"`
}

func (*PubSubTopic) BuildResource added in v0.9.17

func (r *PubSubTopic) BuildResource() *schema.Resource

func (*PubSubTopic) PopulateUsage added in v0.9.17

func (r *PubSubTopic) PopulateUsage(u *schema.UsageData)

type RedisInstance added in v0.9.17

type RedisInstance struct {
	Address      string
	Region       string
	Tier         string
	MemorySizeGB float64
}

func (*RedisInstance) BuildResource added in v0.9.17

func (r *RedisInstance) BuildResource() *schema.Resource

func (*RedisInstance) PopulateUsage added in v0.9.17

func (r *RedisInstance) PopulateUsage(u *schema.UsageData)

type RegionUsage added in v0.9.16

type RegionUsage struct {
	Key   string
	Value float64
}

RegionUsage defines a hard definition in the regions map.

type RegionsUsage added in v0.9.16

type RegionsUsage struct {
	AsiaEast1              *float64 `infracost_usage:"asia_east1"`
	AsiaEast2              *float64 `infracost_usage:"asia_east2"`
	AsiaNortheast1         *float64 `infracost_usage:"asia_northeast1"`
	AsiaNortheast2         *float64 `infracost_usage:"asia_northeast2"`
	AsiaNortheast3         *float64 `infracost_usage:"asia_northeast3"`
	AsiaSouth1             *float64 `infracost_usage:"asia_south1"`
	AsiaSouth2             *float64 `infracost_usage:"asia_south2"`
	AsiaSoutheast1         *float64 `infracost_usage:"asia_southeast1"`
	AsiaSoutheast2         *float64 `infracost_usage:"asia_southeast2"`
	AustraliaSoutheast1    *float64 `infracost_usage:"australia_southeast1"`
	AustraliaSoutheast2    *float64 `infracost_usage:"australia_southeast2"`
	EuropeCentral2         *float64 `infracost_usage:"europe_central2"`
	EuropeNorth1           *float64 `infracost_usage:"europe_north1"`
	EuropeWest1            *float64 `infracost_usage:"europe_west1"`
	EuropeWest2            *float64 `infracost_usage:"europe_west2"`
	EuropeWest3            *float64 `infracost_usage:"europe_west3"`
	EuropeWest4            *float64 `infracost_usage:"europe_west4"`
	EuropeWest6            *float64 `infracost_usage:"europe_west6"`
	NorthAmericaNortheast1 *float64 `infracost_usage:"northamerica_northeast1"`
	NorthAmericaNortheast2 *float64 `infracost_usage:"northamerica_northeast2"`
	SouthAmericaEast1      *float64 `infracost_usage:"southamerica_east1"`
	SouthAmericaWest1      *float64 `infracost_usage:"southamerica_west1"`
	USCentral1             *float64 `infracost_usage:"us_central1"`
	USEast1                *float64 `infracost_usage:"us_east1"`
	USEast4                *float64 `infracost_usage:"us_east4"`
	USWest1                *float64 `infracost_usage:"us_west1"`
	USWest2                *float64 `infracost_usage:"us_west2"`
	USWest3                *float64 `infracost_usage:"us_west3"`
	USWest4                *float64 `infracost_usage:"us_west4"`
}

RegionsUsage is a reusable type that represents a usage cost map. This can be used in resources that define a usage parameter that's changed on a per-region basis, e.g:

monthly_data_processed_gb:

asia_northeast1: 188
asia_east2: 78

can be handled by adding a usage cost property to your resource like so:

type MyResource struct {
   ...
   MonthlyDataProcessedGB *RegionsUsage `infracost_usage:"monthly_processed_gb"`
}

func (RegionsUsage) Values added in v0.9.16

func (r RegionsUsage) Values() []RegionUsage

Values returns RegionUsage as a slice which can be iterated over to create cost components. The keys of the regions returned have their underscores replaced with hypens so they can be used in product filters and cost lookups.

type SQLDatabaseInstance added in v0.10.0

type SQLDatabaseInstance struct {
	Address              string
	DiskSize             int64
	UseIPV4              bool
	ReplicaConfiguration string
	Tier                 string
	AvailabilityType     string
	Region               string
	DatabaseVersion      string
	DiskType             string
	BackupStorageGB      *float64 `infracost_usage:"backup_storage_gb"`
}

func (*SQLDatabaseInstance) BuildResource added in v0.10.0

func (r *SQLDatabaseInstance) BuildResource() *schema.Resource

func (*SQLDatabaseInstance) PopulateUsage added in v0.10.0

func (r *SQLDatabaseInstance) PopulateUsage(u *schema.UsageData)

type SQLInstanceDBType added in v0.10.0

type SQLInstanceDBType int
const (
	MySQL SQLInstanceDBType = iota
	PostgreSQL
	SQLServer
)

type SecretManagerSecret

type SecretManagerSecret struct {
	Address              string
	Region               string
	ReplicationLocations int64

	// "usage" args
	ActiveSecretVersions         *int64 `infracost_usage:"active_secret_versions"`
	MonthlyAccessOperations      *int64 `infracost_usage:"monthly_access_operations"`
	MonthlyRotationNotifications *int64 `infracost_usage:"monthly_rotation_notifications"`
}

SecretManagerSecret represents Google Secret Manager's Secret resource.

The cost of active secret versions depends on the number of replication locations. If it's more than one then the price is multiplied by the locations' quantity. Pricing API includes Free Tier, but it's not used.

More resource information here: https://cloud.google.com/secret-manager Pricing information here: https://cloud.google.com/secret-manager/pricing

func (*SecretManagerSecret) BuildResource

func (r *SecretManagerSecret) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid SecretManagerSecret. This method is called after the resource is initialised by an IaC provider. See providers folder for more information.

func (*SecretManagerSecret) PopulateUsage

func (r *SecretManagerSecret) PopulateUsage(u *schema.UsageData)

PopulateUsage parses the u schema.UsageData into the SecretManagerSecret. It uses the `infracost_usage` struct tags to populate data into the SecretManagerSecret.

type SecretManagerSecretVersion

type SecretManagerSecretVersion struct {
	Address              string
	Region               string
	ReplicationLocations int64

	// "usage" args
	MonthlyAccessOperations *int64 `infracost_usage:"monthly_access_operations"`
}

SecretManagerSecretVersion represents one Google Secret Manager Secret's Version resource.

The cost of active secret version depends on the number of replication locations specified by its parent secret. If it's more than one then the price is multiplied by the locations' quantity. Pricing API includes Free Tier, but it's not used.

More resource information here: https://cloud.google.com/secret-manager Pricing information here: https://cloud.google.com/secret-manager/pricing

func (*SecretManagerSecretVersion) BuildResource

func (r *SecretManagerSecretVersion) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid SecretManagerSecretVersion. This method is called after the resource is initialised by an IaC provider. See providers folder for more information.

func (*SecretManagerSecretVersion) PopulateUsage

func (r *SecretManagerSecretVersion) PopulateUsage(u *schema.UsageData)

PopulateUsage parses the u schema.UsageData into the SecretManagerSecretVersion. It uses the `infracost_usage` struct tags to populate data into the SecretManagerSecretVersion.

type StorageBucket added in v0.9.22

type StorageBucket struct {
	Address                     string
	Region                      string
	Location                    string
	StorageClass                string
	StorageGB                   *float64                         `infracost_usage:"storage_gb"`
	MonthlyClassAOperations     *int64                           `infracost_usage:"monthly_class_a_operations"`
	MonthlyClassBOperations     *int64                           `infracost_usage:"monthly_class_b_operations"`
	MonthlyDataRetrievalGB      *float64                         `infracost_usage:"monthly_data_retrieval_gb"`
	MonthlyEgressDataTransferGB *StorageBucketNetworkEgressUsage `infracost_usage:"monthly_egress_data_transfer_gb"`
}

func (*StorageBucket) BuildResource added in v0.9.22

func (r *StorageBucket) BuildResource() *schema.Resource

func (*StorageBucket) PopulateUsage added in v0.9.22

func (r *StorageBucket) PopulateUsage(u *schema.UsageData)

type StorageBucketNetworkEgressUsage added in v0.9.20

type StorageBucketNetworkEgressUsage struct {
	SameContinent *float64 `infracost_usage:"same_continent"`
	Asia          *float64 `infracost_usage:"asia"`
	Worldwide     *float64 `infracost_usage:"worldwide"`
	China         *float64 `infracost_usage:"china"`
	Australia     *float64 `infracost_usage:"australia"`

	NetworkEgressUsage
}

func (*StorageBucketNetworkEgressUsage) BuildResource added in v0.9.20

func (r *StorageBucketNetworkEgressUsage) BuildResource() *schema.Resource

Jump to

Keyboard shortcuts

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