modules

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Cluster Link module variables
	VarConfluentCloudClusterAPIKey    = "confluent_cloud_cluster_api_key"
	VarConfluentCloudClusterAPISecret = "confluent_cloud_cluster_api_secret"
	VarMSKClusterID                   = "msk_cluster_id"
	VarTargetClusterID                = "target_cluster_id"
	VarTargetClusterRestEndpoint      = "target_cluster_rest_endpoint"
	VarClusterLinkName                = "cluster_link_name"
	VarMSKSaslScramBootstrapServers   = "msk_sasl_scram_bootstrap_servers"
	VarMSKSaslScramUsername           = "msk_sasl_scram_username"
	VarMSKSaslScramPassword           = "msk_sasl_scram_password"

	// Jump Cluster Setup Host module variables
	VarJumpClusterSetupHostSubnetID   = "jump_cluster_setup_host_subnet_id"
	VarJumpClusterSecurityGroupIDs    = "jump_cluster_security_group_ids"
	VarJumpClusterSSHKeyPairName      = "jump_cluster_ssh_key_pair_name"
	VarJumpClusterInstancesPrivateDNS = "jump_cluster_instances_private_dns"
	VarPrivateKey                     = "private_key"

	// Jump Cluster module variables
	VarJumpClusterBrokerSubnetIDs             = "jump_cluster_broker_subnet_ids"
	VarJumpClusterInstanceType                = "jump_cluster_instance_type"
	VarJumpClusterBrokerStorage               = "jump_cluster_broker_storage"
	VarConfluentCloudClusterID                = "confluent_cloud_cluster_id"
	VarConfluentCloudClusterBootstrapEndpoint = "confluent_cloud_cluster_bootstrap_endpoint"
	VarConfluentCloudClusterRestEndpoint      = "confluent_cloud_cluster_rest_endpoint"
	VarMSKClusterBootstrapBrokers             = "msk_cluster_bootstrap_brokers"
	VarJumpClusterIAMAuthRoleName             = "jump_cluster_iam_auth_role_name"

	// Networking module variables
	VarVpcID                          = "vpc_id"
	VarJumpClusterBrokerSubnetCidrs   = "jump_cluster_broker_subnet_cidrs"
	VarJumpClusterSetupHostSubnetCidr = "jump_cluster_setup_host_subnet_cidr"
	VarExistingPrivateLinkVpceID      = "existing_private_link_vpce_id"

	// Confluent Cloud module variables
	VarEnvironmentName = "environment_name"
	VarEnvironmentID   = "environment_id"
	VarClusterName     = "cluster_name"
	VarAWSRegion       = "aws_region"

	// Private Link Target Cluster module variables
	VarSubnetCidrRanges                  = "subnet_cidr_ranges"
	VarNetworkID                         = "network_id"
	VarNetworkDNSDomain                  = "network_dns_domain"
	VarNetworkPrivateLinkEndpointService = "network_private_link_endpoint_service"
	VarNetworkZones                      = "network_zones"

	// External Outbound Cluster Link module variables
	VarSubnetID                   = "subnet_id"
	VarSecurityGroupID            = "security_group_id"
	VarMSKClusterBootstrapServers = "msk_cluster_bootstrap_servers"
)

Variable name constants — compile-time safe replacements for GetModuleVariableName(). Organized by module to maintain clarity about which module each variable belongs to.

Variables

View Source
var (
	SchemaConfluentCloudAPIKey = VariableSchema{
		Name: "confluent_cloud_api_key", Type: "string",
		Description: "Confluent Cloud API Key", Sensitive: false,
	}
	SchemaConfluentCloudAPISecret = VariableSchema{
		Name: "confluent_cloud_api_secret", Type: "string",
		Description: "Confluent Cloud API Secret", Sensitive: true,
	}
	SchemaAWSRegion = VariableSchema{
		Name: "aws_region", Type: "string",
		Description: "The AWS region", Sensitive: false,
	}
)

Provider variables

View Source
var (
	SchemaConfluentCloudClusterAPIKey = VariableSchema{
		Name: "confluent_cloud_cluster_api_key", Type: "string",
		Description: "Confluent Cloud cluster API key", Sensitive: false,
	}
	SchemaConfluentCloudClusterAPISecret = VariableSchema{
		Name: "confluent_cloud_cluster_api_secret", Type: "string",
		Description: "Confluent Cloud cluster API secret", Sensitive: true,
	}
)

Cluster credential variables

View Source
var (
	SchemaMSKSaslScramUsername = VariableSchema{
		Name: "msk_sasl_scram_username", Type: "string",
		Description: "MSK SASL SCRAM Username", Sensitive: false,
	}
	SchemaMSKSaslScramPassword = VariableSchema{
		Name: "msk_sasl_scram_password", Type: "string",
		Description: "MSK SASL SCRAM Password", Sensitive: true,
	}
)

MSK authentication variables

View Source
var (
	SchemaTargetClusterRestEndpoint = VariableSchema{
		Name: "target_cluster_rest_endpoint", Type: "string",
		Description: "The REST endpoint of the target Confluent Cloud cluster that data will be migrated to.", Sensitive: false,
	}
	SchemaTargetClusterID = VariableSchema{
		Name: "target_cluster_id", Type: "string",
		Description: "The ID of the target Confluent Cloud cluster that data will be migrated to.", Sensitive: false,
	}
	SchemaClusterLinkName = VariableSchema{
		Name: "cluster_link_name", Type: "string",
		Description: "The name of the cluster link that will be created between the source and target Confluent Cloud clusters.", Sensitive: false,
	}
	SchemaMSKClusterID = VariableSchema{
		Name: "msk_cluster_id", Type: "string",
		Description: "The ID of the source MSK cluster that data will be migrated from.", Sensitive: false,
	}
)

Cluster link variables

View Source
var (
	SchemaJumpClusterSecurityGroupIDs = VariableSchema{
		Name: "jump_cluster_security_group_ids", Type: "string",
		Description: "IDs of the security groups for the jump cluster (including setup host) instances.", Sensitive: false,
	}
	SchemaJumpClusterSSHKeyPairName = VariableSchema{
		Name: "jump_cluster_ssh_key_pair_name", Type: "string",
		Description: "Name of the AWS key pair for SSH access to the jump cluster (including setup host) instances.", Sensitive: false,
	}
)

Jump cluster variables

View Source
var JumpClusterModuleOutputs = []types.TerraformOutput{
	{
		Name:        "jump_cluster_instances_private_dns",
		Description: "Private DNS addresses of the jump cluster instances.",
		Sensitive:   false,
		Value:       "values(aws_instance.jump_cluster)[*].private_dns",
	},
}
View Source
var NetworkingModuleOutputs = []types.TerraformOutput{
	{
		Name:        "jump_cluster_setup_host_subnet_id",
		Description: "ID of the subnet that the Ansible jump cluster setup host instance is deployed to.",
		Sensitive:   false,
		Value:       "aws_subnet.jump_cluster_setup_host_subnet.id",
	},
	{
		Name:        "jump_cluster_broker_subnet_ids",
		Description: "IDs of the subnets that the jump cluster broker instances are deployed to.",
		Sensitive:   false,
		Value:       "aws_subnet.jump_cluster_broker_subnets[*].id",
	},
	{
		Name:        "jump_cluster_ssh_key_pair_name",
		Description: "Name of the AWS key pair for the jump cluster (including setup host) instances.",
		Sensitive:   false,
		Value:       "aws_key_pair.jump_cluster_ssh_key.key_name",
	},
	{
		Name:        "private_key",
		Description: "Private SSH key for accessing the jump cluster (including setup host) instances.",
		Sensitive:   true,
		Value:       "tls_private_key.jump_cluster_ssh_key.private_key_pem",
	},
	{
		Name:        "jump_cluster_security_group_ids",
		Description: "IDs of the security groups for the jump cluster (including setup host) instances.",
		Sensitive:   false,
		Value:       "aws_security_group.security_group.id",
	},
}
View Source
var (
	SchemaMSKSaslScramBootstrapServers = VariableSchema{
		Name: "msk_sasl_scram_bootstrap_servers", Type: "string",
		Description: "The SASL/SCRAM bootstrap servers of the source MSK cluster that data will be migrated from.", Sensitive: false,
	}
)

MSK bootstrap variables

View Source
var (
	SchemaVpcID = VariableSchema{
		Name: "vpc_id", Type: "string",
		Description: "ID of the VPC", Sensitive: false,
	}
)

Network variables

Functions

func ExtractModuleVariableDefinitions added in v0.7.2

func ExtractModuleVariableDefinitions[R any](allVars []ModuleVariable[R], request R) []types.TerraformVariable

ExtractModuleVariableDefinitions extracts variable definitions for a module. Unlike extractVariableDefinitions (which is for root-level), this includes ALL variables regardless of ValueExtractor or FromModuleOutput — a module needs all its declared variables.

func GetClusterLinkModuleVariableDefinitions

func GetClusterLinkModuleVariableDefinitions(request types.MigrationWizardRequest) []types.TerraformVariable

func GetConfluentCloudVariableDefinitions

func GetConfluentCloudVariableDefinitions(request types.TargetClusterWizardRequest) []types.TerraformVariable

func GetExternalOutboundClusterLinkingModuleVariableDefinitions

func GetExternalOutboundClusterLinkingModuleVariableDefinitions(request types.MigrationWizardRequest) []types.TerraformVariable

func GetJumpClusterModuleOutputDefinitions

func GetJumpClusterModuleOutputDefinitions() []types.TerraformOutput

func GetJumpClusterModuleVariableDefinitions

func GetJumpClusterModuleVariableDefinitions(request types.MigrationWizardRequest) []types.TerraformVariable

func GetJumpClusterSetupHostVariableDefinitions

func GetJumpClusterSetupHostVariableDefinitions(request types.MigrationWizardRequest) []types.TerraformVariable

func GetMigrationInfraRootVariableDefinitions

func GetMigrationInfraRootVariableDefinitions(request types.MigrationWizardRequest) []types.TerraformVariable

func GetMigrationInfraRootVariableValues

func GetMigrationInfraRootVariableValues(request types.MigrationWizardRequest) map[string]any

func GetNetworkingModuleOutputDefinitions

func GetNetworkingModuleOutputDefinitions() []types.TerraformOutput

func GetNetworkingModuleVariableDefinitions

func GetNetworkingModuleVariableDefinitions(request types.MigrationWizardRequest) []types.TerraformVariable

func GetPrivateLinkModuleOutputDefinitions added in v0.6.7

func GetPrivateLinkModuleOutputDefinitions(vpcEndpointResourceName string) []types.TerraformOutput

func GetTargetClusterModuleVariableDefinitions

func GetTargetClusterModuleVariableDefinitions(request types.TargetClusterWizardRequest) []types.TerraformVariable

func GetTargetClusterModuleVariableValues

func GetTargetClusterModuleVariableValues(request types.TargetClusterWizardRequest) map[string]any

func GetTargetClusterPrivateLinkModuleVariableDefinitions

func GetTargetClusterPrivateLinkModuleVariableDefinitions(request types.TargetClusterWizardRequest) []types.TerraformVariable

Types

type ConfluentCloudOutputParams added in v0.6.7

type ConfluentCloudOutputParams struct {
	EnvironmentName    string
	NetworkName        string
	ClusterName        string
	ServiceAccountName string
	KafkaAPIKeyName    string
}

type ModuleVariable

type ModuleVariable[R any] struct {
	// Name is the module input attribute name (the key in the module block).
	// This may differ from Definition.Name (the root-level variable name).
	// WriteModuleInputs uses Name for the attribute key and Definition.Name for the var. reference.
	Name             string
	Definition       types.TerraformVariable
	ValueExtractor   func(request R) any  // Extracts the value from FE request payload. If nil, it's not a root-level variable.
	Condition        func(request R) bool // Determines if this variable should be included (nil = always include).
	FromModuleOutput string               // If non-empty, this variable comes from the named module's output.
}

ModuleVariable is a generic definition for module variables. R is the request type (e.g. TargetClusterWizardRequest or MigrationWizardRequest).

func GetClusterLinkVariables

func GetClusterLinkVariables() []ModuleVariable[types.MigrationWizardRequest]

func GetExternalOutboundClusterLinkingVariables

func GetExternalOutboundClusterLinkingVariables() []ModuleVariable[types.MigrationWizardRequest]

func GetJumpClusterSetupHostVariables

func GetJumpClusterSetupHostVariables() []ModuleVariable[types.MigrationWizardRequest]

func GetJumpClusterVariables

func GetJumpClusterVariables() []ModuleVariable[types.MigrationWizardRequest]

func GetMskPrivateClusterLinkVariables

func GetMskPrivateClusterLinkVariables() []ModuleVariable[types.MigrationWizardRequest]

func GetNetworkingVariables

func GetNetworkingVariables() []ModuleVariable[types.MigrationWizardRequest]

func GetPrivateMigrationProviderVariables

func GetPrivateMigrationProviderVariables() []ModuleVariable[types.MigrationWizardRequest]

func GetPublicMigrationProviderVariables

func GetPublicMigrationProviderVariables() []ModuleVariable[types.MigrationWizardRequest]

func GetTargetClusterPrivateLinkVariables

func GetTargetClusterPrivateLinkVariables() []ModuleVariable[types.TargetClusterWizardRequest]

func GetTargetClusterProviderVariables

func GetTargetClusterProviderVariables() []ModuleVariable[types.TargetClusterWizardRequest]

type VariableSchema added in v0.7.2

type VariableSchema struct {
	Name        string
	Type        string
	Description string
	Sensitive   bool
}

VariableSchema defines the metadata for a Terraform variable (name, type, description, sensitivity). Shared across modules to avoid duplicating variable definitions.

func (VariableSchema) ToDefinition added in v0.7.2

func (v VariableSchema) ToDefinition() types.TerraformVariable

ToDefinition converts a VariableSchema to a types.TerraformVariable.

Jump to

Keyboard shortcuts

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