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

vni phase 2 changes #5112

Merged
merged 1 commit into from
Feb 16, 2024
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
746 changes: 443 additions & 303 deletions examples/ibm-is-ng/main.tf

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ require (
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
Expand Down
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ github.com/IBM/go-sdk-core/v5 v5.7.0/go.mod h1:+YbdhrjCHC84ls4MeBp+Hj4NZCni+tDAc
github.com/IBM/go-sdk-core/v5 v5.9.2/go.mod h1:YlOwV9LeuclmT/qi/LAK2AsobbAP42veV0j68/rlZsE=
github.com/IBM/go-sdk-core/v5 v5.9.5/go.mod h1:YlOwV9LeuclmT/qi/LAK2AsobbAP42veV0j68/rlZsE=
github.com/IBM/go-sdk-core/v5 v5.10.2/go.mod h1:WZPFasUzsKab/2mzt29xPcfruSk5js2ywAPwW4VJjdI=
github.com/IBM/go-sdk-core/v5 v5.12.1/go.mod h1:WZPFasUzsKab/2mzt29xPcfruSk5js2ywAPwW4VJjdI=
github.com/IBM/go-sdk-core/v5 v5.15.0 h1:AhFoWVk3i58f9vnDoEoZumI/zbtRoP5moWIz5YQOmZg=
github.com/IBM/go-sdk-core/v5 v5.15.0/go.mod h1:5Obavm/s1Tc2PxivEIfgCvj/HJ5h3QIOjLHS5y8QJf0=
github.com/IBM/ibm-cos-sdk-go v1.3.1/go.mod h1:YLBAYobEA8bD27P7xpMwSQeNQu6W3DNBtBComXrRzRY=
Expand Down Expand Up @@ -1923,6 +1924,8 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
Expand Down
10 changes: 8 additions & 2 deletions ibm/acctest/acctest.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ var (
ISZoneName2 string
ISZoneName3 string
IsResourceGroupID string
ISResourceCrn string
ISCIDR string
ISCIDR2 string
ISPublicSSHKeyFilePath string
Expand Down Expand Up @@ -708,6 +709,11 @@ func init() {
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 == "" {
Expand Down Expand Up @@ -790,8 +796,8 @@ func init() {

IsBareMetalServerProfileName = os.Getenv("IS_BARE_METAL_SERVER_PROFILE")
if IsBareMetalServerProfileName == "" {
IsBareMetalServerProfileName = "bx2-metal-192x768" // 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-192x768'")
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")
Expand Down
128 changes: 74 additions & 54 deletions ibm/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,8 @@ func Provider() *schema.Provider {
"ibm_is_bare_metal_server_disk": vpc.DataSourceIBMIsBareMetalServerDisk(),
"ibm_is_bare_metal_server_disks": vpc.DataSourceIBMIsBareMetalServerDisks(),
"ibm_is_bare_metal_server_initialization": vpc.DataSourceIBMIsBareMetalServerInitialization(),
"ibm_is_bare_metal_server_network_attachment": vpc.DataSourceIBMIsBareMetalServerNetworkAttachment(),
"ibm_is_bare_metal_server_network_attachments": vpc.DataSourceIBMIsBareMetalServerNetworkAttachments(),
"ibm_is_bare_metal_server_network_interface_floating_ip": vpc.DataSourceIBMIsBareMetalServerNetworkInterfaceFloatingIP(),
"ibm_is_bare_metal_server_network_interface_floating_ips": vpc.DataSourceIBMIsBareMetalServerNetworkInterfaceFloatingIPs(),
"ibm_is_bare_metal_server_network_interface_reserved_ip": vpc.DataSourceIBMISBareMetalServerNICReservedIP(),
Expand Down Expand Up @@ -437,6 +439,8 @@ func Provider() *schema.Provider {
"ibm_is_instance_profiles": vpc.DataSourceIBMISInstanceProfiles(),
"ibm_is_instance": vpc.DataSourceIBMISInstance(),
"ibm_is_instances": vpc.DataSourceIBMISInstances(),
"ibm_is_instance_network_attachment": vpc.DataSourceIBMIsInstanceNetworkAttachment(),
"ibm_is_instance_network_attachments": vpc.DataSourceIBMIsInstanceNetworkAttachments(),
"ibm_is_instance_network_interface": vpc.DataSourceIBMIsInstanceNetworkInterface(),
"ibm_is_instance_network_interfaces": vpc.DataSourceIBMIsInstanceNetworkInterfaces(),
"ibm_is_instance_disk": vpc.DataSourceIbmIsInstanceDisk(),
Expand All @@ -446,57 +450,65 @@ func Provider() *schema.Provider {
"ibm_is_instance_network_interface_reserved_ip": vpc.DataSourceIBMISInstanceNICReservedIP(),
"ibm_is_instance_network_interface_reserved_ips": vpc.DataSourceIBMISInstanceNICReservedIPs(),

"ibm_is_instance_volume_attachment": vpc.DataSourceIBMISInstanceVolumeAttachment(),
"ibm_is_instance_volume_attachments": vpc.DataSourceIBMISInstanceVolumeAttachments(),
"ibm_is_ipsec_policy": vpc.DataSourceIBMIsIpsecPolicy(),
"ibm_is_ipsec_policies": vpc.DataSourceIBMIsIpsecPolicies(),
"ibm_is_ike_policies": vpc.DataSourceIBMIsIkePolicies(),
"ibm_is_ike_policy": vpc.DataSourceIBMIsIkePolicy(),
"ibm_is_lb": vpc.DataSourceIBMISLB(),
"ibm_is_lb_listener": vpc.DataSourceIBMISLBListener(),
"ibm_is_lb_listeners": vpc.DataSourceIBMISLBListeners(),
"ibm_is_lb_listener_policies": vpc.DataSourceIBMISLBListenerPolicies(),
"ibm_is_lb_listener_policy": vpc.DataSourceIBMISLBListenerPolicy(),
"ibm_is_lb_listener_policy_rule": vpc.DataSourceIBMISLBListenerPolicyRule(),
"ibm_is_lb_listener_policy_rules": vpc.DataSourceIBMISLBListenerPolicyRules(),
"ibm_is_lb_pool": vpc.DataSourceIBMISLBPool(),
"ibm_is_lb_pools": vpc.DataSourceIBMISLBPools(),
"ibm_is_lb_pool_member": vpc.DataSourceIBMIBLBPoolMember(),
"ibm_is_lb_pool_members": vpc.DataSourceIBMISLBPoolMembers(),
"ibm_is_lb_profile": vpc.DataSourceIBMISLbProfile(),
"ibm_is_lb_profiles": vpc.DataSourceIBMISLbProfiles(),
"ibm_is_lbs": vpc.DataSourceIBMISLBS(),
"ibm_is_public_gateway": vpc.DataSourceIBMISPublicGateway(),
"ibm_is_public_gateways": vpc.DataSourceIBMISPublicGateways(),
"ibm_is_region": vpc.DataSourceIBMISRegion(),
"ibm_is_regions": vpc.DataSourceIBMISRegions(),
"ibm_is_reservation": vpc.DataSourceIBMIsReservation(),
"ibm_is_reservations": vpc.DataSourceIBMIsReservations(),
"ibm_is_ssh_key": vpc.DataSourceIBMISSSHKey(),
"ibm_is_ssh_keys": vpc.DataSourceIBMIsSshKeys(),
"ibm_is_subnet": vpc.DataSourceIBMISSubnet(),
"ibm_is_subnets": vpc.DataSourceIBMISSubnets(),
"ibm_is_subnet_reserved_ip": vpc.DataSourceIBMISReservedIP(),
"ibm_is_subnet_reserved_ips": vpc.DataSourceIBMISReservedIPs(),
"ibm_is_security_group": vpc.DataSourceIBMISSecurityGroup(),
"ibm_is_security_groups": vpc.DataSourceIBMIsSecurityGroups(),
"ibm_is_security_group_rule": vpc.DataSourceIBMIsSecurityGroupRule(),
"ibm_is_security_group_rules": vpc.DataSourceIBMIsSecurityGroupRules(),
"ibm_is_security_group_target": vpc.DataSourceIBMISSecurityGroupTarget(),
"ibm_is_security_group_targets": vpc.DataSourceIBMISSecurityGroupTargets(),
"ibm_is_snapshot_clone": vpc.DataSourceSnapshotClone(),
"ibm_is_snapshot_clones": vpc.DataSourceSnapshotClones(),
"ibm_is_snapshot": vpc.DataSourceSnapshot(),
"ibm_is_snapshot_consistency_group": vpc.DataSourceIBMIsSnapshotConsistencyGroup(),
"ibm_is_snapshot_consistency_groups": vpc.DataSourceIBMIsSnapshotConsistencyGroups(),
"ibm_is_snapshots": vpc.DataSourceSnapshots(),
"ibm_is_share": vpc.DataSourceIbmIsShare(),
"ibm_is_source_share": vpc.DataSourceIbmIsSourceShare(),
"ibm_is_shares": vpc.DataSourceIbmIsShares(),
"ibm_is_share_profile": vpc.DataSourceIbmIsShareProfile(),
"ibm_is_share_profiles": vpc.DataSourceIbmIsShareProfiles(),
"ibm_is_virtual_network_interface": vpc.DataSourceIBMIsVirtualNetworkInterface(),
"ibm_is_virtual_network_interfaces": vpc.DataSourceIBMIsVirtualNetworkInterfaces(),
"ibm_is_instance_volume_attachment": vpc.DataSourceIBMISInstanceVolumeAttachment(),
"ibm_is_instance_volume_attachments": vpc.DataSourceIBMISInstanceVolumeAttachments(),
"ibm_is_ipsec_policy": vpc.DataSourceIBMIsIpsecPolicy(),
"ibm_is_ipsec_policies": vpc.DataSourceIBMIsIpsecPolicies(),
"ibm_is_ike_policies": vpc.DataSourceIBMIsIkePolicies(),
"ibm_is_ike_policy": vpc.DataSourceIBMIsIkePolicy(),
"ibm_is_lb": vpc.DataSourceIBMISLB(),
"ibm_is_lb_listener": vpc.DataSourceIBMISLBListener(),
"ibm_is_lb_listeners": vpc.DataSourceIBMISLBListeners(),
"ibm_is_lb_listener_policies": vpc.DataSourceIBMISLBListenerPolicies(),
"ibm_is_lb_listener_policy": vpc.DataSourceIBMISLBListenerPolicy(),
"ibm_is_lb_listener_policy_rule": vpc.DataSourceIBMISLBListenerPolicyRule(),
"ibm_is_lb_listener_policy_rules": vpc.DataSourceIBMISLBListenerPolicyRules(),
"ibm_is_lb_pool": vpc.DataSourceIBMISLBPool(),
"ibm_is_lb_pools": vpc.DataSourceIBMISLBPools(),
"ibm_is_lb_pool_member": vpc.DataSourceIBMIBLBPoolMember(),
"ibm_is_lb_pool_members": vpc.DataSourceIBMISLBPoolMembers(),
"ibm_is_lb_profile": vpc.DataSourceIBMISLbProfile(),
"ibm_is_lb_profiles": vpc.DataSourceIBMISLbProfiles(),
"ibm_is_lbs": vpc.DataSourceIBMISLBS(),
"ibm_is_public_gateway": vpc.DataSourceIBMISPublicGateway(),
"ibm_is_public_gateways": vpc.DataSourceIBMISPublicGateways(),
"ibm_is_region": vpc.DataSourceIBMISRegion(),
"ibm_is_regions": vpc.DataSourceIBMISRegions(),
"ibm_is_reservation": vpc.DataSourceIBMIsReservation(),
"ibm_is_reservations": vpc.DataSourceIBMIsReservations(),
"ibm_is_ssh_key": vpc.DataSourceIBMISSSHKey(),
"ibm_is_ssh_keys": vpc.DataSourceIBMIsSshKeys(),
"ibm_is_subnet": vpc.DataSourceIBMISSubnet(),
"ibm_is_subnets": vpc.DataSourceIBMISSubnets(),
"ibm_is_subnet_reserved_ip": vpc.DataSourceIBMISReservedIP(),
"ibm_is_subnet_reserved_ips": vpc.DataSourceIBMISReservedIPs(),
"ibm_is_security_group": vpc.DataSourceIBMISSecurityGroup(),
"ibm_is_security_groups": vpc.DataSourceIBMIsSecurityGroups(),
"ibm_is_security_group_rule": vpc.DataSourceIBMIsSecurityGroupRule(),
"ibm_is_security_group_rules": vpc.DataSourceIBMIsSecurityGroupRules(),
"ibm_is_security_group_target": vpc.DataSourceIBMISSecurityGroupTarget(),
"ibm_is_security_group_targets": vpc.DataSourceIBMISSecurityGroupTargets(),
"ibm_is_snapshot_clone": vpc.DataSourceSnapshotClone(),
"ibm_is_snapshot_clones": vpc.DataSourceSnapshotClones(),
"ibm_is_snapshot": vpc.DataSourceSnapshot(),
"ibm_is_snapshot_consistency_group": vpc.DataSourceIBMIsSnapshotConsistencyGroup(),
"ibm_is_snapshot_consistency_groups": vpc.DataSourceIBMIsSnapshotConsistencyGroups(),
"ibm_is_snapshots": vpc.DataSourceSnapshots(),
"ibm_is_share": vpc.DataSourceIbmIsShare(),
"ibm_is_source_share": vpc.DataSourceIbmIsSourceShare(),
"ibm_is_shares": vpc.DataSourceIbmIsShares(),
"ibm_is_share_profile": vpc.DataSourceIbmIsShareProfile(),
"ibm_is_share_profiles": vpc.DataSourceIbmIsShareProfiles(),
"ibm_is_virtual_network_interface": vpc.DataSourceIBMIsVirtualNetworkInterface(),
"ibm_is_virtual_network_interfaces": vpc.DataSourceIBMIsVirtualNetworkInterfaces(),

// vni

"ibm_is_virtual_network_interface_floating_ip": vpc.DataSourceIBMIsVirtualNetworkInterfaceFloatingIP(),
"ibm_is_virtual_network_interface_floating_ips": vpc.DataSourceIBMIsVirtualNetworkInterfaceFloatingIPs(),
"ibm_is_virtual_network_interface_ip": vpc.DataSourceIBMIsVirtualNetworkInterfaceIP(),
"ibm_is_virtual_network_interface_ips": vpc.DataSourceIBMIsVirtualNetworkInterfaceIPs(),

"ibm_is_share_mount_target": vpc.DataSourceIBMIsShareTarget(),
"ibm_is_share_mount_targets": vpc.DataSourceIBMIsShareTargets(),
"ibm_is_volume": vpc.DataSourceIBMISVolume(),
Expand Down Expand Up @@ -1042,6 +1054,7 @@ func Provider() *schema.Provider {
// bare_metal_server
"ibm_is_bare_metal_server_action": vpc.ResourceIBMIsBareMetalServerAction(),
"ibm_is_bare_metal_server_disk": vpc.ResourceIBMIsBareMetalServerDisk(),
"ibm_is_bare_metal_server_network_attachment": vpc.ResourceIBMIsBareMetalServerNetworkAttachment(),
"ibm_is_bare_metal_server_network_interface_allow_float": vpc.ResourceIBMIsBareMetalServerNetworkInterfaceAllowFloat(),
"ibm_is_bare_metal_server_network_interface_floating_ip": vpc.ResourceIBMIsBareMetalServerNetworkInterfaceFloatingIp(),
"ibm_is_bare_metal_server_network_interface": vpc.ResourceIBMIsBareMetalServerNetworkInterface(),
Expand All @@ -1055,6 +1068,7 @@ func Provider() *schema.Provider {
"ibm_is_flow_log": vpc.ResourceIBMISFlowLog(),
"ibm_is_instance": vpc.ResourceIBMISInstance(),
"ibm_is_instance_action": vpc.ResourceIBMISInstanceAction(),
"ibm_is_instance_network_attachment": vpc.ResourceIBMIsInstanceNetworkAttachment(),
"ibm_is_instance_network_interface": vpc.ResourceIBMIsInstanceNetworkInterface(),
"ibm_is_instance_network_interface_floating_ip": vpc.ResourceIBMIsInstanceNetworkInterfaceFloatingIp(),
"ibm_is_instance_disk_management": vpc.ResourceIBMISInstanceDiskManagement(),
Expand Down Expand Up @@ -1093,6 +1107,9 @@ func Provider() *schema.Provider {
"ibm_is_subnet_routing_table_attachment": vpc.ResourceIBMISSubnetRoutingTableAttachment(),
"ibm_is_ssh_key": vpc.ResourceIBMISSSHKey(),
"ibm_is_snapshot": vpc.ResourceIBMSnapshot(),
"ibm_is_virtual_network_interface": vpc.ResourceIBMIsVirtualNetworkInterface(),
"ibm_is_virtual_network_interface_floating_ip": vpc.ResourceIBMIsVirtualNetworkInterfaceFloatingIP(),
"ibm_is_virtual_network_interface_ip": vpc.ResourceIBMIsVirtualNetworkInterfaceIP(),
"ibm_is_snapshot_consistency_group": vpc.ResourceIBMIsSnapshotConsistencyGroup(),
"ibm_is_volume": vpc.ResourceIBMISVolume(),
"ibm_is_vpn_gateway": vpc.ResourceIBMISVPNGateway(),
Expand Down Expand Up @@ -1495,9 +1512,10 @@ func Validator() validate.ValidatorDict {
"ibm_is_backup_policy_plan": vpc.ResourceIBMIsBackupPolicyPlanValidator(),

// bare_metal_server
"ibm_is_bare_metal_server_disk": vpc.ResourceIBMIsBareMetalServerDiskValidator(),
"ibm_is_bare_metal_server_network_interface": vpc.ResourceIBMIsBareMetalServerNetworkInterfaceValidator(),
"ibm_is_bare_metal_server": vpc.ResourceIBMIsBareMetalServerValidator(),
"ibm_is_bare_metal_server_disk": vpc.ResourceIBMIsBareMetalServerDiskValidator(),
"ibm_is_bare_metal_server_network_attachment": vpc.ResourceIBMIsBareMetalServerNetworkAttachmentValidator(),
"ibm_is_bare_metal_server_network_interface": vpc.ResourceIBMIsBareMetalServerNetworkInterfaceValidator(),
"ibm_is_bare_metal_server": vpc.ResourceIBMIsBareMetalServerValidator(),

"ibm_is_dedicated_host_group": vpc.ResourceIbmIsDedicatedHostGroupValidator(),
"ibm_is_dedicated_host": vpc.ResourceIbmIsDedicatedHostValidator(),
Expand All @@ -1515,6 +1533,7 @@ func Validator() validate.ValidatorDict {
"ibm_is_instance_template": vpc.ResourceIBMISInstanceTemplateValidator(),
"ibm_is_instance": vpc.ResourceIBMISInstanceValidator(),
"ibm_is_instance_action": vpc.ResourceIBMISInstanceActionValidator(),
"ibm_is_instance_network_attachment": vpc.ResourceIBMIsInstanceNetworkAttachmentValidator(),
"ibm_is_instance_network_interface": vpc.ResourceIBMIsInstanceNetworkInterfaceValidator(),
"ibm_is_instance_disk_management": vpc.ResourceIBMISInstanceDiskManagementValidator(),
"ibm_is_instance_volume_attachment": vpc.ResourceIBMISInstanceVolumeAttachmentValidator(),
Expand All @@ -1541,6 +1560,7 @@ func Validator() validate.ValidatorDict {
"ibm_is_subnet": vpc.ResourceIBMISSubnetValidator(),
"ibm_is_subnet_reserved_ip": vpc.ResourceIBMISSubnetReservedIPValidator(),
"ibm_is_volume": vpc.ResourceIBMISVolumeValidator(),
"ibm_is_virtual_network_interface": vpc.ResourceIBMIsVirtualNetworkInterfaceValidator(),
"ibm_is_address_prefix": vpc.ResourceIBMISAddressPrefixValidator(),
"ibm_is_vpc": vpc.ResourceIBMISVPCValidator(),
"ibm_is_vpc_routing_table": vpc.ResourceIBMISVPCRoutingTableValidator(),
Expand Down
Loading
Loading