Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check parameters from cmd before passing to the provider #165

Merged
merged 3 commits into from
Nov 22, 2023
Merged
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
4 changes: 3 additions & 1 deletion cmd/cmd/create/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ func getAWSProviderCmd() *cobra.Command {
// Provider dependent params
providerParams := make(map[string]string)
for name := range manager.CreateParams() {
providerParams[name] = viper.GetString(name)
if viper.IsSet(name) {
providerParams[name] = viper.GetString(name)
}
}
if err := manager.Create(
viper.GetString(constants.ProjectName),
Expand Down
2 changes: 1 addition & 1 deletion oci/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN make build \
&& curl -LO ${PULUMI_URL} \
&& tar -xzvf pulumi-${PULUMI_VERSION}-linux-x64.tar.gz

FROM quay.io/centos/centos:stream9@sha256:c68569fe2075fb6372012174a7350a2bc0e90ce41a028963afc3193820061590
FROM quay.io/centos/centos:stream9@sha256:8845d412fc1bfcd06a0f8615dcd53acf8f8895af653e40fd95625be6b24c370b

LABEL MAINTAINER "CRC <[email protected]>"

Expand Down
21 changes: 12 additions & 9 deletions pkg/bundle/setup/clustersetup.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ func SwapKeys(ctx *pulumi.Context, publicIP *pulumi.StringOutput,
}

c := remote.ConnectionArgs{
Host: publicIP,
PrivateKey: pulumi.String(privateKey),
User: pulumi.String(bundle.ImageUsername),
Port: pulumi.Float64(bundle.ImageSSHPort),
Host: publicIP,
PrivateKey: pulumi.String(privateKey),
User: pulumi.String(bundle.ImageUsername),
Port: pulumi.Float64(bundle.ImageSSHPort),
DialErrorLimit: pulumi.Int(-1),
PerDialTimeout: pulumi.Int(0),
}

pubKeyFilename := newPublicKey.ApplyT(util.WriteTempFile).(pulumi.StringOutput)
Expand Down Expand Up @@ -79,11 +81,12 @@ func Setup(ctx *pulumi.Context,
pullSecretEncoded := base64.StdEncoding.EncodeToString([]byte(pullsecret))

c := remote.ConnectionArgs{
Host: publicIP,
PrivateKey: privateKey,
User: pulumi.String(bundle.ImageUsername),
Port: pulumi.Float64(bundle.ImageSSHPort),
}
Host: publicIP,
PrivateKey: privateKey,
User: pulumi.String(bundle.ImageUsername),
Port: pulumi.Float64(bundle.ImageSSHPort),
DialErrorLimit: pulumi.Int(-1),
PerDialTimeout: pulumi.Int(0)}

clusterSetupfileName, err := util.WriteTempFile(string(script))
if err != nil {
Expand Down