fixed nits
This commit is contained in:
parent
4bfd0fd15b
commit
1d02ed51c1
|
@ -11,17 +11,13 @@ func TestAccOPCIPAddressAssociation_importBasic(t *testing.T) {
|
|||
resourceName := "opc_compute_ip_address_association.test"
|
||||
|
||||
ri := acctest.RandInt()
|
||||
config := testAccIPAddressAssociationBasic(ri)
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() {
|
||||
testAccPreCheck(t)
|
||||
},
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckIPAddressAssociationDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: config,
|
||||
Config: testAccIPAddressAssociationBasic(ri),
|
||||
},
|
||||
{
|
||||
ResourceName: resourceName,
|
||||
|
|
|
@ -90,7 +90,11 @@ func resourceOPCIPAddressAssociationRead(d *schema.ResourceData, meta interface{
|
|||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("Error reading IP Address Association %s: %s", d.Id(), err)
|
||||
return fmt.Errorf("Error reading IP Address Association %s: %s", getInput.Name, err)
|
||||
}
|
||||
if result == nil {
|
||||
d.SetId("")
|
||||
return fmt.Errorf("Error reading IP Address Association %s: %s", getInput.Name, err)
|
||||
}
|
||||
|
||||
d.Set("name", result.Name)
|
||||
|
|
|
@ -140,9 +140,6 @@ data "opc_compute_network_interface" "eth0" {
|
|||
instance_id = "${opc_compute_instance.test.id}"
|
||||
interface = "eth0"
|
||||
}
|
||||
data "opc_compute_vnic" "foo" {
|
||||
name = "${data.opc_compute_network_interface.eth0.vnic}"
|
||||
}
|
||||
resource "opc_compute_ip_address_reservation" "test" {
|
||||
name = "testing-ip-address-association-%d"
|
||||
description = "testing-desc-%d"
|
||||
|
@ -151,7 +148,7 @@ resource "opc_compute_ip_address_reservation" "test" {
|
|||
resource "opc_compute_ip_address_association" "test" {
|
||||
name = "testing-acc-%d"
|
||||
ip_address_reservation = "${opc_compute_ip_address_reservation.test.name}"
|
||||
vnic = "${data.opc_compute_vnic.foo.name}"
|
||||
vnic = "${data.opc_compute_network_interface.eth0.vnic}"
|
||||
description = "acctesting ip address association test %d"
|
||||
tags = ["tag1", "tag2"]
|
||||
}`, rInt, rInt, rInt, rInt, rInt, rInt, rInt)
|
||||
|
|
|
@ -8,7 +8,7 @@ description: |-
|
|||
|
||||
# opc\_compute\_ip\_address\_association
|
||||
|
||||
The ``opc_compute_ip_address_association`` resource creates and manages an IP address association in an OPC identity domain.
|
||||
The ``opc_compute_ip_address_association`` resource creates and manages an IP address association between an IP address reservation and a virtual NIC in an OPC identity domain.
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
@ -41,7 +41,7 @@ In addition to the above, the following variables are exported:
|
|||
|
||||
## Import
|
||||
|
||||
IP Address Prefix Set can be imported using the `resource name`, e.g.
|
||||
IP Address Associations can be imported using the `resource name`, e.g.
|
||||
|
||||
```
|
||||
terraform import opc_compute_ip_address_association.default example
|
||||
|
|
Loading…
Reference in New Issue