Skip to content

Commit

Permalink
DOC-4269: Update osc-api and addprops to 1.28.7
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelienmoreira committed Apr 5, 2024
1 parent 8fcab83 commit 3967410
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 3 deletions.
1 change: 1 addition & 0 deletions Content/resource-correspondence.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions Content/resources/main_route_table_link-addprop.yaml
Original file line number Diff line number Diff line change
@@ -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.
24 changes: 24 additions & 0 deletions Content/resources/main_route_table_link-example.md
Original file line number Diff line number Diff line change
@@ -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
}
```
2 changes: 2 additions & 0 deletions Content/resources/main_route_table_link-intro.md
Original file line number Diff line number Diff line change
@@ -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.
43 changes: 42 additions & 1 deletion Content/resources/vm-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -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"
}
}
```
1 change: 1 addition & 0 deletions Content/resources/vm-intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
~> **Important** Consider using the `primary_nic` argument if you plan to use the `outscale_nic_link`resource.
1 change: 1 addition & 0 deletions Content/variables.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion osc-api

0 comments on commit 3967410

Please sign in to comment.