tag

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package tag defines one of the ways of filtering, it's an abstraction of Key/Value wich each specific Terraform Provider implements differently, by just having different names (tags, labels, metadata).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNameFromTag

func GetNameFromTag(key string, srd *schema.ResourceData, fallback string) string

GetNameFromTag returns the 'tags.Name' from the src or the fallback if it's not defined. Also validates that the 'tags.Name' and fallback are valid, if not it generates a random one

func GetOtherTags added in v0.7.3

func GetOtherTags(provider string, srd *schema.ResourceData, filterTag Tag) (string, bool)

GetOtherTags used to check other possible tag attributes on resources

Types

type Tag

type Tag struct {
	Name  string
	Value string
}

Tag it's an easy representation of a ec2.Filter for tags

func New added in v0.6.4

func New(t string) (Tag, error)

New initializes a tag with the format NAME:VALUE that we use

func (Tag) ToEC2Filter

func (t Tag) ToEC2Filter() *ec2.Filter

ToEC2Filter transforms the Tag to a ec2.Filter to use on AWS filters

func (Tag) ToNeptuneFilter added in v0.7.1

func (t Tag) ToNeptuneFilter() *neptune.Filter

ToNeptuneFilter transforms the Tag to a Neptune.Filter to use on AWS filters

func (Tag) ToRDSFilter added in v0.7.1

func (t Tag) ToRDSFilter() *rds.Filter

ToRDSFilter transforms the Tag to a rds.Filter to use on AWS filters

Jump to

Keyboard shortcuts

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