diff --git a/Content/resource-correspondence.csv b/Content/resource-correspondence.csv index 255ac75..da5e8fa 100644 --- a/Content/resource-correspondence.csv +++ b/Content/resource-correspondence.csv @@ -115,7 +115,7 @@ outscale/resource_outscale_virtual_gateway_route_propagation.go, UpdateRoutePropagation outscale/resource_outscale_virtual_gateway.go, CreateVirtualGateway outscale/resource_outscale_vm.go, CreateVms - outscale/resource_outscale_volumes_link.go, LinkVolume + outscale/resource_outscale_volume_link.go, LinkVolume outscale/resource_outscale_volume.go, CreateVolume outscale/resource_outscale_vpn_connection_route.go, CreateVpnConnectionRoute outscale/resource_outscale_vpn_connection.go, CreateVpnConnection \ No newline at end of file diff --git a/Content/resources/flexible_gpu_link-addprop.yaml b/Content/resources/flexible_gpu_link-addprop.yaml new file mode 100644 index 0000000..1a1e1ac --- /dev/null +++ b/Content/resources/flexible_gpu_link-addprop.yaml @@ -0,0 +1,5 @@ +argument: + rename: + flexible_gpu_id: + name: flexible_gpu_ids + description: (Required) The ID of one or more fGPUs you want to attach. \ No newline at end of file diff --git a/Content/resources/flexible_gpu_link-example.md b/Content/resources/flexible_gpu_link-example.md index 544a776..8b1ab71 100644 --- a/Content/resources/flexible_gpu_link-example.md +++ b/Content/resources/flexible_gpu_link-example.md @@ -19,7 +19,7 @@ resource "outscale_flexible_gpu" "flexible_gpu01" { ```hcl resource "outscale_flexible_gpu_link" "link_fgpu01" { - flexible_gpu_id = outscale_flexible_gpu.flexible_gpu01.flexible_gpu_id + flexible_gpu_ids = [outscale_flexible_gpu.flexible_gpu01.flexible_gpu_id] vm_id = outscale_vm.vm01.vm_id } ``` \ No newline at end of file diff --git a/Content/resources/nic-example.md b/Content/resources/nic-example.md index 007fb6b..8ebe173 100644 --- a/Content/resources/nic-example.md +++ b/Content/resources/nic-example.md @@ -23,6 +23,7 @@ resource "outscale_security_group" "security_group01" { ```hcl resource "outscale_nic" "nic01" { subnet_id = outscale_subnet.subnet01.subnet_id + security_group_ids = [outscale_security_group.security_group01.security_group_id] } ``` diff --git a/Content/resources/vm-addprop.yaml b/Content/resources/vm-addprop.yaml index dd40753..66458b4 100644 --- a/Content/resources/vm-addprop.yaml +++ b/Content/resources/vm-addprop.yaml @@ -6,6 +6,16 @@ argument: - placement - bsu_optimized add: + block_device_mappings: | + (Optional) One or more block device mappings. + * `bsu` - Information about the BSU volume to create. + * `delete_on_vm_deletion` - (Optional) By default or if set to true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM. + * `iops` - (Optional) The number of I/O operations per second (IOPS). This parameter must be specified only if you create an `io1` volume. The maximum number of IOPS allowed for `io1` volumes is `13000` with a maximum performance ratio of 300 IOPS per gibibyte. + * `snapshot_id` - (Optional) The ID of the snapshot used to create the volume. + * `volume_size` - (Optional) The size of the volume, in gibibytes (GiB). + * `tags`- One or more tags associated with the VM. + * `key`- The key of the tag with a minimum of 1 character. + * `value` - The value of the tag, between 0 and 255 characters. get_admin_password: "(Optional) (Windows VM only) If true, waits for the administrator password of the VM to become available in order to retrieve the VM. The password is exported to the `admin_password` attribute." nics: | (Optional) One or more NICs. If you specify this parameter, you must not specify the `subnet_id` and `subregion_name` parameters. To define a NIC as the primary network interface of the VM, use the `primary_nic` argument. @@ -40,7 +50,11 @@ argument: rename: performance: description: "The performance of the VM (`medium` | `high` | `highest`). Updating this parameter will trigger a stop/start of the VM." - security_groups: security_group_names + security_group_ids: + description: "One or more IDs of security group for the VMs. You must specify at least one of the following parameters: `security_group_ids` or `security_group_names`." + security_groups: + name: security_group_names + description: "One or more names of security groups for the VMs. You must specify at least one of the following parameters: `security_group_ids` or `security_group_names`." user_data: description: "Data or script used to add a specific configuration to the VM. It must be Base64-encoded, either directly or using the [base64encode](https://www.terraform.io/docs/configuration/functions/base64encode.html) Terraform function. For multiline strings, use a [heredoc syntax](https://www.terraform.io/docs/configuration/expressions.html#string-literals). Updating this parameter will trigger a stop/start of the VM." vm_type: diff --git a/Content/resources/vm-example.md b/Content/resources/vm-example.md index d4f02c9..a554142 100644 --- a/Content/resources/vm-example.md +++ b/Content/resources/vm-example.md @@ -9,11 +9,16 @@ resource "outscale_keypair" "keypair01" { ### Create a VM in the public Cloud ```hcl +resource "outscale_security_group" "security_group01" { + description = "vm security group" + security_group_name = "vm_security_group1" +} + resource "outscale_vm" "vm01" { image_id = var.image_id vm_type = var.vm_type keypair_name = var.keypair_name - security_group_ids = [var.security_group_id] + security_group_ids = [outscale_security_group.security_group01.security_group_id] placement_subregion_name = "eu-west-2a" placement_tenancy = "default" tags { @@ -30,10 +35,16 @@ resource "outscale_vm" "vm01" { ### Create a VM with block device mappings ```hcl +resource "outscale_security_group" "security_group01" { + description = "vm security group" + security_group_name = "vm_security_group1" +} + resource "outscale_vm" "vm02" { image_id = var.image_id vm_type = var.vm_type keypair_name = var.keypair_name + security_group_ids = [outscale_security_group.security_group01.security_group_id] block_device_mappings { device_name = "/dev/sda1" # /dev/sda1 corresponds to the root device of the VM bsu { @@ -52,6 +63,32 @@ resource "outscale_vm" "vm02" { } } } + + +resource "outscale_security_group" "security_group01" { + description = "vm security group" + security_group_name = "vm_security_group1" +} + +resource "outscale_vm" "vm02" { + image_id = var.image_id + vm_type = var.vm_type + keypair_name = var.keypair_name + security_group_ids = [outscale_security_group.security_group01.security_group_id] + block_device_mappings { + device_name = "/dev/sdb" + bsu { + volume_size = 30 + volume_type = "gp2" + snapshot_id = outscale_snapshot.snapshot.id + delete_on_vm_deletion = false + tags { + key = "Name" + value = "bsu-tags-gp2" + } + } + } +} ``` ### Create a VM in a Net with a network @@ -122,6 +159,11 @@ resource "outscale_vm" "vm03" { ~> **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_security_group" "security_group01" { + description = "vm security group" + security_group_name = "vm_security_group1" +} + resource "outscale_net" "net02" { ip_range = "10.0.0.0/16" tags { @@ -144,9 +186,10 @@ resource "outscale_nic" "nic01" { } resource "outscale_vm" "vm04" { - image_id = var.image_id - vm_type = "c4.large" - keypair_name = var.keypair_name + image_id = var.image_id + vm_type = "c4.large" + keypair_name = var.keypair_name + security_group_ids = [outscale_security_group.security_group01.security_group_id] primary_nic { nic_id = outscale_nic.nic01.nic_id device_number = "0" @@ -157,6 +200,11 @@ resource "outscale_vm" "vm04" { ### Create a VM with secondary NICs ```hcl +resource "outscale_security_group" "security_group01" { + description = "vm security group" + security_group_name = "vm_security_group1" +} + resource "outscale_net" "net02" { ip_range = "10.0.0.0/16" tags { @@ -179,9 +227,10 @@ resource "outscale_nic" "nic01" { } resource "outscale_vm" "vm04" { - image_id = var.image_id - vm_type = "c4.large" - keypair_name = var.keypair_name + image_id = var.image_id + vm_type = "c4.large" + keypair_name = var.keypair_name + security_group_ids = [outscale_security_group.security_group01.security_group_id] nics { nic_id = outscale_nic.nic01.nic_id device_number = "0" diff --git a/Content/resources/volumes_link-addprop.yaml b/Content/resources/volume_link-addprop.yaml similarity index 100% rename from Content/resources/volumes_link-addprop.yaml rename to Content/resources/volume_link-addprop.yaml diff --git a/Content/resources/volumes_link-example.md b/Content/resources/volume_link-example.md similarity index 89% rename from Content/resources/volumes_link-example.md rename to Content/resources/volume_link-example.md index 2f57bbd..fa6f05b 100644 --- a/Content/resources/volumes_link-example.md +++ b/Content/resources/volume_link-example.md @@ -17,7 +17,7 @@ resource "outscale_vm" "vm01" { ### Link a volume to a VM ```hcl -resource "outscale_volumes_link" "volumes_link01" { +resource "outscale_volume_link" "volumes_link01" { device_name = "/dev/xvdc" volume_id = outscale_volume.volume01.id vm_id = outscale_vm.vm01.id diff --git a/Content/resources/volumes_link-import.md b/Content/resources/volume_link-import.md similarity index 55% rename from Content/resources/volumes_link-import.md rename to Content/resources/volume_link-import.md index d11bb79..35017b9 100644 --- a/Content/resources/volumes_link-import.md +++ b/Content/resources/volume_link-import.md @@ -4,6 +4,6 @@ A volume link can be imported using a volume ID. For example: ```console -$ terraform import outscale_volumes_link.ImportedVolumeLink vol-12345678 +$ terraform import outscale_volume_link.ImportedVolumeLink vol-12345678 ``` \ No newline at end of file diff --git a/Content/variables.csv b/Content/variables.csv index 849eec1..8417379 100644 --- a/Content/variables.csv +++ b/Content/variables.csv @@ -57,6 +57,6 @@ vm_state,a,VM state,VM states,https://docs.outscale.com/en/userguide/About-Insta vm_type,a,VM type,VM types,https://docs.outscale.com/en/userguide/Instance-Types.html,https://docs.outscale.com/api#readvmtypes vm,a,virtual machine (VM),virtual machines (VMs),https://docs.outscale.com/en/userguide/About-Instances.html,https://docs.outscale.com/api#3ds-outscale-api-vm volume,a,volume,volumes,https://docs.outscale.com/en/userguide/About-Volumes.html,https://docs.outscale.com/api#3ds-outscale-api-volume -volumes_link,a,volume link,volume links,https://docs.outscale.com/en/userguide/About-Volumes.html,https://docs.outscale.com/api#3ds-outscale-api-volume +volume_link,a,volume link,volume links,https://docs.outscale.com/en/userguide/About-Volumes.html,https://docs.outscale.com/api#3ds-outscale-api-volume vpn_connection_route,a,VPN connection route,VPN connection routes,https://docs.outscale.com/en/userguide/About-Routing-Configuration-for-VPN-Connections.html,https://docs.outscale.com/api#3ds-outscale-api-vpnconnection vpn_connection,a,VPN connection,VPN connections,https://docs.outscale.com/en/userguide/About-VPN-Connections.html,https://docs.outscale.com/api#3ds-outscale-api-vpnconnection \ No newline at end of file