-
Notifications
You must be signed in to change notification settings - Fork 669
/
acctest.go
2382 lines (2075 loc) · 112 KB
/
acctest.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright IBM Corp. 2017, 2021 All Rights Reserved.
// Licensed under the Mozilla Public License v2.0
package acctest
import (
"context"
"fmt"
"os"
"strconv"
"strings"
"sync"
"testing"
"github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
terraformsdk "github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)
const (
ProviderName = "ibm"
ProviderNameAlternate = "ibmalternate"
)
var (
AccountId string
AppIDTenantID string
AppIDTestUserEmail string
BackupPolicyJobID string
BackupPolicyID string
CfOrganization string
CfSpace string
CisDomainStatic string
CisDomainTest string
CisInstance string
CisResourceGroup string
CloudShellAccountID string
CosCRN string
BucketCRN string
ActivityTrackerInstanceCRN string
MetricsMonitoringCRN string
BucketName string
CosName string
Ibmid1 string
Ibmid2 string
IAMUser string
IAMAccountId string
IAMServiceId string
IAMTrustedProfileID string
Datacenter string
MachineType string
trustedMachineType string
PublicVlanID string
PrivateVlanID string
PrivateSubnetID string
PublicSubnetID string
SubnetID string
LbaasDatacenter string
LbaasSubnetId string
LbListerenerCertificateInstance string
IpsecDatacenter string
Customersubnetid string
Customerpeerip string
DedicatedHostName string
DedicatedHostID string
KubeVersion string
KubeUpdateVersion string
Zone string
ZonePrivateVlan string
ZonePublicVlan string
ZoneUpdatePrivateVlan string
ZoneUpdatePublicVlan string
WorkerPoolSecondaryStorage string
CsRegion string
ExtendedHardwareTesting bool
err error
placementGroupName string
CertCRN string
UpdatedCertCRN string
SecretCRN string
SecretCRN2 string
EnterpriseCRN string
InstanceCRN string
SecretGroupID string
RegionName string
ISZoneName string
ISZoneName2 string
ISZoneName3 string
IsResourceGroupID string
ISResourceCrn string
ISCIDR string
ISCIDR2 string
ISPublicSSHKeyFilePath string
ISPrivateSSHKeyFilePath string
ISAddressPrefixCIDR string
InstanceName string
InstanceProfileName string
InstanceProfileNameUpdate string
IsBareMetalServerProfileName string
IsBareMetalServerImage string
IsBareMetalServerImage2 string
DNSInstanceCRN string
DNSZoneID string
DNSInstanceCRN1 string
DNSZoneID1 string
DedicatedHostProfileName string
DedicatedHostGroupID string
InstanceDiskProfileName string
DedicatedHostGroupFamily string
DedicatedHostGroupClass string
ShareProfileName string
SourceShareCRN string
ShareEncryptionKey string
VNIId string
FloatingIpID string
VolumeProfileName string
VSIUnattachedBootVolumeID string
VSIDataVolumeID string
ISRouteDestination string
ISRouteNextHop string
ISSnapshotCRN string
WorkspaceID string
TemplateID string
ActionID string
JobID string
RepoURL string
RepoBranch string
imageName string
functionNamespace string
HpcsInstanceID string
)
// MQ on Cloud
var (
MqcloudConfigEndpoint string
MqcloudInstanceID string
MqcloudQueueManagerID string
MqcloudKSCertFilePath string
MqcloudTSCertFilePath string
MqCloudQueueManagerLocation string
MqCloudQueueManagerVersion string
MqCloudQueueManagerVersionUpdate string
)
// Logs
var (
LogsInstanceId string
LogsInstanceRegion string
LogsEventNotificationInstanceId string
LogsEventNotificationInstanceRegion string
)
// Secrets Manager
var (
SecretsManagerInstanceID string
SecretsManagerInstanceRegion string
SecretsManagerENInstanceCrn string
SecretsManagerIamCredentialsConfigurationApiKey string
SecretsManagerIamCredentialsSecretServiceId string
SecretsManagerIamCredentialsSecretServiceAccessGroup string
SecretsManagerPublicCertificateLetsEncryptEnvironment string
SecretsManagerPublicCertificateLetsEncryptPrivateKey string
SecretsManagerPublicCertificateCisCrn string
SecretsManagerPublicCertificateClassicInfrastructureUsername string
SecretsManagerPublicCertificateClassicInfrastructurePassword string
SecretsManagerPublicCertificateCommonName string
SecretsManagerValidateManualDnsCisZoneId string
SecretsManagerImportedCertificatePathToCertificate string
SecretsManagerServiceCredentialsCosCrn string
SecretsManagerPrivateCertificateConfigurationCryptoKeyIAMSecretServiceId string
SecretsManagerPrivateCertificateConfigurationCryptoKeyProviderType string
SecretsManagerPrivateCertificateConfigurationCryptoKeyProviderInstanceCrn string
SecretsManagerPrivateCertificateConfigurationCryptoKeyProviderPrivateKeystoreId string
SecretsManagerSecretType string
SecretsManagerSecretID string
)
var (
HpcsAdmin1 string
HpcsToken1 string
HpcsAdmin2 string
HpcsToken2 string
HpcsRootKeyCrn string
RealmName string
IksSa string
IksClusterID string
IksClusterVpcID string
IksClusterSubnetID string
IksClusterResourceGroupID string
IcdDbDeploymentId string
IcdDbBackupId string
IcdDbTaskId string
KmsInstanceID string
CrkID string
KmsAccountID string
BaasEncryptionkeyCRN string
)
// for snapshot encryption
var (
IsKMSInstanceId string
IsKMSKeyName string
)
// For Power Colo
var (
Pi_auxiliary_volume_name string
Pi_cloud_instance_id string
Pi_dhcp_id string
Pi_host_group_id string
Pi_host_id string
Pi_image string
Pi_image_bucket_access_key string
Pi_image_bucket_file_name string
Pi_image_bucket_name string
Pi_image_bucket_region string
Pi_image_bucket_secret_key string
Pi_image_id string
Pi_instance_name string
Pi_key_name string
Pi_network_address_group_id string
Pi_network_id string
Pi_network_interface_id string
Pi_network_name string
Pi_network_security_group_id string
Pi_network_security_group_rule_id string
Pi_placement_group_name string
Pi_remote_id string
Pi_remote_type string
Pi_replication_volume_name string
Pi_resource_group_id string
Pi_sap_image string
Pi_shared_processor_pool_id string
Pi_snapshot_id string
Pi_spp_placement_group_id string
Pi_storage_connection string
Pi_target_storage_tier string
Pi_volume_clone_task_id string
Pi_volume_group_id string
Pi_volume_group_name string
Pi_volume_id string
Pi_volume_name string
Pi_volume_onboarding_id string
Pi_volume_onboarding_source_crn string
PiCloudConnectionName string
PiSAPProfileID string
PiStoragePool string
PiStorageType string
)
var (
Pi_capture_storage_image_path string
Pi_capture_cloud_storage_access_key string
Pi_capture_cloud_storage_secret_key string
)
var ISDelegegatedVPC string
// For Image
var (
IsImageName string
IsImageName2 string
IsImage string
IsImage2 string
IsImageEncryptedDataKey string
IsImageEncryptionKey string
IsWinImage string
IsCosBucketName string
IsCosBucketCRN string
Image_cos_url string
Image_cos_url_encrypted string
Image_operating_system string
)
// Transit Gateway Power Virtual Server
var Tg_power_vs_network_id string
// Transit Gateway cross account
var (
Tg_cross_network_account_id string
Tg_cross_network_account_api_key string
Tg_cross_network_id string
)
// Enterprise Management
var Account_to_be_imported string
// Billing Snapshot Configuration
var Cos_bucket string
var Cos_location string
var Cos_bucket_update string
var Cos_location_update string
var Cos_reports_folder string
var Snapshot_date_from string
var Snapshot_date_to string
var Snapshot_month string
// Secuity and Complinace Center
var (
SccApiEndpoint string
SccEventNotificationsCRN string
SccInstanceID string
SccObjectStorageCRN string
SccObjectStorageBucket string
SccProviderTypeAttributes string
SccProviderTypeID string
SccReportID string
)
// ROKS Cluster
var ClusterName string
// Satellite instance
var (
Satellite_location_id string
Satellite_Resource_instance_id string
)
// Dedicated host
var HostPoolID string
// Continuous Delivery
var (
CdResourceGroupName string
CdAppConfigInstanceName string
CdKeyProtectInstanceName string
CdSecretsManagerInstanceName string
CdSlackChannelName string
CdSlackTeamName string
CdSlackWebhook string
CdJiraProjectKey string
CdJiraApiUrl string
CdJiraUsername string
CdJiraApiToken string
CdSaucelabsAccessKey string
CdSaucelabsUsername string
CdBitbucketRepoUrl string
CdGithubConsolidatedRepoUrl string
CdGitlabRepoUrl string
CdHostedGitRepoUrl string
CdEventNotificationsInstanceName string
)
// VPN Server
var (
ISCertificateCrn string
ISClientCaCrn string
)
// COS Replication Bucket
var IBM_AccountID_REPL string
// Atracker
var (
IesApiKey string
IngestionKey string
COSApiKey string
)
// For Code Engine
var (
CeResourceGroupID string
CeProjectId string
CeServiceInstanceID string
CeResourceKeyID string
CeDomainMappingName string
CeTLSCert string
CeTLSKey string
CeTLSKeyFilePath string
CeTLSCertFilePath string
)
// Satellite tests
var (
SatelliteSSHPubKey string
)
// for IAM Identity
var IamIdentityAssignmentTargetAccountId string
// Projects
var ProjectsConfigApiKey string
// For PAG
var (
PagCosInstanceName string
PagCosBucketName string
PagCosBucketRegion string
PagVpcName string
PagServicePlan string
PagVpcSubnetNameInstance_1 string
PagVpcSubnetNameInstance_2 string
PagVpcSgInstance_1 string
PagVpcSgInstance_2 string
)
// For VMware as a Service
var (
Vmaas_Directorsite_id string
Vmaas_Directorsite_pvdc_id string
)
// For IAM Access Management
var (
TargetAccountId string
TargetEnterpriseId string
)
// For Partner Center Sell
var (
PcsRegistrationAccountId string
PcsOnboardingProductWithApprovedProgrammaticName string
// one Onboarding product can only have one catalog product ever
PcsOnboardingProductWithApprovedProgrammaticName2 string
PcsOnboardingProductWithCatalogProduct string
PcsOnboardingCatalogProductId string
PcsOnboardingCatalogPlanId string
PcsIamServiceRegistrationId string
)
func init() {
testlogger := os.Getenv("TF_LOG")
if testlogger != "" {
os.Setenv("IBMCLOUD_BLUEMIX_GO_TRACE", "true")
}
IamIdentityAssignmentTargetAccountId = os.Getenv("IAM_IDENTITY_ASSIGNMENT_TARGET_ACCOUNT")
ProjectsConfigApiKey = os.Getenv("IBM_PROJECTS_CONFIG_APIKEY")
if ProjectsConfigApiKey == "" {
fmt.Println("[WARN] Set the environment variable IBM_PROJECTS_CONFIG_APIKEY for testing IBM Projects Config resources, the tests will fail if this is not set")
}
AppIDTenantID = os.Getenv("IBM_APPID_TENANT_ID")
if AppIDTenantID == "" {
fmt.Println("[WARN] Set the environment variable IBM_APPID_TENANT_ID for testing AppID resources, AppID tests will fail if this is not set")
}
AppIDTestUserEmail = os.Getenv("IBM_APPID_TEST_USER_EMAIL")
if AppIDTestUserEmail == "" {
fmt.Println("[WARN] Set the environment variable IBM_APPID_TEST_USER_EMAIL for testing AppID user resources, the tests will fail if this is not set")
}
CfOrganization = os.Getenv("IBM_ORG")
if CfOrganization == "" {
fmt.Println("[WARN] Set the environment variable IBM_ORG for testing ibm_org resource Some tests for that resource will fail if this is not set correctly")
}
CfSpace = os.Getenv("IBM_SPACE")
if CfSpace == "" {
fmt.Println("[WARN] Set the environment variable IBM_SPACE for testing ibm_space resource Some tests for that resource will fail if this is not set correctly")
}
Ibmid1 = os.Getenv("IBM_ID1")
if Ibmid1 == "" {
fmt.Println("[WARN] Set the environment variable IBM_ID1 for testing ibm_space resource Some tests for that resource will fail if this is not set correctly")
}
Ibmid2 = os.Getenv("IBM_ID2")
if Ibmid2 == "" {
fmt.Println("[WARN] Set the environment variable IBM_ID2 for testing ibm_space resource Some tests for that resource will fail if this is not set correctly")
}
IAMUser = os.Getenv("IBM_IAMUSER")
if IAMUser == "" {
fmt.Println("[WARN] Set the environment variable IBM_IAMUSER for testing ibm_iam_user_policy resource Some tests for that resource will fail if this is not set correctly")
}
IAMAccountId = os.Getenv("IBM_IAMACCOUNTID")
if IAMAccountId == "" {
fmt.Println("[WARN] Set the environment variable IBM_IAMACCOUNTID for testing ibm_iam_trusted_profile resource Some tests for that resource will fail if this is not set correctly")
}
IAMServiceId = os.Getenv("IBM_IAM_SERVICE_ID")
if IAMAccountId == "" {
fmt.Println("[WARN] Set the environment variable IBM_IAM_SERVICE_ID for testing ibm_iam_trusted_profile_identity resource Some tests for that resource will fail if this is not set correctly")
}
IAMTrustedProfileID = os.Getenv("IBM_IAM_TRUSTED_PROFILE_ID")
if IAMTrustedProfileID == "" {
fmt.Println("[WARN] Set the environment variable IBM_IAM_TRUSTED_PROFILE_ID for testing ibm_iam_trusted_profile_identity resource Some tests for that resource will fail if this is not set correctly")
}
Datacenter = os.Getenv("IBM_DATACENTER")
if Datacenter == "" {
Datacenter = "par01"
fmt.Println("[WARN] Set the environment variable IBM_DATACENTER for testing ibm_container_cluster resource else it is set to default value 'par01'")
}
MachineType = os.Getenv("IBM_MACHINE_TYPE")
if MachineType == "" {
MachineType = "b3c.4x16"
fmt.Println("[WARN] Set the environment variable IBM_MACHINE_TYPE for testing ibm_container_cluster resource else it is set to default value 'b3c.4x16'")
}
CertCRN = os.Getenv("IBM_CERT_CRN")
if CertCRN == "" {
CertCRN = "crn:v1:bluemix:public:cloudcerts:us-south:a/52b2e14f385aca5da781baa1b9c28e53:6efac0c2-b955-49ca-939d-d7bc0cb8132f:certificate:e786b0ea2af8b5435603803ec2ff8118"
fmt.Println("[WARN] Set the environment variable IBM_CERT_CRN for testing ibm_container_alb_cert or ibm_container_ingress_secret_tls resource else it is set to default value")
}
UpdatedCertCRN = os.Getenv("IBM_UPDATE_CERT_CRN")
if UpdatedCertCRN == "" {
UpdatedCertCRN = "crn:v1:bluemix:public:cloudcerts:eu-de:a/e9021a4d06e9b108b4a221a3cec47e3d:77e527aa-65b2-4cb3-969b-7e8714174346:certificate:1bf3d0c2b7764402dde25744218e6cba"
fmt.Println("[WARN] Set the environment variable IBM_UPDATE_CERT_CRN for testing ibm_container_alb_cert or ibm_container_ingress_secret_tls resource else it is set to default value")
}
SecretCRN = os.Getenv("IBM_SECRET_CRN")
if SecretCRN == "" {
SecretCRN = "crn:v1:bluemix:public:secrets-manager:us-south:a/52b2e14f385aca5da781baa1b9c28e53:6efac0c2-b955-49ca-939d-d7bc0cb8132f:secret:e786b0ea2af8b5435603803ec2ff8118"
fmt.Println("[WARN] Set the environment variable IBM_SECRET_CRN for testing ibm_container_ingress_secret_opaque resource else it is set to default value")
}
SecretCRN2 = os.Getenv("IBM_SECRET_CRN_2")
if SecretCRN2 == "" {
SecretCRN2 = "crn:v1:bluemix:public:secrets-manager:eu-de:a/e9021a4d06e9b108b4a221a3cec47e3d:77e527aa-65b2-4cb3-969b-7e8714174346:secret:1bf3d0c2b7764402dde25744218e6cba"
fmt.Println("[WARN] Set the environment variable IBM_SECRET_CRN_2 for testing ibm_container_ingress_secret_opaque resource else it is set to default value")
}
InstanceCRN = os.Getenv("IBM_INGRESS_INSTANCE_CRN")
if InstanceCRN == "" {
fmt.Println("[WARN] Set the environment variable IBM_INGRESS_INSTANCE_CRN for testing ibm_container_ingress_instance resource. Some tests for that resource will fail if this is not set correctly")
}
SecretGroupID = os.Getenv("IBM_INGRESS_INSTANCE_SECRET_GROUP_ID")
if SecretGroupID == "" {
fmt.Println("[WARN] Set the environment variable IBM_INGRESS_INSTANCE_SECRET_GROUP_ID for testing ibm_container_ingress_instance resource. Some tests for that resource will fail if this is not set correctly")
}
CsRegion = os.Getenv("IBM_CONTAINER_REGION")
if CsRegion == "" {
CsRegion = "eu-de"
fmt.Println("[WARN] Set the environment variable IBM_CONTAINER_REGION for testing ibm_container resources else it is set to default value 'eu-de'")
}
CisInstance = os.Getenv("IBM_CIS_INSTANCE")
if CisInstance == "" {
CisInstance = ""
fmt.Println("[WARN] Set the environment variable IBM_CIS_INSTANCE with a VALID CIS Instance NAME for testing ibm_cis resources on staging/test")
}
CisDomainStatic = os.Getenv("IBM_CIS_DOMAIN_STATIC")
if CisDomainStatic == "" {
CisDomainStatic = ""
fmt.Println("[WARN] Set the environment variable IBM_CIS_DOMAIN_STATIC with the Domain name registered with the CIS instance on test/staging. Domain must be predefined in CIS to avoid CIS billing costs due to domain delete/create")
}
CisDomainTest = os.Getenv("IBM_CIS_DOMAIN_TEST")
if CisDomainTest == "" {
CisDomainTest = ""
fmt.Println("[WARN] Set the environment variable IBM_CIS_DOMAIN_TEST with a VALID Domain name for testing the one time create and delete of a domain in CIS. Note each create/delete will trigger a monthly billing instance. Only to be run in staging/test")
}
CisResourceGroup = os.Getenv("IBM_CIS_RESOURCE_GROUP")
if CisResourceGroup == "" {
CisResourceGroup = ""
fmt.Println("[WARN] Set the environment variable IBM_CIS_RESOURCE_GROUP with the resource group for the CIS Instance ")
}
CosCRN = os.Getenv("IBM_COS_CRN")
if CosCRN == "" {
CosCRN = ""
fmt.Println("[WARN] Set the environment variable IBM_COS_CRN with a VALID COS instance CRN for testing ibm_cos_* resources")
}
BucketCRN = os.Getenv("IBM_COS_Bucket_CRN")
if BucketCRN == "" {
BucketCRN = ""
fmt.Println("[WARN] Set the environment variable IBM_COS_Bucket_CRN with a VALID BUCKET CRN for testing ibm_cos_bucket* resources")
}
ActivityTrackerInstanceCRN = os.Getenv("IBM_COS_ACTIVITY_TRACKER_CRN")
if ActivityTrackerInstanceCRN == "" {
ActivityTrackerInstanceCRN = ""
fmt.Println("[WARN] Set the environment variable IBM_COS_ACTIVITY_TRACKER_CRN with a VALID ACTIVITY TRACKER INSTANCE CRN in valid region for testing ibm_cos_bucket* resources")
}
MetricsMonitoringCRN = os.Getenv("IBM_COS_METRICS_MONITORING_CRN")
if MetricsMonitoringCRN == "" {
MetricsMonitoringCRN = ""
fmt.Println("[WARN] Set the environment variable IBM_COS_METRICS_MONITORING_CRN with a VALID METRICS MONITORING CRN for testing ibm_cos_bucket* resources")
}
BucketName = os.Getenv("IBM_COS_BUCKET_NAME")
if BucketName == "" {
BucketName = ""
fmt.Println("[WARN] Set the environment variable IBM_COS_BUCKET_NAME with a VALID BUCKET Name for testing ibm_cos_bucket* resources")
}
CosName = os.Getenv("IBM_COS_NAME")
if CosName == "" {
CosName = ""
fmt.Println("[WARN] Set the environment variable IBM_COS_NAME with a VALID COS instance name for testing resources with cos deps")
}
trustedMachineType = os.Getenv("IBM_TRUSTED_MACHINE_TYPE")
if trustedMachineType == "" {
trustedMachineType = "mb1c.16x64"
fmt.Println("[WARN] Set the environment variable IBM_TRUSTED_MACHINE_TYPE for testing ibm_container_cluster resource else it is set to default value 'mb1c.16x64'")
}
ExtendedHardwareTesting, err = strconv.ParseBool(os.Getenv("IBM_BM_EXTENDED_HW_TESTING"))
if err != nil {
ExtendedHardwareTesting = false
fmt.Println("[WARN] Set the environment variable IBM_BM_EXTENDED_HW_TESTING to true/false for testing ibm_compute_bare_metal resource else it is set to default value 'false'")
}
PublicVlanID = os.Getenv("IBM_PUBLIC_VLAN_ID")
if PublicVlanID == "" {
PublicVlanID = "2393319"
fmt.Println("[WARN] Set the environment variable IBM_PUBLIC_VLAN_ID for testing ibm_container_cluster resource else it is set to default value '2393319'")
}
PrivateVlanID = os.Getenv("IBM_PRIVATE_VLAN_ID")
if PrivateVlanID == "" {
PrivateVlanID = "2393321"
fmt.Println("[WARN] Set the environment variable IBM_PRIVATE_VLAN_ID for testing ibm_container_cluster resource else it is set to default value '2393321'")
}
KubeVersion = os.Getenv("IBM_KUBE_VERSION")
if KubeVersion == "" {
KubeVersion = "1.25.9"
fmt.Println("[WARN] Set the environment variable IBM_KUBE_VERSION for testing ibm_container_cluster resource else it is set to default value '1.18.14'")
}
KubeUpdateVersion = os.Getenv("IBM_KUBE_UPDATE_VERSION")
if KubeUpdateVersion == "" {
KubeUpdateVersion = "1.19"
fmt.Println("[WARN] Set the environment variable IBM_KUBE_UPDATE_VERSION for testing ibm_container_cluster resource else it is set to default value '1.19.6'")
}
PrivateSubnetID = os.Getenv("IBM_PRIVATE_SUBNET_ID")
if PrivateSubnetID == "" {
PrivateSubnetID = "1636107"
fmt.Println("[WARN] Set the environment variable IBM_PRIVATE_SUBNET_ID for testing ibm_container_cluster resource else it is set to default value '1636107'")
}
PublicSubnetID = os.Getenv("IBM_PUBLIC_SUBNET_ID")
if PublicSubnetID == "" {
PublicSubnetID = "1165645"
fmt.Println("[WARN] Set the environment variable IBM_PUBLIC_SUBNET_ID for testing ibm_container_cluster resource else it is set to default value '1165645'")
}
SubnetID = os.Getenv("IBM_SUBNET_ID")
if SubnetID == "" {
SubnetID = "1165645"
fmt.Println("[WARN] Set the environment variable IBM_SUBNET_ID for testing ibm_container_cluster resource else it is set to default value '1165645'")
}
IpsecDatacenter = os.Getenv("IBM_IPSEC_DATACENTER")
if IpsecDatacenter == "" {
IpsecDatacenter = "tok02"
fmt.Println("[INFO] Set the environment variable IBM_IPSEC_DATACENTER for testing ibm_ipsec_vpn resource else it is set to default value 'tok02'")
}
Customersubnetid = os.Getenv("IBM_IPSEC_CUSTOMER_SUBNET_ID")
if Customersubnetid == "" {
Customersubnetid = "123456"
fmt.Println("[INFO] Set the environment variable IBM_IPSEC_CUSTOMER_SUBNET_ID for testing ibm_ipsec_vpn resource else it is set to default value '123456'")
}
Customerpeerip = os.Getenv("IBM_IPSEC_CUSTOMER_PEER_IP")
if Customerpeerip == "" {
Customerpeerip = "192.168.0.1"
fmt.Println("[INFO] Set the environment variable IBM_IPSEC_CUSTOMER_PEER_IP for testing ibm_ipsec_vpn resource else it is set to default value '192.168.0.1'")
}
LbaasDatacenter = os.Getenv("IBM_LBAAS_DATACENTER")
if LbaasDatacenter == "" {
LbaasDatacenter = "dal13"
fmt.Println("[WARN] Set the environment variable IBM_LBAAS_DATACENTER for testing ibm_lbaas resource else it is set to default value 'dal13'")
}
LbaasSubnetId = os.Getenv("IBM_LBAAS_SUBNETID")
if LbaasSubnetId == "" {
LbaasSubnetId = "2144241"
fmt.Println("[WARN] Set the environment variable IBM_LBAAS_SUBNETID for testing ibm_lbaas resource else it is set to default value '2144241'")
}
LbListerenerCertificateInstance = os.Getenv("IBM_LB_LISTENER_CERTIFICATE_INSTANCE")
if LbListerenerCertificateInstance == "" {
LbListerenerCertificateInstance = "crn:v1:staging:public:cloudcerts:us-south:a/2d1bace7b46e4815a81e52c6ffeba5cf:af925157-b125-4db2-b642-adacb8b9c7f5:certificate:c81627a1bf6f766379cc4b98fd2a44ed"
fmt.Println("[WARN] Set the environment variable IBM_LB_LISTENER_CERTIFICATE_INSTANCE for testing ibm_is_lb_listener resource for https redirect else it is set to default value 'crn:v1:staging:public:cloudcerts:us-south:a/2d1bace7b46e4815a81e52c6ffeba5cf:af925157-b125-4db2-b642-adacb8b9c7f5:certificate:c81627a1bf6f766379cc4b98fd2a44ed'")
}
DedicatedHostName = os.Getenv("IBM_DEDICATED_HOSTNAME")
if DedicatedHostName == "" {
DedicatedHostName = "terraform-dedicatedhost"
fmt.Println("[WARN] Set the environment variable IBM_DEDICATED_HOSTNAME for testing ibm_compute_vm_instance resource else it is set to default value 'terraform-dedicatedhost'")
}
DedicatedHostID = os.Getenv("IBM_DEDICATED_HOST_ID")
if DedicatedHostID == "" {
DedicatedHostID = "30301"
fmt.Println("[WARN] Set the environment variable IBM_DEDICATED_HOST_ID for testing ibm_compute_vm_instance resource else it is set to default value '30301'")
}
Zone = os.Getenv("IBM_WORKER_POOL_ZONE")
if Zone == "" {
Zone = "ams03"
fmt.Println("[WARN] Set the environment variable IBM_WORKER_POOL_ZONE for testing ibm_container_worker_pool_zone_attachment resource else it is set to default value 'ams03'")
}
ZonePrivateVlan = os.Getenv("IBM_WORKER_POOL_ZONE_PRIVATE_VLAN")
if ZonePrivateVlan == "" {
ZonePrivateVlan = "2538975"
fmt.Println("[WARN] Set the environment variable IBM_WORKER_POOL_ZONE_PRIVATE_VLAN for testing ibm_container_worker_pool_zone_attachment resource else it is set to default value '2538975'")
}
ZonePublicVlan = os.Getenv("IBM_WORKER_POOL_ZONE_PUBLIC_VLAN")
if ZonePublicVlan == "" {
ZonePublicVlan = "2538967"
fmt.Println("[WARN] Set the environment variable IBM_WORKER_POOL_ZONE_PUBLIC_VLAN for testing ibm_container_worker_pool_zone_attachment resource else it is set to default value '2538967'")
}
ZoneUpdatePrivateVlan = os.Getenv("IBM_WORKER_POOL_ZONE_UPDATE_PRIVATE_VLAN")
if ZoneUpdatePrivateVlan == "" {
ZoneUpdatePrivateVlan = "2388377"
fmt.Println("[WARN] Set the environment variable IBM_WORKER_POOL_ZONE_UPDATE_PRIVATE_VLAN for testing ibm_container_worker_pool_zone_attachment resource else it is set to default value '2388377'")
}
ZoneUpdatePublicVlan = os.Getenv("IBM_WORKER_POOL_ZONE_UPDATE_PUBLIC_VLAN")
if ZoneUpdatePublicVlan == "" {
ZoneUpdatePublicVlan = "2388375"
fmt.Println("[WARN] Set the environment variable IBM_WORKER_POOL_ZONE_UPDATE_PUBLIC_VLAN for testing ibm_container_worker_pool_zone_attachment resource else it is set to default value '2388375'")
}
WorkerPoolSecondaryStorage = os.Getenv("IBM_WORKER_POOL_SECONDARY_STORAGE")
if WorkerPoolSecondaryStorage == "" {
fmt.Println("[WARN] Set the environment variable IBM_WORKER_POOL_SECONDARY_STORAGE for testing secondary_storage attachment to IKS workerpools")
}
placementGroupName = os.Getenv("IBM_PLACEMENT_GROUP_NAME")
if placementGroupName == "" {
placementGroupName = "terraform_group"
fmt.Println("[WARN] Set the environment variable IBM_PLACEMENT_GROUP_NAME for testing ibm_compute_vm_instance resource else it is set to default value 'terraform-group'")
}
RegionName = os.Getenv("SL_REGION")
if RegionName == "" {
RegionName = "us-south"
fmt.Println("[INFO] Set the environment variable SL_REGION for testing ibm_is_region datasource else it is set to default value 'us-south'")
}
ISZoneName = os.Getenv("SL_ZONE")
if ISZoneName == "" {
ISZoneName = "us-south-1"
fmt.Println("[INFO] Set the environment variable SL_ZONE for testing ibm_is_zone datasource else it is set to default value 'us-south-1'")
}
ISZoneName2 = os.Getenv("SL_ZONE_2")
if ISZoneName2 == "" {
ISZoneName2 = "us-south-2"
fmt.Println("[INFO] Set the environment variable SL_ZONE_2 for testing ibm_is_zone datasource else it is set to default value 'us-south-2'")
}
ISZoneName3 = os.Getenv("SL_ZONE_3")
if ISZoneName3 == "" {
ISZoneName3 = "us-south-3"
fmt.Println("[INFO] Set the environment variable SL_ZONE_3 for testing ibm_is_zone datasource else it is set to default value 'us-south-3'")
}
ISCIDR = os.Getenv("SL_CIDR")
if ISCIDR == "" {
ISCIDR = "10.240.0.0/24"
fmt.Println("[INFO] Set the environment variable SL_CIDR for testing ibm_is_subnet else it is set to default value '10.240.0.0/24'")
}
ISCIDR2 = os.Getenv("SL_CIDR_2")
if ISCIDR2 == "" {
ISCIDR2 = "10.240.64.0/24"
fmt.Println("[INFO] Set the environment variable SL_CIDR_2 for testing ibm_is_subnet else it is set to default value '10.240.64.0/24'")
}
AccountId = os.Getenv("IS_ACCOUNT_ID")
if AccountId == "" {
AccountId = "fee82deba12e4c0fb69c3b09d1f12345"
fmt.Println("[INFO] Set the environment variable IS_ACCOUNT_ID for testing private_path_service_gateway_account_policy else it is set to default value 'fee82deba12e4c0fb69c3b09d1f12345'")
}
ISAddressPrefixCIDR = os.Getenv("SL_ADDRESS_PREFIX_CIDR")
if ISAddressPrefixCIDR == "" {
ISAddressPrefixCIDR = "10.120.0.0/24"
fmt.Println("[INFO] Set the environment variable SL_ADDRESS_PREFIX_CIDR for testing ibm_is_vpc_address_prefix else it is set to default value '10.120.0.0/24'")
}
ISCIDR2 = os.Getenv("SL_CIDR_2")
if ISCIDR2 == "" {
ISCIDR2 = "10.240.64.0/24"
fmt.Println("[INFO] Set the environment variable SL_CIDR_2 for testing ibm_is_subnet else it is set to default value '10.240.64.0/24'")
}
ISPublicSSHKeyFilePath = os.Getenv("IS_PUBLIC_SSH_KEY_PATH")
if ISPublicSSHKeyFilePath == "" {
ISPublicSSHKeyFilePath = "./test-fixtures/.ssh/pkcs8_rsa.pub"
fmt.Println("[INFO] Set the environment variable SL_CIDR_2 for testing ibm_is_instance datasource else it is set to default value './test-fixtures/.ssh/pkcs8_rsa.pub'")
}
ISPrivateSSHKeyFilePath = os.Getenv("IS_PRIVATE_SSH_KEY_PATH")
if ISPrivateSSHKeyFilePath == "" {
ISPrivateSSHKeyFilePath = "./test-fixtures/.ssh/pkcs8_rsa"
fmt.Println("[INFO] Set the environment variable IS_PRIVATE_SSH_KEY_PATH for testing ibm_is_instance datasource else it is set to default value './test-fixtures/.ssh/pkcs8_rsa'")
}
IsResourceGroupID = os.Getenv("SL_RESOURCE_GROUP_ID")
if IsResourceGroupID == "" {
IsResourceGroupID = "c01d34dff4364763476834c990398zz8"
fmt.Println("[INFO] Set the environment variable SL_RESOURCE_GROUP_ID for testing with different resource group id else it is set to default value 'c01d34dff4364763476834c990398zz8'")
}
ISResourceCrn = os.Getenv("IS_RESOURCE_INSTANCE_CRN")
if ISResourceCrn == "" {
ISResourceCrn = "crn:v1:bluemix:public:cloud-object-storage:global:a/fugeggfcgjebvrburvgurgvugfr:236764224-f48fu4-f4h84-9db3-4f94fh::"
fmt.Println("[INFO] Set the environment variable IS_RESOURCE_CRN for testing with created resource instance")
}
IsImage = os.Getenv("IS_IMAGE")
if IsImage == "" {
// IsImage = "fc538f61-7dd6-4408-978c-c6b85b69fe76" // for classic infrastructure
IsImage = "r006-907911a7-0ffe-467e-8821-3cc9a0d82a39" // for next gen infrastructure ibm-centos-7-9-minimal-amd64-10 image
fmt.Println("[INFO] Set the environment variable IS_IMAGE for testing ibm_is_instance, ibm_is_floating_ip else it is set to default value 'r006-907911a7-0ffe-467e-8821-3cc9a0d82a39'")
}
IsImage2 = os.Getenv("IS_IMAGE2")
if IsImage2 == "" {
IsImage2 = "r134-f47cc24c-e020-4db5-ad96-1e5be8b5853b" // for next gen infrastructure ibm-centos-7-9-minimal-amd64-10 image
fmt.Println("[INFO] Set the environment variable IS_IMAGE2 for testing ibm_is_instance, ibm_is_floating_ip else it is set to default value 'r134-f47cc24c-e020-4db5-ad96-1e5be8b5853b'")
}
IsWinImage = os.Getenv("IS_WIN_IMAGE")
if IsWinImage == "" {
// IsWinImage = "a7a0626c-f97e-4180-afbe-0331ec62f32a" // classic windows machine: ibm-windows-server-2012-full-standard-amd64-1
IsWinImage = "r006-d2e0d0e9-0a4f-4c45-afd7-cab787030776" // next gen windows machine: ibm-windows-server-2022-full-standard-amd64-8
fmt.Println("[INFO] Set the environment variable IS_WIN_IMAGE for testing ibm_is_instance data source else it is set to default value 'r006-d2e0d0e9-0a4f-4c45-afd7-cab787030776'")
}
IsCosBucketName = os.Getenv("IS_COS_BUCKET_NAME")
if IsCosBucketName == "" {
IsCosBucketName = "test-bucket"
fmt.Println("[INFO] Set the environment variable IS_COS_BUCKET_NAME for testing ibm_is_image_export_job else it is set to default value 'bucket-27200-lwx4cfvcue'")
}
IsCosBucketCRN = os.Getenv("IS_COS_BUCKET_CRN")
if IsCosBucketCRN == "" {
IsCosBucketCRN = "crn:v1:bluemix:public:cloud-object-storage:global:a/XXXXXXXX:XXXXX-XXXX-XXXX-XXXX-XXXX:bucket:test-bucket"
fmt.Println("[INFO] Set the environment variable IS_COS_BUCKET_CRN for testing ibm_is_image_export_job else it is set to default value 'bucket-27200-lwx4cfvcue'")
}
InstanceName = os.Getenv("IS_INSTANCE_NAME")
if InstanceName == "" {
InstanceName = "placement-check-ins" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_INSTANCE_NAME for testing ibm_is_instance resource else it is set to default value 'instance-01'")
}
BackupPolicyJobID = os.Getenv("IS_BACKUP_POLICY_JOB_ID")
if BackupPolicyJobID == "" {
fmt.Println("[INFO] Set the environment variable IS_BACKUP_POLICY_JOB_ID for testing ibm_is_backup_policy_job datasource")
}
BackupPolicyID = os.Getenv("IS_BACKUP_POLICY_ID")
if BackupPolicyID == "" {
fmt.Println("[INFO] Set the environment variable IS_BACKUP_POLICY_ID for testing ibm_is_backup_policy_jobs datasource")
}
BaasEncryptionkeyCRN = os.Getenv("IS_REMOTE_CP_BAAS_ENCRYPTION_KEY_CRN")
if BaasEncryptionkeyCRN == "" {
BaasEncryptionkeyCRN = "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"
fmt.Println("[INFO] Set the environment variable IS_REMOTE_CP_BAAS_ENCRYPTION_KEY_CRN for testing remote_copies_policy with Baas plans, else it is set to default value, 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'")
}
InstanceProfileName = os.Getenv("SL_INSTANCE_PROFILE")
if InstanceProfileName == "" {
// InstanceProfileName = "bc1-2x8" // for classic infrastructure
InstanceProfileName = "cx2-2x4" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable SL_INSTANCE_PROFILE for testing ibm_is_instance resource else it is set to default value 'cx2-2x4'")
}
IsKMSInstanceId = os.Getenv("SL_KMS_INSTANCE_ID")
if IsKMSInstanceId == "" {
IsKMSInstanceId = "30222bb5-1c6d-3834-8d78-ae6348cf8z61" // kms instance id
fmt.Println("[INFO] Set the environment variable SL_KMS_INSTANCE_ID for testing ibm_kms_key resource else it is set to default value '30222bb5-1c6d-3834-8d78-ae6348cf8z61'")
}
IsKMSKeyName = os.Getenv("SL_KMS_KEY_NAME")
if IsKMSKeyName == "" {
IsKMSKeyName = "tfp-test-key" // kms instance key name
fmt.Println("[INFO] Set the environment variable SL_KMS_KEY_NAME for testing ibm_kms_key resource else it is set to default value 'tfp-test-key'")
}
InstanceProfileNameUpdate = os.Getenv("SL_INSTANCE_PROFILE_UPDATE")
if InstanceProfileNameUpdate == "" {
InstanceProfileNameUpdate = "cx2-4x8"
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'")
}
IsBareMetalServerProfileName = os.Getenv("IS_BARE_METAL_SERVER_PROFILE")
if IsBareMetalServerProfileName == "" {
IsBareMetalServerProfileName = "bx2-metal-96x384" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_BARE_METAL_SERVER_PROFILE for testing ibm_is_bare_metal_server resource else it is set to default value 'bx2-metal-96x384'")
}
IsBareMetalServerImage = os.Getenv("IS_BARE_METAL_SERVER_IMAGE")
if IsBareMetalServerImage == "" {
IsBareMetalServerImage = "r006-2d1f36b0-df65-4570-82eb-df7ae5f778b1" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IsBareMetalServerImage for testing ibm_is_bare_metal_server resource else it is set to default value 'r006-2d1f36b0-df65-4570-82eb-df7ae5f778b1'")
}
IsBareMetalServerImage2 = os.Getenv("IS_BARE_METAL_SERVER_IMAGE2")
if IsBareMetalServerImage2 == "" {
IsBareMetalServerImage2 = "r006-2d1f36b0-df65-4570-82eb-df7ae5f778b1" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IsBareMetalServerImage2 for testing ibm_is_bare_metal_server resource else it is set to default value 'r006-2d1f36b0-df65-4570-82eb-df7ae5f778b1'")
}
DNSInstanceCRN = os.Getenv("IS_DNS_INSTANCE_CRN")
if DNSInstanceCRN == "" {
DNSInstanceCRN = "crn:v1:bluemix:public:dns-svcs:global:a/7f75c7b025e54bc5635f754b2f888665:fa78ce08-a161-4703-98e5-35ed2bfe0e7c::" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_DNS_INSTANCE_CRN for testing ibm_is_lb resource else it is set to default value 'crn:v1:staging:public:dns-svcs:global:a/efe5afc483594adaa8325e2b4d1290df:82df2e3c-53a5-43c6-89ce-dcf78be18668::'")
}
DNSInstanceCRN1 = os.Getenv("IS_DNS_INSTANCE_CRN1")
if DNSInstanceCRN1 == "" {
DNSInstanceCRN1 = "crn:v1:bluemix:public:dns-svcs:global:a/7f75c7b025e54bc5635f754b2f888665:fa78ce08-a161-4703-98e5-35ed2bfe0e7c::" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_DNS_INSTANCE_CRN1 for testing ibm_is_lb resource else it is set to default value 'crn:v1:staging:public:dns-svcs:global:a/efe5afc483594adaa8325e2b4d1290df:599ae4aa-c554-4a88-8bb2-b199b9a3c046::'")
}
DNSZoneID = os.Getenv("IS_DNS_ZONE_ID")
if DNSZoneID == "" {
DNSZoneID = "9519a5f8-8827-426b-8623-22226affcb7e" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_DNS_ZONE_ID for testing ibm_is_lb resource else it is set to default value 'dd501d1d-490b-4bb4-a05d-a31954a1c59e'")
}
DNSZoneID1 = os.Getenv("IS_DNS_ZONE_ID_1")
if DNSZoneID1 == "" {
DNSZoneID1 = "c4cdfb45-c21e-4ae3-88da-c9f64ad91d22" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_DNS_ZONE_ID_1 for testing ibm_is_lb resource else it is set to default value 'b1def78d-51b3-4ea5-a746-1b64c992fcab'")
}
DedicatedHostName = os.Getenv("IS_DEDICATED_HOST_NAME")
if DedicatedHostName == "" {
DedicatedHostName = "tf-dhost-01" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_DEDICATED_HOST_NAME for testing ibm_is_instance resource else it is set to default value 'tf-dhost-01'")
}
DedicatedHostGroupID = os.Getenv("IS_DEDICATED_HOST_GROUP_ID")
if DedicatedHostGroupID == "" {
DedicatedHostGroupID = "0717-9104e7b5-77ad-44ad-9eaa-091e6b6efce1" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_DEDICATED_HOST_GROUP_ID for testing ibm_is_instance resource else it is set to default value '0717-9104e7b5-77ad-44ad-9eaa-091e6b6efce1'")
}
DedicatedHostProfileName = os.Getenv("IS_DEDICATED_HOST_PROFILE")
if DedicatedHostProfileName == "" {
DedicatedHostProfileName = "bx2d-host-152x608" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_DEDICATED_HOST_PROFILE for testing ibm_is_instance resource else it is set to default value 'bx2d-host-152x608'")
}
DedicatedHostGroupClass = os.Getenv("IS_DEDICATED_HOST_GROUP_CLASS")
if DedicatedHostGroupClass == "" {
DedicatedHostGroupClass = "bx2d" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_DEDICATED_HOST_GROUP_CLASS for testing ibm_is_instance resource else it is set to default value 'bx2d'")
}
DedicatedHostGroupFamily = os.Getenv("IS_DEDICATED_HOST_GROUP_FAMILY")
if DedicatedHostGroupFamily == "" {
DedicatedHostGroupFamily = "balanced" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_DEDICATED_HOST_GROUP_FAMILY for testing ibm_is_instance resource else it is set to default value 'balanced'")
}
InstanceDiskProfileName = os.Getenv("IS_INSTANCE_DISK_PROFILE")
if InstanceDiskProfileName == "" {
// InstanceProfileName = "bc1-2x8" // for classic infrastructure
InstanceDiskProfileName = "bx2d-16x64" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable SL_INSTANCE_PROFILE for testing ibm_is_instance resource else it is set to default value 'bx2d-16x64'")
}
ShareProfileName = os.Getenv("IS_SHARE_PROFILE")
if ShareProfileName == "" {
ShareProfileName = "dp2" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_SHARE_PROFILE for testing ibm_is_instance resource else it is set to default value 'tier-3iops'")
}
SourceShareCRN = os.Getenv("IS_SOURCE_SHARE_CRN")
if SourceShareCRN == "" {
SourceShareCRN = "crn:v1:staging:public:is:us-east-1:a/efe5afc483594adaa8325e2b4d1290df::share:r142-a106f162-86e4-4d7f-be75-193cc55a93e9" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_SHARE_PROFILE for testing ibm_is_instance resource else it is set to default value")
}
ShareEncryptionKey = os.Getenv("IS_SHARE_ENCRYPTION_KEY")
if ShareEncryptionKey == "" {
ShareEncryptionKey = "crn:v1:staging:public:kms:us-south:a/efe5afc483594adaa8325e2b4d1290df:1be45161-6dae-44ca-b248-837f98004057:key:3dd21cc5-cc20-4f7c-bc62-8ec9a8a3d1bd" // for next gen infrastructure
fmt.Println("[INFO] Set the environment variable IS_SHARE_PROFILE for testing ibm_is_instance resource else it is set to default value")
}
VolumeProfileName = os.Getenv("IS_VOLUME_PROFILE")
if VolumeProfileName == "" {
VolumeProfileName = "general-purpose"
fmt.Println("[INFO] Set the environment variable IS_VOLUME_PROFILE for testing ibm_is_volume_profile else it is set to default value 'general-purpose'")
}
VNIId = os.Getenv("IS_VIRTUAL_NETWORK_INTERFACE")
if VNIId == "" {
VNIId = "c93dc4c6-e85a-4da2-9ea6-f24576256122"
fmt.Println("[INFO] Set the environment variable IS_VIRTUAL_NETWORK_INTERFACE for testing ibm_is_virtual_network_interface else it is set to default value 'c93dc4c6-e85a-4da2-9ea6-f24576256122'")
}
FloatingIpID = os.Getenv("IS_FLOATING_IP")
if FloatingIpID == "" {
FloatingIpID = "r006-9fc3948f-1b01-406c-baa5-e86b185e559f"
fmt.Println("[INFO] Set the environment variable IS_FLOATING_IP for testing ibm_is_virtual_network_interface else it is set to default value 'r006-9fc3948f-1b01-406c-baa5-e86b185e559f'")
}