Skip to content

Commit cfd3f71

Browse files
authored
Added support for source_snapshot on instance template (IBM-Cloud#6364)
* Added support for source_snapshot on instance template * updated the instance template data source to handle unmarshalling * Added source template to instance datasource
1 parent 1b70fd0 commit cfd3f71

File tree

5 files changed

+3691
-1351
lines changed

5 files changed

+3691
-1351
lines changed

ibm/acctest/acctest.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ var (
104104
InstanceName string
105105
InstanceProfileName string
106106
InstanceProfileNameUpdate string
107+
ISCatalogImageName string
108+
ISBootSnapshotID string
107109
IsBareMetalServerProfileName string
108110
IsBareMetalServerImage string
109111
IsBareMetalServerImage2 string
@@ -972,6 +974,18 @@ func init() {
972974
fmt.Println("[INFO] Set the environment variable SL_INSTANCE_PROFILE_UPDATE for testing ibm_is_instance resource else it is set to default value 'cx2-4x8'")
973975
}
974976

977+
ISCatalogImageName = os.Getenv("IS_CATALOG_IMAGE_NAME")
978+
if ISCatalogImageName == "" {
979+
ISCatalogImageName = "test-catalog"
980+
fmt.Println("[INFO] Set the environment variable IS_CATALOG_IMAGE_NAME for testing ibm_is_instance_template resource else it is set to default value 'test-catalog'")
981+
}
982+
983+
ISBootSnapshotID = os.Getenv("IS_BOOT_SNAPSHOT_ID")
984+
if ISBootSnapshotID == "" {
985+
ISBootSnapshotID = "r006-d7fejbe-2dhj-442df-b2iha-ccjbecbjbcejce"
986+
fmt.Println("[INFO] Set the environment variable IS_BOOT_SNAPSHOT_ID for testing ibm_is_instance_template resource else it is set to default value 'r006-d7fejbe-2dhj-442df-b2iha-ccjbecbjbcejce'")
987+
}
988+
975989
IsBareMetalServerProfileName = os.Getenv("IS_BARE_METAL_SERVER_PROFILE")
976990
if IsBareMetalServerProfileName == "" {
977991
IsBareMetalServerProfileName = "bx2-metal-96x384" // for next gen infrastructure

0 commit comments

Comments
 (0)