diff --git a/Content/resource-correspondence.csv b/Content/resource-correspondence.csv index 46f7863..255ac75 100644 --- a/Content/resource-correspondence.csv +++ b/Content/resource-correspondence.csv @@ -89,6 +89,7 @@ outscale/resource_outscale_load_balancer_policy.go, CreateLoadBalancerPolicy outscale/resource_outscale_load_balancer_vms.go, RegisterVmsInLoadBalancer outscale/resource_outscale_load_balancer.go, CreateLoadBalancer + outscale/resource_outscale_main_route_table_link.go, LinkRouteTable outscale/resource_outscale_nat_service.go, CreateNatService outscale/resource_outscale_net_access_point.go, CreateNetAccessPoint outscale/resource_outscale_net_attributes.go, UpdateNet diff --git a/Content/resources/main_route_table_link-addprop.yaml b/Content/resources/main_route_table_link-addprop.yaml new file mode 100644 index 0000000..8a639fb --- /dev/null +++ b/Content/resources/main_route_table_link-addprop.yaml @@ -0,0 +1,11 @@ +argument: + rename: + subnet_id: + name: net_id + description: "The ID of the Net." +attribute: + add: + default_route_table_id: The ID of the default route table. + main: If true, the route table is the main one. + route_table_id: The ID of the route table. + net_id: The ID of the Net. \ No newline at end of file diff --git a/Content/resources/main_route_table_link-example.md b/Content/resources/main_route_table_link-example.md new file mode 100644 index 0000000..e2c839c --- /dev/null +++ b/Content/resources/main_route_table_link-example.md @@ -0,0 +1,24 @@ +### Required resources + +```hcl +resource "outscale_net" "net01" { + ip_range = "10.0.0.0/16" +} + +resource "outscale_subnet" "subnet01" { + net_id = outscale_net.net01.net_id + ip_range = "10.0.0.0/18" +} +resource "outscale_route_table" "route_table01" { + net_id = outscale_net.net01.net_id +} +``` + +### Link a main route table + +```hcl +resource "outscale_main_route_table_link" "main" { + net_id = outscale_net.net01.net_id + route_table_id = outscale_route_table.route_table01.route_table_id +} +``` \ No newline at end of file diff --git a/Content/resources/main_route_table_link-intro.md b/Content/resources/main_route_table_link-intro.md new file mode 100644 index 0000000..9795322 --- /dev/null +++ b/Content/resources/main_route_table_link-intro.md @@ -0,0 +1,2 @@ + +~> **Note:** On Net creation, the OUTSCALE API always creates an initial main route table. The `main_route_table_link`resource records the ID of the inital route table under the `default_route_table_id` attribute. The "Destroy" action for a `main_route_table_link` consists of resetting the original route table as the main route table for the Net. The additional route table must remain intact in order for the `main_route_table_link` destroy to work properly. \ No newline at end of file diff --git a/Content/resources/vm-example.md b/Content/resources/vm-example.md index bfa0247..d4f02c9 100644 --- a/Content/resources/vm-example.md +++ b/Content/resources/vm-example.md @@ -117,7 +117,9 @@ resource "outscale_vm" "vm03" { } ``` -### Create a VM with a NIC +### Create a VM with a primary NIC + +~> **Note:** If you plan to use the `outscale_nic_link`resource, it is recommended to specify the `primary_nic` argument to define the primary network interface of a VM. ```hcl resource "outscale_net" "net02" { @@ -150,4 +152,43 @@ resource "outscale_vm" "vm04" { device_number = "0" } } +``` + +### Create a VM with secondary NICs + +```hcl +resource "outscale_net" "net02" { + ip_range = "10.0.0.0/16" + tags { + key = "name" + value = "terraform-net-for-vm-with-nic" + } +} + +resource "outscale_subnet" "subnet02" { + net_id = outscale_net.net02.net_id + ip_range = "10.0.0.0/24" + subregion_name = "eu-west-2a" + tags { + key = "name" + value = "terraform-subnet-for-vm-with-nic" + } +} +resource "outscale_nic" "nic01" { + subnet_id = outscale_subnet.subnet02.subnet_id +} + +resource "outscale_vm" "vm04" { + image_id = var.image_id + vm_type = "c4.large" + keypair_name = var.keypair_name + nics { + nic_id = outscale_nic.nic01.nic_id + device_number = "0" + } + nics { + nic_id = outscale_nic.nic02.nic_id + device_number = "1" + } +} ``` \ No newline at end of file diff --git a/Content/resources/vm-intro.md b/Content/resources/vm-intro.md new file mode 100644 index 0000000..7a510a4 --- /dev/null +++ b/Content/resources/vm-intro.md @@ -0,0 +1 @@ +~> **Important** Consider using the `primary_nic` argument if you plan to use the `outscale_nic_link`resource. \ No newline at end of file diff --git a/Content/variables.csv b/Content/variables.csv index 313b7ee..849eec1 100644 --- a/Content/variables.csv +++ b/Content/variables.csv @@ -22,6 +22,7 @@ load_balancer_policy,a,load balancer policy,load balancer policies,https://docs. load_balancer_vm_health,a,load balancer VM health,the health of one or more back-end VMs registered with a specific load balancer,https://docs.outscale.com/en/userguide/About-Load-Balancers.html,https://docs.outscale.com/api#readvmshealth load_balancer_vms,a,load balancer VM,load balancer VMs,https://docs.outscale.com/en/userguide/About-Load-Balancers.html,https://docs.outscale.com/api#3ds-outscale-api-loadbalancer load_balancer,a,load balancer,load balancers,https://docs.outscale.com/en/userguide/About-Load-Balancers.html,https://docs.outscale.com/api#3ds-outscale-api-loadbalancer +main_route_table_link,a,main route table link,main route table links,https://docs.outscale.com/en/userguide/About-Route-Tables.html,https://docs.outscale.com/api#3ds-outscale-api-routetable nat_service,a,NAT service,NAT services,https://docs.outscale.com/en/userguide/About-NAT-Gateways.html,https://docs.outscale.com/api#3ds-outscale-api-natservice net_access_point_service,a,Net access point service,Net access point services,https://docs.outscale.com/en/userguide/About-VPC-Endpoints.html,https://docs.outscale.com/api#3ds-outscale-api-netaccesspoint net_access_point,a,Net access point,Net access points,https://docs.outscale.com/en/userguide/About-VPC-Endpoints.html,https://docs.outscale.com/api#3ds-outscale-api-netaccesspoint diff --git a/osc-api b/osc-api index 95f1cc9..cad0d47 160000 --- a/osc-api +++ b/osc-api @@ -1 +1 @@ -Subproject commit 95f1cc9c67809a64e2b3814ceea2b7383c08fa1e +Subproject commit cad0d472c931ace8759e417dcf89c36acf5146e6 diff --git a/osc-api-deploy b/osc-api-deploy index 1278d7f..48ad5d9 160000 --- a/osc-api-deploy +++ b/osc-api-deploy @@ -1 +1 @@ -Subproject commit 1278d7fe17d37199afe3daf72ad354fb96deb449 +Subproject commit 48ad5d9b54e37847b0fddbe3a7e4737ec20909bb