Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/config/conf.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,20 @@ var (
field.WithRequired(false),
)

BaseURLField = field.StringField(
"base-url",
field.WithDescription("Override the Temporal Cloud API URL (for testing)"),
field.WithHidden(true),
field.WithExportTarget(field.ExportTargetCLIOnly),
)

// ConfigurationFields defines the external configuration required for the
// connector to run.
ConfigurationFields = []field.SchemaField{
APIKeyField,
AllowInsecureField,
DefaultAccountRoleField,
BaseURLField,
}

// FieldRelationships defines relationships between the fields listed in
Expand Down
3 changes: 3 additions & 0 deletions pkg/connector/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ func (d *Connector) Validate(ctx context.Context) (annotations.Annotations, erro
// New returns a new instance of the connector.
func New(ctx context.Context, tc *cfg.TemporalCloud, opts *cli.ConnectorOpts) (connectorbuilder.ConnectorBuilderV2, []connectorbuilder.Opt, error) {
var clientOpts []client.Opt
if tc.BaseUrl != "" {
clientOpts = append(clientOpts, client.WithAPIAddress(tc.BaseUrl))
}
if tc.AllowInsecure {
clientOpts = append(clientOpts, client.AllowInsecure())
}
Expand Down
Loading