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

set instance_count in instance group read #4421

Merged
merged 1 commit into from
Mar 21, 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
1 change: 1 addition & 0 deletions ibm/service/vpc/resource_ibm_is_instance_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ func resourceIBMISInstanceGroupRead(d *schema.ResourceData, meta interface{}) er
d.Set("name", *instanceGroup.Name)
d.Set("instance_template", *instanceGroup.InstanceTemplate.ID)
d.Set("instances", *instanceGroup.MembershipCount)
d.Set("instance_count", *instanceGroup.MembershipCount)
d.Set("resource_group", *instanceGroup.ResourceGroup.ID)
if instanceGroup.ApplicationPort != nil {
d.Set("application_port", *instanceGroup.ApplicationPort)
Expand Down
8 changes: 3 additions & 5 deletions ibm/service/vpc/resource_ibm_is_instance_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func testAccCheckIBMISInstanceGrouplbConfig(vpcname, subnetname, zone, cidr, nam

resource "ibm_is_instance_template" "instancetemplate1" {
name = "%s"
image = "r134-63363662-a4ee-4ba4-a6c4-92e6c78c6b58"
image = "%s"
profile = "bx2-8x32"

primary_network_interface {
Expand All @@ -182,15 +182,13 @@ func testAccCheckIBMISInstanceGrouplbConfig(vpcname, subnetname, zone, cidr, nam
load_balancer_pool = ibm_is_lb_pool.testacc_lb_pool.pool_id
application_port = "2364"
}
`, vpcname, subnetname, zone, cidr, name, poolName, algorithm, protocol, delay, retries, timeout, healthType, sshKeyName, publicKey, templateName, zone, instanceGroupName)
`, vpcname, subnetname, zone, cidr, name, poolName, algorithm, protocol, delay, retries, timeout, healthType, sshKeyName, publicKey, templateName, acc.IsImage, zone, instanceGroupName)

}

func testAccCheckIBMISInstanceGroupConfig(vpcName, subnetName, sshKeyName, publicKey, templateName, instanceGroupName string) string {
return fmt.Sprintf(`
provider "ibm" {
generation = 2
}


resource "ibm_is_vpc" "vpc2" {
name = "%s"
Expand Down