func (e Executor) Deploy(input DeployInput) (DeployOutput, error) { manifest, manifestProperties, err := e.manifestBuilder.Build(manifests.ManifestProperties{ DirectorUsername: input.DirectorUsername, DirectorPassword: input.DirectorPassword, SubnetID: input.InfrastructureConfiguration.SubnetID, AvailabilityZone: input.InfrastructureConfiguration.AvailabilityZone, ElasticIP: input.InfrastructureConfiguration.ElasticIP, AccessKeyID: input.InfrastructureConfiguration.AccessKeyID, SecretAccessKey: input.InfrastructureConfiguration.SecretAccessKey, SecurityGroup: input.InfrastructureConfiguration.SecurityGroup, Region: input.InfrastructureConfiguration.AWSRegion, DefaultKeyName: input.EC2KeyPair.Name, SSLKeyPair: input.SSLKeyPair, Credentials: manifests.NewInternalCredentials(input.Credentials), }) if err != nil { return DeployOutput{}, err } yaml, err := candiedyaml.Marshal(manifest) if err != nil { return DeployOutput{}, err } e.logger.Step("deploying bosh director") state, err := e.deployCommand.Execute(yaml, input.EC2KeyPair.PrivateKey, input.State) if err != nil { return DeployOutput{}, err } return DeployOutput{ BOSHInitState: state, DirectorSSLKeyPair: manifestProperties.SSLKeyPair, Credentials: manifestProperties.Credentials.ToMap(), BOSHInitManifest: string(yaml), }, nil }
"blobstoreDirectorUsername": "******", "blobstoreAgentUsername": "******", "hmUsername": "******", "mbusPassword": "******", "natsPassword": "******", "postgresPassword": "******", "registryPassword": "******", "blobstoreDirectorPassword": "******", "blobstoreAgentPassword": "******", "hmPassword": "******", } }) Describe("NewInternalCredentials", func() { It("creates a new InternalCredentials from a map[string]string", func() { outputCredentials := manifests.NewInternalCredentials(inputCredentials) Expect(outputCredentials).To(Equal(manifests.InternalCredentials{ MBusUsername: "******", NatsUsername: "******", PostgresUsername: "******", RegistryUsername: "******", BlobstoreDirectorUsername: "******", BlobstoreAgentUsername: "******", HMUsername: "******", MBusPassword: "******", NatsPassword: "******", PostgresPassword: "******", RegistryPassword: "******", BlobstoreDirectorPassword: "******", BlobstoreAgentPassword: "******",