config

package
v0.3.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CLIReconciledExternalNameConfigs = map[string]config.ExternalName{}
View Source
var ExternalNameConfigs = map[string]config.ExternalName{

	"aws_vpc_peering_connection": config.IdentifierFromProvider,
	"aws_security_group_rule":    config.IdentifierFromProvider,
	"aws_route":                  route(),

	"aws_security_group": config.IdentifierFromProvider,

	"aws_iam_role":              config.NameAsIdentifier,
	"aws_secretsmanager_secret": config.IdentifierFromProvider,

	"aws_vpc": config.IdentifierFromProvider,

	"aws_vpc_endpoint": config.IdentifierFromProvider,

	"aws_subnet": config.IdentifierFromProvider,

	"aws_docdb_cluster": config.ParameterAsIdentifier("cluster_identifier"),

	"aws_docdb_global_cluster": config.IdentifierFromProvider,

	"aws_docdb_cluster_instance": config.ParameterAsIdentifier("identifier"),

	"aws_docdb_subnet_group": config.NameAsIdentifier,

	"aws_docdb_cluster_parameter_group": config.NameAsIdentifier,

	"aws_docdb_cluster_snapshot": config.ParameterAsIdentifier("db_cluster_snapshot_identifier"),

	"aws_docdb_event_subscription": config.NameAsIdentifier,

	"aws_dynamodb_table": config.NameAsIdentifier,

	"aws_dynamodb_table_replica": config.IdentifierFromProvider,

	"aws_dynamodb_global_table": config.NameAsIdentifier,

	"aws_dynamodb_tag": config.TemplatedStringAsIdentifier("", "{{ .parameters.resource_arn }},{{ .parameters.key }}"),

	"aws_dynamodb_table_item": config.IdentifierFromProvider,

	"aws_dynamodb_contributor_insights": config.IdentifierFromProvider,

	"aws_dynamodb_kinesis_streaming_destination": config.IdentifierFromProvider,

	"aws_elasticache_parameter_group":   config.IdentifierFromProvider,
	"aws_elasticache_subnet_group":      config.NameAsIdentifier,
	"aws_elasticache_cluster":           config.ParameterAsIdentifier("cluster_id"),
	"aws_elasticache_replication_group": config.ParameterAsIdentifier("replication_group_id"),
	"aws_elasticache_user":              config.ParameterAsIdentifier("user_id"),
	"aws_elasticache_user_group":        config.ParameterAsIdentifier("user_group_id"),

	"aws_elasticsearch_domain": config.TemplatedStringAsIdentifier("domain_name", "arn:aws:es:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:domain/{{ .external_name }}"),

	"aws_elasticsearch_domain_policy": config.IdentifierFromProvider,

	"aws_elasticsearch_domain_saml_options": config.ParameterAsIdentifier("domain_name"),

	"aws_msk_configuration": config.IdentifierFromProvider,

	"aws_msk_cluster": config.IdentifierFromProvider,

	"aws_memorydb_parameter_group": config.NameAsIdentifier,

	"aws_memorydb_subnet_group": config.NameAsIdentifier,

	"aws_memorydb_cluster": config.NameAsIdentifier,

	"aws_memorydb_acl": config.NameAsIdentifier,

	"aws_memorydb_snapshot": config.NameAsIdentifier,

	"aws_rds_cluster":        config.ParameterAsIdentifier("cluster_identifier"),
	"aws_db_instance":        config.ParameterAsIdentifier("identifier"),
	"aws_db_parameter_group": config.NameAsIdentifier,
	"aws_db_subnet_group":    config.NameAsIdentifier,

	"aws_db_instance_role_association": config.IdentifierFromProvider,

	"aws_db_option_group": config.NameAsIdentifier,

	"aws_db_proxy": config.NameAsIdentifier,

	"aws_db_proxy_default_target_group": config.IdentifierFromProvider,

	"aws_db_proxy_endpoint": config.TemplatedStringAsIdentifier("db_proxy_endpoint_name", "{{ .external_name }}/{{ .parameters.db_proxy_name }}"),

	"aws_db_proxy_target": config.IdentifierFromProvider,

	"aws_db_snapshot": config.ParameterAsIdentifier("db_snapshot_identifier"),

	"aws_rds_cluster_activity_stream": config.IdentifierFromProvider,

	"aws_rds_cluster_endpoint": config.ParameterAsIdentifier("cluster_endpoint_identifier"),

	"aws_rds_cluster_instance": config.ParameterAsIdentifier("identifier"),

	"aws_rds_cluster_parameter_group": config.NameAsIdentifier,

	"aws_rds_cluster_role_association": FormattedIdentifierFromProvider(",", "db_cluster_identifier", "role_arn"),

	"aws_rds_global_cluster": config.ParameterAsIdentifier("global_cluster_identifier"),

	"aws_db_cluster_snapshot": config.IdentifierFromProvider,

	"aws_db_event_subscription": config.NameAsIdentifier,

	"aws_db_instance_automated_backups_replication": config.IdentifierFromProvider,

	"aws_db_snapshot_copy": config.IdentifierFromProvider,

	"aws_kms_key": config.IdentifierFromProvider,

	"aws_kinesis_stream": config.TemplatedStringAsIdentifier("name", " arn:aws:kinesis:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:stream/{{ .external_name }}"),

	"aws_sns_topic": config.TemplatedStringAsIdentifier("name", "arn:aws:sns:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:{{ .external_name }}"),
}

ExternalNameConfigs contains all external name configurations for this provider.

Functions

func CLIReconciledResourceList added in v0.0.2

func CLIReconciledResourceList() []string

CLIReconciledResourceList returns the list of resources that have external name configured in ExternalNameConfigs table and to be reconciled under the TF CLI based architecture.

func ExternalNameConfigurations

func ExternalNameConfigurations() config.ResourceOption

ExternalNameConfigurations applies all external name configs listed in the table ExternalNameConfigs and sets the version of those resources to v1alpha1 assuming they will be tested.

func FormattedIdentifierFromProvider

func FormattedIdentifierFromProvider(separator string, keys ...string) config.ExternalName

FormattedIdentifierFromProvider is a helper function to construct Terraform IDs that use elements from the parameters in a certain string format. It should be used in cases where all information in the ID is gathered from the spec and not user defined like name. For example, zone_id:vpc_id.

func GetProvider

func GetProvider(ctx context.Context, generationProvider bool) (*ujconfig.Provider, error)

GetProvider returns provider configuration

func KnownReferencers added in v0.0.2

func KnownReferencers() config.ResourceOption

KnownReferencers adds referencers for fields that are known and common among more than a few resources.

func NoForkResourceList added in v0.0.2

func NoForkResourceList() []string

NoForkResourceList returns the list of resources that have external name configured in ExternalNameConfigs table and to be reconciled under the no-fork architecture.

func RegionAddition

func RegionAddition() config.ResourceOption

RegionAddition adds region to the spec of all resources except iam group which does not have a region notion.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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