Skip to content

Commit a1b676f

Browse files
Documentation fix
1 parent 6b53f43 commit a1b676f

8 files changed

+28
-28
lines changed

ibm/service/vpc/data_source_ibm_is_image_bare_metal_server_profiles_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ func TestAccIBMIsImageBareMetalServerProfilesDataSourceBasic(t *testing.T) {
2121
Config: testAccCheckIBMIsImageBareMetalServerProfilesDataSourceConfigBasic(),
2222
Check: resource.ComposeTestCheckFunc(
2323
resource.TestCheckResourceAttrSet("data.ibm_is_image_bare_metal_server_profiles.is_image_bare_metal_server_profiles_instance", "id"),
24-
resource.TestCheckResourceAttrSet("data.ibm_is_image_bare_metal_server_profiles.is_image_bare_metal_server_profiles_instance", "is_image_bare_metal_server_profiles_id"),
2524
resource.TestCheckResourceAttrSet("data.ibm_is_image_bare_metal_server_profiles.is_image_bare_metal_server_profiles_instance", "bare_metal_server_profiles.#"),
25+
resource.TestCheckResourceAttrSet("data.ibm_is_image_bare_metal_server_profiles.is_image_bare_metal_server_profiles_instance", "bare_metal_server_profiles.0.href"),
26+
resource.TestCheckResourceAttrSet("data.ibm_is_image_bare_metal_server_profiles.is_image_bare_metal_server_profiles_instance", "bare_metal_server_profiles.0.name"),
27+
resource.TestCheckResourceAttrSet("data.ibm_is_image_bare_metal_server_profiles.is_image_bare_metal_server_profiles_instance", "bare_metal_server_profiles.0.resource_type"),
2628
),
2729
},
2830
},
@@ -32,7 +34,7 @@ func TestAccIBMIsImageBareMetalServerProfilesDataSourceBasic(t *testing.T) {
3234
func testAccCheckIBMIsImageBareMetalServerProfilesDataSourceConfigBasic() string {
3335
return fmt.Sprintf(`
3436
data "ibm_is_image_bare_metal_server_profiles" "is_image_bare_metal_server_profiles_instance" {
35-
identifier = "id"
37+
identifier = "%s"
3638
}
37-
`)
39+
`, acc.IsImage)
3840
}

ibm/service/vpc/data_source_ibm_is_image_instance_profiles_test.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,18 @@ import (
77
"fmt"
88
"testing"
99

10-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
1110
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
1211

1312
acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest"
1413
)
1514

1615
func TestAccIBMIsImageInstanceProfilesDataSourceBasic(t *testing.T) {
17-
name := fmt.Sprintf("tfimg-name-%d", acctest.RandIntRange(10, 100))
1816
resource.Test(t, resource.TestCase{
1917
PreCheck: func() { acc.TestAccPreCheck(t) },
2018
Providers: acc.TestAccProviders,
2119
Steps: []resource.TestStep{
2220
resource.TestStep{
23-
Config: testAccCheckIBMIsImageInstanceProfilesDataSourceConfigBasic(name),
21+
Config: testAccCheckIBMIsImageInstanceProfilesDataSourceConfigBasic(),
2422
Check: resource.ComposeTestCheckFunc(
2523
resource.TestCheckResourceAttrSet("data.ibm_is_image_instance_profiles.is_image_instance_profiles_instance", "id"),
2624
resource.TestCheckResourceAttrSet("data.ibm_is_image_instance_profiles.is_image_instance_profiles_instance", "instance_profiles.#"),
@@ -33,10 +31,10 @@ func TestAccIBMIsImageInstanceProfilesDataSourceBasic(t *testing.T) {
3331
})
3432
}
3533

36-
func testAccCheckIBMIsImageInstanceProfilesDataSourceConfigBasic(name string) string {
37-
return testAccCheckIBMISImageConfig(name) + fmt.Sprintf(`
34+
func testAccCheckIBMIsImageInstanceProfilesDataSourceConfigBasic() string {
35+
return fmt.Sprintf(`
3836
data "ibm_is_image_instance_profiles" "is_image_instance_profiles_instance" {
39-
identifier = "ibm_is_image.isExampleImage.id"
37+
identifier = "%s"
4038
}
41-
`)
39+
`, acc.IsImage)
4240
}

ibm/service/vpc/data_source_ibm_is_snapshot_instance_profiles_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE
3232
resource.TestStep{
3333
Config: testAccCheckIBMIsSnapshotInstanceProfilesDataSourceConfigBasic(vpcname, subnetname, sshname, publicKey, volname, name, name1),
3434
Check: resource.ComposeTestCheckFunc(
35-
resource.TestCheckResourceAttrSet("data.ibm_is_snapshot_instance_profiles.is_snapshot_instance_profiles_instance", "id"),
36-
resource.TestCheckResourceAttrSet("data.ibm_is_snapshot_instance_profiles.is_snapshot_instance_profiles_instance", "instance_profiles.#"),
37-
resource.TestCheckResourceAttrSet("data.ibm_is_snapshot_instance_profiles.is_snapshot_instance_profiles_instance", "instance_profiles.0.href"),
38-
resource.TestCheckResourceAttrSet("data.ibm_is_snapshot_instance_profiles.is_snapshot_instance_profiles_instance", "instance_profiles.0.name"),
39-
resource.TestCheckResourceAttrSet("data.ibm_is_snapshot_instance_profiles.is_snapshot_instance_profiles_instance", "instance_profiles.0.resource_type"),
35+
resource.TestCheckResourceAttrSet("data.ibm_is_snapshot_instance_profiles.is_snapshot_instance_profiles", "id"),
36+
resource.TestCheckResourceAttrSet("data.ibm_is_snapshot_instance_profiles.is_snapshot_instance_profiles", "instance_profiles.#"),
37+
resource.TestCheckResourceAttrSet("data.ibm_is_snapshot_instance_profiles.is_snapshot_instance_profiles", "instance_profiles.0.href"),
38+
resource.TestCheckResourceAttrSet("data.ibm_is_snapshot_instance_profiles.is_snapshot_instance_profiles", "instance_profiles.0.name"),
39+
resource.TestCheckResourceAttrSet("data.ibm_is_snapshot_instance_profiles.is_snapshot_instance_profiles", "instance_profiles.0.resource_type"),
4040
),
4141
},
4242
},
@@ -45,8 +45,8 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE
4545

4646
func testAccCheckIBMIsSnapshotInstanceProfilesDataSourceConfigBasic(vpcname, subnetname, sshname, publicKey, volname, name, name1 string) string {
4747
return testAccCheckIBMISSnapshotConfig(vpcname, subnetname, sshname, publicKey, volname, name, name1) + fmt.Sprintf(`
48-
data "ibm_is_volume_instance_profiles" "is_volume_instance_profiles_instance" {
49-
identifier = "ibm_is_snapshot.testacc_snapshot.id"
48+
data "ibm_is_snapshot_instance_profiles" "is_snapshot_instance_profiles" {
49+
identifier = ibm_is_snapshot.testacc_snapshot.id
5050
}
5151
`)
5252
}

ibm/service/vpc/data_source_ibm_is_volume_instance_profiles_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ func TestAccIBMIsVolumeInstanceProfilesDataSourceBasic(t *testing.T) {
2222
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR
2323
`)
2424
sshname := fmt.Sprintf("tf-ssh-%d", acctest.RandIntRange(10, 100))
25-
userData1 := "a"
26-
userTags1 := "tags-0"
25+
volname := fmt.Sprintf("tf-vol-%d", acctest.RandIntRange(10, 100))
26+
name1 := fmt.Sprintf("tfsnapshotuat-%d", acctest.RandIntRange(10, 100))
2727
resource.Test(t, resource.TestCase{
2828
PreCheck: func() { acc.TestAccPreCheck(t) },
2929
Providers: acc.TestAccProviders,
3030
Steps: []resource.TestStep{
3131
resource.TestStep{
32-
Config: testAccCheckIBMIsVolumeInstanceProfilesDataSourceConfigBasic(vpcname, subnetname, sshname, publicKey, name, userData1, userTags1),
32+
Config: testAccCheckIBMIsVolumeInstanceProfilesDataSourceConfigBasic(vpcname, subnetname, sshname, publicKey, volname, name, name1),
3333
Check: resource.ComposeTestCheckFunc(
3434
resource.TestCheckResourceAttrSet("data.ibm_is_volume_instance_profiles.is_volume_instance_profiles_instance", "id"),
3535
resource.TestCheckResourceAttrSet("data.ibm_is_volume_instance_profiles.is_volume_instance_profiles_instance", "instance_profiles.#"),
@@ -42,10 +42,10 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE
4242
})
4343
}
4444

45-
func testAccCheckIBMIsVolumeInstanceProfilesDataSourceConfigBasic(vpcname, subnetname, sshname, publicKey, name, userData1, userTags1 string) string {
46-
return testAccCheckIBMISInstanceUserTagConfig(vpcname, subnetname, sshname, publicKey, name, userData1, userTags1) + fmt.Sprintf(`
45+
func testAccCheckIBMIsVolumeInstanceProfilesDataSourceConfigBasic(vpcname, subnetname, sshname, publicKey, volname, name, name1 string) string {
46+
return testAccCheckIBMISSnapshotConfig(vpcname, subnetname, sshname, publicKey, volname, name, name1) + fmt.Sprintf(`
4747
data "ibm_is_volume_instance_profiles" "is_volume_instance_profiles_instance" {
48-
identifier = "ibm_is_instance.testacc_instance.boot_volume.0.volume_id"
49-
}
48+
identifier = ibm_is_instance.testacc_instance.volume_attachments[0].volume_id
49+
}
5050
`)
5151
}

website/docs/d/is_image_bare_metal_server_profiles.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: |-
88

99
# ibm_is_image_bare_metal_server_profiles
1010

11-
Provides a read-only data source to retrieve information about an ImageBareMetalServerProfileCollection.For more information, about infrastructure image bare metal server profiles, see [viewing image bare metal server profiles](WILL UPDATE DURING GA).
11+
Provides a read-only data source to retrieve information about an ImageBareMetalServerProfileCollection.For more information, about infrastructure image bare metal server profiles, see [IBM Cloud Importing and managing custom images](https://cloud.ibm.com/docs/vpc?topic=vpc-managing-images).
1212

1313
**Note:**
1414
VPC infrastructure services are a regional specific based endpoint, by default targets to `us-south`. Please make sure to target right region in the provider block as shown in the `provider.tf` file, if VPC service is created in region other than `us-south`.

website/docs/d/is_image_instance_profiles.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: |-
88

99
# ibm_is_image_instance_profiles
1010

11-
Provides a read-only data source to retrieve information about an ImageInstanceProfileCollection.For more information, about infrastructure image instance profiles, see [viewing image instance profiles](WILL UPDATE DURING GA).
11+
Provides a read-only data source to retrieve information about an ImageInstanceProfileCollection.For more information, about infrastructure image instance profiles, see [IBM Cloud Importing and managing custom images](https://cloud.ibm.com/docs/vpc?topic=vpc-managing-images).
1212

1313
**Note:**
1414
VPC infrastructure services are a regional specific based endpoint, by default targets to `us-south`. Please make sure to target right region in the provider block as shown in the `provider.tf` file, if VPC service is created in region other than `us-south`.

website/docs/d/is_snapshot_instance_profiles.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: |-
88

99
# ibm_is_snapshot_instance_profiles
1010

11-
Provides a read-only data source to retrieve information about an SnapshotInstanceProfileCollection.For more information, about infrastructure snapshots instance profiles, see [viewing snapshot instance profiles](WILL UPDATE DURING GA).
11+
Provides a read-only data source to retrieve information about an SnapshotInstanceProfileCollection.For more information, about infrastructure snapshots instance profiles, see [viewing snapshots](https://cloud.ibm.com/docs/vpc?topic=vpc-snapshots-vpc-view).
1212

1313
**Note:**
1414
VPC infrastructure services are a regional specific based endpoint, by default targets to `us-south`. Please make sure to target right region in the provider block as shown in the `provider.tf` file, if VPC service is created in region other than `us-south`.

website/docs/d/is_volume_instance_profiles.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: |-
88

99
# ibm_is_volume_instance_profiles
1010

11-
Provides a read-only data source to retrieve information about an VolumeInstanceProfileCollection.For more information, about infrastructure volume instance profiles, see [viewing volume instance profiles](WILL UPDATE DURING GA).
11+
Provides a read-only data source to retrieve information about an VolumeInstanceProfileCollection.For more information, about the volume concepts, see [expandable volume concepts for VPC](https://cloud.ibm.com/docs/vpc?topic=vpc-expanding-block-storage-volumes#expandable-volume-concepts)..
1212

1313
**Note:**
1414
VPC infrastructure services are a regional specific based endpoint, by default targets to `us-south`. Please make sure to target right region in the provider block as shown in the `provider.tf` file, if VPC service is created in region other than `us-south`.

0 commit comments

Comments
 (0)