wip
This commit is contained in:
parent
f50c6b9128
commit
18814655f8
|
@ -12,47 +12,17 @@ func resourcePacketIPAddress() *schema.Resource {
|
|||
Delete: resourcePacketIPAddressDelete,
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
"id": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"address": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
|
||||
"gateway": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"network": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"family": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"netmask": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"cidr": &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"public": &schema.Schema{
|
||||
Type: schema.TypeBool,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"assigned_to": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"created": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
|
|
|
@ -12,44 +12,27 @@ func resourcePacketIPReservation() *schema.Resource {
|
|||
Delete: resourcePacketIPReservationDelete,
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
"address": &schema.Schema{
|
||||
"id": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"gateway": &schema.Schema{
|
||||
"type": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
|
||||
"network": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"family": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"netmask": &schema.Schema{
|
||||
"quantity": &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
|
||||
"cidr": &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"public": &schema.Schema{
|
||||
Type: schema.TypeBool,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"assigned_to": &schema.Schema{
|
||||
Type: schema.TypeBool,
|
||||
Computed: true,
|
||||
"comments": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
|
||||
"created": &schema.Schema{
|
||||
|
|
|
@ -23,7 +23,7 @@ func TestAccPacketIPReservation_Basic(t *testing.T) {
|
|||
testAccCheckPacketIPReservationExists("packet_ip_reservation.foobar", &ip_reservation),
|
||||
testAccCheckPacketIPReservationAttributes(&ip_reservation),
|
||||
resource.TestCheckResourceAttr(
|
||||
"packet_ip_reservation", "foobar", "{}"),
|
||||
"packet_ip_reservation.foobar", "type", "foobar"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
@ -81,4 +81,6 @@ func testAccCheckPacketIPReservationExists(n string, ip_reservation *packngo.IPR
|
|||
}
|
||||
|
||||
var testAccCheckPacketIPReservationConfig_basic = fmt.Sprintf(`
|
||||
resource "packet_ip_reservation" "foobar" {}`)
|
||||
resource "packet_ip_reservation" "foobar" {
|
||||
type = "foobar"
|
||||
}`)
|
||||
|
|
|
@ -15,6 +15,11 @@ func resourcePacketVolume() *schema.Resource {
|
|||
Delete: resourcePacketVolumeDelete,
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
"id": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"project_id": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
|
|
Loading…
Reference in New Issue