Last active
February 10, 2020 18:12
-
-
Save marinsalinas/63bcefeb95f33f9bcbf5ac0385604b8e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "outscale_net" "outscale_net" { | |
ip_range = "10.0.0.0/16" | |
} | |
resource "outscale_subnet" "outscale_subnet" { | |
net_id = "${outscale_net.outscale_net.net_id}" | |
ip_range = "10.0.0.0/24" | |
subregion_name = "eu-west-2a" | |
} | |
resource "outscale_security_group" "outscale_security_group8" { | |
description = "test vm with nic" | |
security_group_name = "private-sg-1" | |
net_id = outscale_net.outscale_net.net_id | |
} | |
resource "outscale_nic" "outscale_nic5" { | |
subnet_id = outscale_subnet.outscale_subnet.subnet_id | |
} | |
resource "outscale_vm" "basic" { | |
image_id = "ami-4a7bf2b3" | |
vm_type = "t2.micro" | |
keypair_name = "terraform-basic" | |
placement_subregion_name = "eu-west-2a" | |
nics { | |
subnet_id = outscale_subnet.outscale_subnet.subnet_id | |
security_group_ids = [outscale_security_group.outscale_security_group8.security_group_id] | |
private_ips { | |
private_ip ="10.0.0.123" | |
is_primary = true | |
} | |
device_number = 0 | |
} | |
nics { | |
nic_id =outscale_nic.outscale_nic5.nic_id | |
device_number = 1 | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testing.go:640: Step 0 error: After applying this step, the plan was not empty: | |
DIFF: | |
UPDATE: outscale_vm.basic | |
admin_password: "" => "" | |
architecture: "x86_64" => "x86_64" | |
block_device_mappings.#: "0" => "0" | |
block_device_mappings_created.#: "1" => "1" | |
block_device_mappings_created.0.bsu.delete_on_vm_deletion: "true" => "true" | |
block_device_mappings_created.0.bsu.link_date: "2020-02-10T17:09:02.916Z" => "2020-02-10T17:09:02.916Z" | |
block_device_mappings_created.0.bsu.state: "attached" => "attached" | |
block_device_mappings_created.0.bsu.volume_id: "vol-bc0c4f30" => "vol-bc0c4f30" | |
block_device_mappings_created.0.device_name: "/dev/sda1" => "/dev/sda1" | |
bsu_optimized: "false" => "false" | |
client_token: "" => "" | |
deletion_protection: "false" => "false" | |
hypervisor: "xen" => "xen" | |
id: "i-a51987b2" => "i-a51987b2" | |
image_id: "ami-4a7bf2b3" => "ami-4a7bf2b3" | |
is_source_dest_checked: "true" => "true" | |
keypair_name: "terraform-basic" => "terraform-basic" | |
launch_number: "0" => "0" | |
net_id: "vpc-50951fd2" => "vpc-50951fd2" | |
nics.#: "2" => "2" | |
nics.0.account_id: "520679080430" => "<computed>" | |
nics.0.delete_on_vm_deletion: "false" => "<computed>" | |
nics.0.description: "" => "<computed>" | |
nics.0.device_number: "0" => "0" | |
nics.0.is_source_dest_checked: "true" => "<computed>" | |
nics.0.link_nic: "" => "<computed>" | |
nics.0.link_nic.#: "0" => "" | |
nics.0.link_public_ip.#: "0" => "" | |
nics.0.mac_address: "aa:b5:e1:96:00:ba" => "<computed>" | |
nics.0.net_id: "vpc-50951fd2" => "<computed>" | |
nics.0.nic_id: "eni-545d2a05" => "<computed>" | |
nics.0.private_dns_name: "ip-10-0-0-14.eu-west-2.compute.internal" => "<computed>" | |
nics.0.private_ips.#: "1" => "1" | |
nics.0.private_ips.0.is_primary: "true" => "true" | |
nics.0.private_ips.0.link_public_ip.#: "0" => "" | |
nics.0.private_ips.0.private_dns_name: "ip-10-0-0-14.eu-west-2.compute.internal" => "<computed>" | |
nics.0.private_ips.0.private_ip: "10.0.0.14" => "10.0.0.123" | |
nics.0.secondary_private_ip_count: "0" => "<computed>" | |
nics.0.security_group_ids.#: "1" => "1" | |
nics.0.security_group_ids.0: "sg-b1572cb7" => "sg-8fdd88ad" | |
nics.0.security_groups: "" => "<computed>" | |
nics.0.security_groups.#: "1" => "" | |
nics.0.security_groups.0.security_group_id: "sg-b1572cb7" => "" | |
nics.0.security_groups.0.security_group_name: "default" => "" | |
nics.0.state: "in-use" => "<computed>" | |
nics.0.subnet_id: "subnet-08fdb6a2" => "subnet-08fdb6a2" | |
nics.1.account_id: "520679080430" => "<computed>" | |
nics.1.delete_on_vm_deletion: "true" => "<computed>" | |
nics.1.description: "" => "<computed>" | |
nics.1.device_number: "0" => "1" | |
nics.1.is_source_dest_checked: "true" => "<computed>" | |
nics.1.link_nic: "" => "<computed>" | |
nics.1.link_nic.#: "0" => "" | |
nics.1.link_public_ip.#: "0" => "" | |
nics.1.mac_address: "aa:07:a4:41:51:75" => "<computed>" | |
nics.1.net_id: "vpc-50951fd2" => "<computed>" | |
nics.1.nic_id: "eni-4f13d79a" => "eni-545d2a05" | |
nics.1.private_dns_name: "ip-10-0-0-123.eu-west-2.compute.internal" => "<computed>" | |
nics.1.private_ips: "" => "<computed>" | |
nics.1.private_ips.#: "1" => "" | |
nics.1.private_ips.0.is_primary: "true" => "" | |
nics.1.private_ips.0.link_public_ip.#: "0" => "" | |
nics.1.private_ips.0.private_dns_name: "ip-10-0-0-123.eu-west-2.compute.internal" => "" | |
nics.1.private_ips.0.private_ip: "10.0.0.123" => "" | |
nics.1.secondary_private_ip_count: "0" => "<computed>" | |
nics.1.security_group_ids.#: "1" => "0" | |
nics.1.security_group_ids.0: "sg-8fdd88ad" => "" | |
nics.1.security_groups: "" => "<computed>" | |
nics.1.security_groups.#: "1" => "" | |
nics.1.security_groups.0.security_group_id: "sg-8fdd88ad" => "" | |
nics.1.security_groups.0.security_group_name: "private-sg-1" => "" | |
nics.1.state: "in-use" => "<computed>" | |
nics.1.subnet_id: "subnet-08fdb6a2" => "<computed>" | |
os_family: "" => "" | |
placement_subregion_name: "eu-west-2a" => "eu-west-2a" | |
placement_tenancy: "default" => "default" | |
private_dns_name: "ip-10-0-0-123.eu-west-2.compute.internal" => "ip-10-0-0-123.eu-west-2.compute.internal" | |
private_ip: "10.0.0.123" => "10.0.0.123" | |
product_codes.#: "1" => "1" | |
product_codes.0: "0001" => "0001" | |
public_dns_name: "" => "" | |
public_ip: "" => "" | |
request_id: "f27c6258-20ec-42fc-94c7-b37ac8d26288" => "f27c6258-20ec-42fc-94c7-b37ac8d26288" | |
reservation_id: "r-118fa2f2" => "r-118fa2f2" | |
root_device_name: "/dev/sda1" => "/dev/sda1" | |
root_device_type: "ebs" => "ebs" | |
security_groups.#: "1" => "1" | |
security_groups.0.security_group_id: "sg-8fdd88ad" => "sg-8fdd88ad" | |
security_groups.0.security_group_name: "private-sg-1" => "private-sg-1" | |
state: "running" => "running" | |
state_reason: "" => "" | |
subnet_id: "subnet-08fdb6a2" => "subnet-08fdb6a2" | |
tags.#: "0" => "0" | |
user_data: "" => "" | |
vm_id: "i-a51987b2" => "i-a51987b2" | |
vm_initiated_shutdown_behavior: "stop" => "stop" | |
vm_type: "c4.large" => "c4.large" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"nics": { | |
Type: schema.TypeSet, | |
Optional: true, | |
Computed: true, | |
Set: func(v interface{}) int { | |
var buf bytes.Buffer | |
m := v.(map[string]interface{}) | |
buf.WriteString(fmt.Sprintf("%d-", m["device_number"].(int))) | |
buf.WriteString(fmt.Sprintf("%s-", m["nic_id"].(string))) | |
return hashcode.String(buf.String()) | |
}, | |
Elem: &schema.Resource{ | |
Schema: map[string]*schema.Schema{ | |
"delete_on_vm_deletion": { | |
Type: schema.TypeBool, | |
Optional: true, | |
Computed: true, | |
}, | |
"description": { | |
Type: schema.TypeString, | |
Computed: true, | |
Optional: true, | |
}, | |
"device_number": { | |
Type: schema.TypeInt, | |
Computed: true, | |
Optional: true, | |
}, | |
"nic_id": { | |
Type: schema.TypeString, | |
Optional: true, | |
Computed: true, | |
}, | |
"private_ips": { | |
Type: schema.TypeSet, | |
Optional: true, | |
Computed: true, | |
Elem: &schema.Resource{ | |
Schema: map[string]*schema.Schema{ | |
"is_primary": { | |
Type: schema.TypeBool, | |
Optional: true, | |
Computed: true, | |
}, | |
"link_public_ip": { | |
Type: schema.TypeSet, | |
Computed: true, | |
Elem: &schema.Resource{ | |
Schema: map[string]*schema.Schema{ | |
"public_dns_name": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
"public_ip": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
"public_ip_account_id": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
}, | |
}, | |
}, | |
"private_dns_name": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
"private_ip": { | |
Type: schema.TypeString, | |
Optional: true, | |
Computed: true, | |
}, | |
}, | |
}, | |
}, | |
"secondary_private_ip_count": { | |
Type: schema.TypeInt, | |
Optional: true, | |
Computed: true, | |
}, | |
"account_id": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
"is_source_dest_checked": { | |
Type: schema.TypeBool, | |
Computed: true, | |
}, | |
"subnet_id": { | |
Type: schema.TypeString, | |
Computed: true, | |
Optional: true, | |
}, | |
"link_nic": { | |
Type: schema.TypeList, | |
MaxItems: 1, | |
Computed: true, | |
Elem: &schema.Resource{ | |
Schema: map[string]*schema.Schema{ | |
"delete_on_vm_deletion": { | |
Type: schema.TypeBool, | |
Computed: true, | |
}, | |
"device_number": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
"link_nic_id": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
"state": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
}, | |
}, | |
}, | |
"link_public_ip": { | |
Type: schema.TypeSet, | |
Computed: true, | |
Elem: &schema.Resource{ | |
Schema: map[string]*schema.Schema{ | |
"public_dns_name": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
"public_ip": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
"public_ip_account_id": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
}, | |
}, | |
}, | |
"mac_address": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
"net_id": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
"private_dns_name": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
"security_group_ids": { | |
Type: schema.TypeList, | |
Optional: true, | |
Elem: &schema.Schema{Type: schema.TypeString}, | |
}, | |
"security_groups": { | |
Type: schema.TypeList, | |
Computed: true, | |
Elem: &schema.Resource{ | |
Schema: map[string]*schema.Schema{ | |
"security_group_id": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
"security_group_name": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
}, | |
}, | |
}, | |
"state": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, | |
}, | |
}, | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment