Add scaffolding for external host plugins and convert aws/azure over (#1581)
This commit is contained in:
1 parent
f6efde041d
commit
1c8e0ed1e1
30 files changed
+2860
-294
No files matched your search
@@ -79,6 +79,7 @@ type Command struct {
|
||||
flagEveryEventAllowFilters []string
|
||||
flagEveryEventDenyFilters []string
|
||||
flagCreateLoopbackHostCatalogPlugin bool
|
||||
flagPluginExecutionDir string
|
||||
}
|
||||
|
||||
func (c *Command) Synopsis() string {
|
||||
@@ -310,6 +311,13 @@ func (c *Command) Flags() *base.FlagSets {
|
||||
Usage: `The optional every event deny filter. May be specified multiple times.`,
|
||||
})
|
||||
|
||||
f.StringVar(&base.StringVar{
|
||||
Name: "plugin-execution-dir",
|
||||
Target: &c.flagPluginExecutionDir,
|
||||
EnvVar: "BOUNDARY_DEV_PLUGIN_EXECUTION_DIR",
|
||||
Usage: "Specifies where Boundary should write plugins that it is executing; if not set defaults to system temp directory.",
|
||||
})
|
||||
|
||||
f.BoolVar(&base.BoolVar{
|
||||
Name: "create-loopback-hostcatalog-plugin",
|
||||
Target: &c.flagCreateLoopbackHostCatalogPlugin,
|
||||
@@ -351,6 +359,7 @@ func (c *Command) Run(args []string) int {
|
||||
c.UI.Error(fmt.Errorf("Error creating controller dev config: %w", err).Error())
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
if c.flagWorkerAuthKey != "" {
|
||||
c.Config.DevWorkerAuthKey = c.flagWorkerAuthKey
|
||||
for _, kms := range c.Config.Seals {
|
||||
@@ -359,6 +368,13 @@ func (c *Command) Run(args []string) int {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
c.DevLoginName = c.flagLoginName
|
||||
c.DevPassword = c.flagPassword
|
||||
c.DevUnprivilegedLoginName = c.flagUnprivilegedLoginName
|
||||
c.DevUnprivilegedPassword = c.flagUnprivilegedPassword
|
||||
c.DevTargetDefaultPort = c.flagTargetDefaultPort
|
||||
c.Config.Plugins.ExecutionDir = c.flagPluginExecutionDir
|
||||
if c.flagIdSuffix != "" {
|
||||
if len(c.flagIdSuffix) != 10 {
|
||||
c.UI.Error("Invalid ID suffix, must be exactly 10 characters")
|
||||
@@ -383,19 +399,7 @@ func (c *Command) Run(args []string) int {
|
||||
c.DevHostId = fmt.Sprintf("%s_%s", static.HostPrefix, c.flagIdSuffix)
|
||||
c.DevTargetId = fmt.Sprintf("%s_%s", target.TcpTargetPrefix, c.flagIdSuffix)
|
||||
}
|
||||
if c.flagLoginName != "" {
|
||||
c.DevLoginName = c.flagLoginName
|
||||
}
|
||||
if c.flagPassword != "" {
|
||||
c.DevPassword = c.flagPassword
|
||||
}
|
||||
if c.flagUnprivilegedLoginName != "" {
|
||||
c.DevUnprivilegedLoginName = c.flagUnprivilegedLoginName
|
||||
}
|
||||
if c.flagUnprivilegedPassword != "" {
|
||||
c.DevUnprivilegedPassword = c.flagUnprivilegedPassword
|
||||
}
|
||||
c.DevTargetDefaultPort = c.flagTargetDefaultPort
|
||||
|
||||
host, port, err := net.SplitHostPort(c.flagHostAddress)
|
||||
if err != nil {
|
||||
if !strings.Contains(err.Error(), "missing port") {
|
||||
|
||||
Reference in new issue
Block a user