generated from hashicorp/packer-plugin-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates the tests and examples from the the original JetBrains content to generalized example content. Signed-off-by: Ryan Johnson <[email protected]>
- Loading branch information
1 parent
623ba0a
commit 3b382d2
Showing
17 changed files
with
118 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package utils | ||
|
||
import ( | ||
"os" | ||
) | ||
|
||
const ( | ||
DefaultVcenterServer = "vcenter.example.com" | ||
DefaultVsphereUsername = "[email protected]" | ||
DefaultVspherePassword = "VMw@re1!" | ||
DefaultVsphereHost = "esxi-01.example.com" | ||
|
||
EnvVcenterServer = "VSPHERE_VCENTER_SERVER" | ||
EnvVsphereUsername = "VSPHERE_USERNAME" | ||
EnvVspherePassword = "VSPHERE_PASSWORD" | ||
EnvVsphereHost = "VSPHERE_HOST" | ||
) | ||
|
||
func GetenvOrDefault(key, defaultValue string) string { | ||
if value := os.Getenv(key); value != "" { | ||
return value | ||
} | ||
return defaultValue | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
"type": "vsphere-clone", | ||
|
||
"vcenter_server": "vcenter.example.com", | ||
"username": "root", | ||
"password": "jetbrains", | ||
"username": "[email protected]", | ||
"password": "VMw@re1!", | ||
"insecure_connection": "true", | ||
|
||
"template": "alpine", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,9 @@ source "vsphere-clone" "example_clone" { | |
communicator = "none" | ||
host = "esxi-01.example.com" | ||
insecure_connection = "true" | ||
password = "jetbrains" | ||
password = "VMw@re1!" | ||
template = "alpine" | ||
username = "root" | ||
username = "[email protected]" | ||
vcenter_server = "vcenter.example.com" | ||
vm_name = "alpine-clone-${local.timestamp}" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,16 +39,16 @@ | |
"network_card": "vmxnet3" | ||
} | ||
], | ||
"password": "jetbrains", | ||
"ssh_password": "jetbrains", | ||
"ssh_username": "root", | ||
"password": "VMw@re1!", | ||
"ssh_password": "VMw@re1!", | ||
"ssh_username": "packer", | ||
"storage": [ | ||
{ | ||
"disk_size": 1024, | ||
"disk_thin_provisioned": true | ||
} | ||
], | ||
"username": "root", | ||
"username": "[email protected]", | ||
"vcenter_server": "vcenter.example.com", | ||
"vm_name": "alpine-{{timestamp}}" | ||
} | ||
|
Oops, something went wrong.