azure

package
v0.9.17 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

FrontdoorFirewallPolicyUsageSchema defines a list which represents the usage schema of FrontdoorFirewallPolicy.

View Source
var FrontdoorUsageSchema = []*schema.UsageItem{
	{Key: "monthly_inbound_data_transfer_gb", DefaultValue: 0, ValueType: schema.Float64},
	{
		Key:          "monthly_outbound_data_transfer_gb",
		DefaultValue: &usage.ResourceUsage{Name: "monthly_outbound_data_transfer_gb", Items: frontdoorOutboundDataUsageSchema},
		ValueType:    schema.SubResourceUsage,
	},
}

FrontdoorUsageSchema defines a list which represents the usage schema of Frontdoor.

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

P2SVPNGatewayUsageSchema defines a list which represents the usage schema of VPNGateway if of type P2S.

View Source
var StorageAccountUsageSchema = []*schema.UsageItem{
	{Key: "storage_gb", DefaultValue: 0, ValueType: schema.Float64},
	{Key: "monthly_iterative_read_operations", DefaultValue: 0, ValueType: schema.Int64},
	{Key: "monthly_read_operations", DefaultValue: 0, ValueType: schema.Int64},
	{Key: "monthly_iterative_write_operations", DefaultValue: 0, ValueType: schema.Int64},
	{Key: "monthly_write_operations", DefaultValue: 0, ValueType: schema.Int64},
	{Key: "monthly_list_and_create_container_operations", DefaultValue: 0, ValueType: schema.Int64},
	{Key: "monthly_other_operations", DefaultValue: 0, ValueType: schema.Int64},
	{Key: "monthly_data_retrieval_gb", DefaultValue: 0, ValueType: schema.Float64},
	{Key: "monthly_data_write_gb", DefaultValue: 0, ValueType: schema.Float64},
	{Key: "blob_index_tags", DefaultValue: 0, ValueType: schema.Int64},
	{Key: "data_at_rest_storage_gb", DefaultValue: 0, ValueType: schema.Float64},
	{Key: "snapshots_storage_gb", DefaultValue: 0, ValueType: schema.Float64},
	{Key: "metadata_at_rest_storage_gb", DefaultValue: 0, ValueType: schema.Float64},
	{Key: "early_deletion_gb", DefaultValue: 0, ValueType: schema.Float64},
}

StorageAccountUsageSchema defines a list which represents the usage schema of StorageAccount.

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

VirtualHubUsageSchema defines a list which represents the usage schema of VirtualHub.

Functions

This section is empty.

Types

type ExpressRouteConnection added in v0.9.15

type ExpressRouteConnection struct {
	// Address is the unique name of the resource in the IAC language.
	Address string
	// Region is the azure region the ExpressRouteConnection is provisioned within.
	Region string
}

ExpressRouteConnection represents an Express Route Gateway connection, which is a billable component of ExpressRouteGateway. See ExpressRouteGateway for more information.

More resource information here: https://docs.microsoft.com/en-us/azure/virtual-wan/virtual-wan-about Pricing information here: https://azure.microsoft.com/en-us/pricing/details/virtual-wan/

func (*ExpressRouteConnection) BuildResource added in v0.9.15

func (e *ExpressRouteConnection) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid ExpressRouteConnection. It returns a ExpressRouteConnection as a schema.Resource with a single cost component representing the connection unit. The hourly quantity is set to 1 as ExpressRouteConnection represents a single connection unit.

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

func (*ExpressRouteConnection) PopulateUsage added in v0.9.15

func (e *ExpressRouteConnection) PopulateUsage(u *schema.UsageData)

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

type ExpressRouteGateway added in v0.9.15

type ExpressRouteGateway struct {
	// Address is the unique name of the resource in the IAC language.
	Address string
	// Region is the azure region the VPNGateway is provisioned within.
	Region string
	// ScaleUnits represents a unit defined to pick an aggregate throughput of a gateway in Virtual hub.
	// 1 scale unit of ExpressRoute = 2 Gbps.
	ScaleUnits int64
}

ExpressRouteGateway is a Virtual WAN gateway that provides direct connectivity to Azure cloud services. All transferred data is not encrypted, and do not go over the public Internet.

More resource information here: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-about-virtual-network-gateways Pricing information here: https://azure.microsoft.com/en-us/pricing/details/virtual-wan/

func (*ExpressRouteGateway) BuildResource added in v0.9.15

func (e *ExpressRouteGateway) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid ExpressRouteGateway. It returns ExpressRouteGateway with a single cost component "ER scale units". See more about scale units reading ExpressRouteGateway.ScaleUnits.

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

func (*ExpressRouteGateway) PopulateUsage added in v0.9.15

func (e *ExpressRouteGateway) PopulateUsage(u *schema.UsageData)

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

type Frontdoor

type Frontdoor struct {
	Address string
	Region  string

	FrontendHosts int
	RoutingRules  int

	// "usage" args
	MonthlyInboundDataTransferGB  *float64                            `infracost_usage:"monthly_inbound_data_transfer_gb"`
	MonthlyOutboundDataTransferGB *frontdoorOutboundDataTransferUsage `infracost_usage:"monthly_outbound_data_transfer_gb"`
}

Frontdoor struct represents Azure's Front Door network service.

More resource information here: https://docs.microsoft.com/en-us/azure/frontdoor/front-door-overview Pricing information here: https://azure.microsoft.com/en-us/pricing/details/frontdoor/ (Azure Front Door tab)

func (*Frontdoor) BuildResource

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

BuildResource builds a schema.Resource from valid Frontdoor data. This method is called after the resource is initialised by an IaC provider.

func (*Frontdoor) PopulateUsage

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

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

type FrontdoorFirewallPolicy

type FrontdoorFirewallPolicy struct {
	Address string
	Region  string

	CustomRules     int
	ManagedRulesets int

	// "usage" args
	MonthlyCustomRuleRequests     *int64 `infracost_usage:"monthly_custom_rule_requests"`
	MonthlyManagedRulesetRequests *int64 `infracost_usage:"monthly_managed_ruleset_requests"`
}

FrontdoorFirewallPolicy represents a policy for Web Application Firewall (WAF) with Azure Front Door.

More resource information here: https://docs.microsoft.com/en-us/azure/web-application-firewall/afds/waf-front-door-drs Pricing information here: https://azure.microsoft.com/en-us/pricing/details/frontdoor/#overview

func (*FrontdoorFirewallPolicy) BuildResource

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

BuildResource builds a schema.Resource from a valid FrontdoorFirewallPolicy. This method is called after the resource is initialised by an IaC provider.

func (*FrontdoorFirewallPolicy) PopulateUsage

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

PopulateUsage parses the u schema.UsageData into the FrontdoorFirewallPolicy.

type SQLDatabase added in v0.9.16

type SQLDatabase struct {
	Address          string
	Region           string
	SKU              string
	LicenceType      string
	Tier             string
	Family           string
	Cores            *int64
	MaxSizeGB        *float64
	ReadReplicaCount *int64
	ZoneRedundant    bool

	// ExtraDataStorageGB represents a usage cost of additional backup storage used by the sql database.
	ExtraDataStorageGB *int64 `infracost_usage:"extra_data_storage_gb"`
	// MonthlyVCoreHours represents a usage param that allows users to define how many hours of usage a serverless sql database instance uses.
	MonthlyVCoreHours *int64 `infracost_usage:"monthly_vcore_hours"`
	// LongTermRetentionStorageGB defines a usage param that allows users to define how many gb of cold storage the database uses.
	// This is storage that can be kept for up to 10 years.
	LongTermRetentionStorageGB *int64 `infracost_usage:"long_term_retention_storage_gb"`
}

SQLDatabase represents an azure sql database instance.

More resource information here: https://azure.microsoft.com/en-gb/products/azure-sql/database/ Pricing information here: https://azure.microsoft.com/en-gb/pricing/details/azure-sql-database/single/

func (*SQLDatabase) BuildResource added in v0.9.16

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

BuildResource builds a schema.Resource from a valid SQLDatabase. It returns a SQLDatabase as a *schema.Resource with cost components initialized.

SQLDatabase splits pricing into two different models. DTU & vCores.

Database Transaction Unit (DTU) is made a performance metric representing a mixture of performance metrics
in azure sql. Some include: CPU, I/O, Memory. DTU is used as Azure tries to simplify billing by using a single metric.

Virtual Core (vCore) pricing is designed to translate from on premise hardware metrics (cores) into the cloud
sql instance. vCore is designed to allow users to better estimate their resource limits, e.g. RAM.

SQL databases that follow a DTU pricing model have the following costs associated with them:

  1. Costs based on the number of DTUs that the sql database has
  2. Extra backup data costs - this is configured using SQLDatabase.ExtraDataStorageGB
  3. Long term data backup costs - this is configured using SQLDatabase.LongTermRetentionStorageGB

SQL databases that follow a vCore pricing model have the following costs associated with them:

  1. Costs based on the number of vCores the resource has
  2. Extra pricing if any database read replicas have been provisioned
  3. Additional charge for sql server licencing based on vCores amount
  4. Charges for storage used
  5. Charges for long term data backup - this is configured using SQLDatabase.LongTermRetentionStorageGB

This method is called after the resource is initialized by an IaC provider. SQLDatabase is used by both mssql_database and sql_database terraform resources to build a sql database costing.

func (*SQLDatabase) PopulateUsage added in v0.9.16

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

PopulateUsage parses the u schema.UsageData into the SQLDatabase.

type StorageAccount

type StorageAccount struct {
	Address string
	Region  string

	AccessTier             string
	AccountKind            string
	AccountReplicationType string
	AccountTier            string
	NFSv3                  bool

	// "usage" args
	MonthlyStorageGB                        *float64 `infracost_usage:"storage_gb"`
	MonthlyIterativeReadOperations          *int64   `infracost_usage:"monthly_iterative_read_operations"`
	MonthlyReadOperations                   *int64   `infracost_usage:"monthly_read_operations"`
	MonthlyIterativeWriteOperations         *int64   `infracost_usage:"monthly_iterative_write_operations"`
	MonthlyWriteOperations                  *int64   `infracost_usage:"monthly_write_operations"`
	MonthlyListAndCreateContainerOperations *int64   `infracost_usage:"monthly_list_and_create_container_operations"`
	MonthlyOtherOperations                  *int64   `infracost_usage:"monthly_other_operations"`
	MonthlyDataRetrievalGB                  *float64 `infracost_usage:"monthly_data_retrieval_gb"`
	MonthlyDataWriteGB                      *float64 `infracost_usage:"monthly_data_write_gb"`
	BlobIndexTags                           *int64   `infracost_usage:"blob_index_tags"`
	DataAtRestStorageGB                     *float64 `infracost_usage:"data_at_rest_storage_gb"`
	SnapshotsStorageGB                      *float64 `infracost_usage:"snapshots_storage_gb"`
	MetadataAtRestStorageGB                 *float64 `infracost_usage:"metadata_at_rest_storage_gb"`
	EarlyDeletionGB                         *float64 `infracost_usage:"early_deletion_gb"`
}

StorageAccount represents Azure data storage services.

More resource information here:

Block Blob Storage: https://azure.microsoft.com/en-us/services/storage/blobs/
File Storage: https://azure.microsoft.com/en-us/services/storage/files/

Pricing information here:

Block Blob Storage: https://azure.microsoft.com/en-us/pricing/details/storage/blobs/
File Storage: https://azure.microsoft.com/en-us/pricing/details/storage/files/

func (*StorageAccount) BuildResource

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

BuildResource builds a schema.Resource from valid StorageAccount data. This method is called after the resource is initialised by an IaC provider.

func (*StorageAccount) PopulateUsage

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

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

type VPNGateway added in v0.9.15

type VPNGateway struct {
	// Address is the unique name of the resource in the IAC language.
	Address string
	// Region is the azure region the VPNGateway is provisioned within.
	Region string
	// ScaleUnits represents a unit defined to pick an aggregate throughput of a gateway in Virtual hub.
	// 1 scale unit of VPN = 500 Mbps.
	ScaleUnits int64
	// Type represents the type of WAN Vpn Gateway, it can be one of: P2S|S2S.
	Type string

	// MonthlyP2SConnectionHrs represents a usage cost for the number of connection hours that the vpn
	// gateway has been in use for. Can be a fraction to denote smaller time increments lower than a whole hour.
	// This usage cost is only applicable for point to site vpns.
	MonthlyP2SConnectionHrs *float64 `infracost_usage:"monthly_p2s_connections_hrs"`
}

VPNGateway represents a Virtual WAN VPN gateway. It can represent a Point-to-site gateway (P2S) or a Site-to-site (S2S) gateway. Both gateways have similar price components on azure: Scale Unit & Connection Unit. However, S2S gateway connection costs are found through VPNGatewayConnection resource. Whereas P2S defines a usage param which is parsed below.

More resource information here: https://docs.microsoft.com/en-us/azure/virtual-wan/virtual-wan-about Pricing information here: https://azure.microsoft.com/en-us/pricing/details/virtual-wan/

func (*VPNGateway) BuildResource added in v0.9.15

func (v *VPNGateway) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid VPNGateway. It returns different Resources based on the VPNGateway.Type. If type Point to Site (P2S) it will include a usage cost component based on the connection usage. For other cases (S2S) it will just include a single scale unit cost component. See VPNGatewayConnection for S2S connection costs associated with S2S gateway.

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

func (*VPNGateway) PopulateUsage added in v0.9.15

func (v *VPNGateway) PopulateUsage(u *schema.UsageData)

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

type VPNGatewayConnection added in v0.9.15

type VPNGatewayConnection struct {
	// Address is the unique name of the resource in the IAC language.
	Address string
	// Region is the azure region the VPNGatewayConnection is provisioned within.
	Region string
}

VPNGatewayConnection represents a VPN Gateway connection, which is a billable component of a S2S VPN gateway. See VPNGateway for more information.

More resource information here: https://docs.microsoft.com/en-us/azure/virtual-wan/virtual-wan-about Pricing information here: https://azure.microsoft.com/en-us/pricing/details/virtual-wan/

func (*VPNGatewayConnection) BuildResource added in v0.9.15

func (v *VPNGatewayConnection) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid VPNGatewayConnection. It returns a VPNGatewayConnection as a schema.Resource with a single cost component representing the connection unit. The hourly quantity is set to 1 as VPNGatewayConnection represents a single connection unit.

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

func (*VPNGatewayConnection) PopulateUsage added in v0.9.15

func (v *VPNGatewayConnection) PopulateUsage(u *schema.UsageData)

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

type VirtualHub added in v0.9.15

type VirtualHub struct {
	// Address is the unique name of the resource in the IAC language.
	Address string
	// Region is the azure region the VirtualHub is provisioned within.
	Region string
	// SKU is the VirtualHub hub type. It can be one of: Basic|Standard.
	SKU string

	// MonthlyDataProcessedGB represents a usage cost for the amount of gb of data that is processed
	// through the hub on a monthly basis. It is a float to allow users to specify values whole GBs.
	MonthlyDataProcessedGB *float64 `infracost_usage:"monthly_data_processed_gb"`
}

VirtualHub is the central hub in the "hub and spoke architecture" of Azure Virtual WAN. It enables transitive connectivity between endpoints that may be distributed across different types of 'spokes'.

More resource information here: https://docs.microsoft.com/en-us/azure/virtual-wan/virtual-wan-about Pricing information here: https://azure.microsoft.com/en-us/pricing/details/virtual-wan/

func (*VirtualHub) BuildResource added in v0.9.15

func (v *VirtualHub) BuildResource() *schema.Resource

BuildResource builds a schema.Resource from a valid VirtualHub. It returns VirtualHub as a *schema.Resource with 2 cost components provided. These cost components are only applicable if the VirtualHub is type Standard. The Basic hub is provided free by azure. See here: https://azure.microsoft.com/en-us/pricing/details/virtual-wan/ for more information.

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

func (*VirtualHub) PopulateUsage added in v0.9.15

func (v *VirtualHub) PopulateUsage(u *schema.UsageData)

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

Jump to

Keyboard shortcuts

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