From ab5df329f96a55eb93159ea84a1d5c558fcac12d Mon Sep 17 00:00:00 2001 From: "aurelien.moreira" Date: Wed, 7 Feb 2024 15:33:50 +0000 Subject: [PATCH] DOC-4215: Added and removed parameters + added example --- .../data-sources/security_group-addprop.yaml | 4 +++- Content/resources/vm-addprop.yaml | 24 +++++++++++++++++++ Content/resources/vm-example.md | 2 +- Content/resources/volume-addprop.yaml | 1 + Content/resources/volume-example.md | 14 ++++++++++- 5 files changed, 42 insertions(+), 3 deletions(-) diff --git a/Content/data-sources/security_group-addprop.yaml b/Content/data-sources/security_group-addprop.yaml index cf4cf9b..e42d677 100644 --- a/Content/data-sources/security_group-addprop.yaml +++ b/Content/data-sources/security_group-addprop.yaml @@ -4,4 +4,6 @@ argument: name: filter description: "(Optional) A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:" filter.tags: - description: "The key/value combinations of the tags associated with the security groups, in the following format: `TAGKEY=TAGVALUE`." \ No newline at end of file + description: "The key/value combinations of the tags associated with the security groups, in the following format: `TAGKEY=TAGVALUE`." + remove: + - account_ids \ No newline at end of file diff --git a/Content/resources/vm-addprop.yaml b/Content/resources/vm-addprop.yaml index a5855e8..dd40753 100644 --- a/Content/resources/vm-addprop.yaml +++ b/Content/resources/vm-addprop.yaml @@ -7,8 +7,32 @@ argument: - bsu_optimized add: 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. + * `delete_on_vm_deletion` - (Optional) If true, the NIC is deleted when the VM is terminated. You can specify this parameter only for a new NIC. To modify this value for an existing NIC, see [UpdateNic](https://docs.outscale.com/api#updatenic). + * `description` - (Optional) The description of the NIC, if you are creating a NIC when creating the VM. + * `device_number` - (Optional) The index of the VM device for the NIC attachment (between `1` and `7`, both included). This parameter is required if you create a NIC when creating the VM. + * `nic_id` - (Optional) The ID of the NIC, if you are attaching an existing NIC when creating a VM. + * `private_ips` - (Optional) One or more private IPs to assign to the NIC, if you create a NIC when creating a VM. Only one private IP can be the primary private IP. + * `is_primary` - (Optional) If true, the IP is the primary private IP of the NIC. + * `private_ip` - (Optional) The private IP of the NIC. + * `secondary_private_ip_count` - (Optional) The number of secondary private IPs, if you create a NIC when creating a VM. This parameter cannot be specified if you specified more than one private IP in the `private_ips` parameter. + * `security_group_ids` - (Optional) One or more IDs of security groups for the NIC, if you create a NIC when creating a VM. + * `subnet_id` - (Optional) The ID of the Subnet for the NIC, if you create a NIC when creating a VM. This parameter is required if you create a NIC when creating the VM. placement_subregion_name: (Optional) The name of the Subregion where the VM is placed. placement_tenancy: (Optional) The tenancy of the VM (`default` | `dedicated`). + primary_nic: | + (Optional) The primary network interface of the VM. + * `delete_on_vm_deletion` - (Optional) If true, the NIC is deleted when the VM is terminated. You can specify this parameter only for a new NIC. To modify this value for an existing NIC, see [UpdateNic](https://docs.outscale.com/api#updatenic). + * `description` - (Optional) The description of the NIC, if you are creating a NIC when creating the VM. + * `device_number` - (Optional) The index of the VM device for the NIC attachment (must be `0`). This parameter is required if you create a NIC when creating the VM. + * `nic_id` - (Optional) The ID of the NIC, if you are attaching an existing NIC when creating a VM. + * `private_ips` - (Optional) One or more private IPs to assign to the NIC, if you create a NIC when creating a VM. Only one private IP can be the primary private IP. + * `is_primary` - (Optional) If true, the IP is the primary private IP of the NIC. + * `private_ip` - (Optional) The private IP of the NIC. + * `secondary_private_ip_count` - (Optional) The number of secondary private IPs, if you create a NIC when creating a VM. This parameter cannot be specified if you specified more than one private IP in the `private_ips` parameter. + * `security_group_ids` - (Optional) One or more IDs of security groups for the NIC, if you create a NIC when creating a VM. + * `subnet_id` - (Optional) The ID of the Subnet for the NIC, if you create a NIC when creating a VM. This parameter is required if you create a NIC when creating the VM. state: The state of the VM (`running` | `stopped`). If set to `stopped`, the VM is stopped regardless of the value of the `vm_initiated_shutdown_behavior` argument. tags: (Optional) A tag to add to this resource. You can specify this argument several times. tags.key: (Required) The key of the tag, with a minimum of 1 character. diff --git a/Content/resources/vm-example.md b/Content/resources/vm-example.md index f19b346..bfa0247 100644 --- a/Content/resources/vm-example.md +++ b/Content/resources/vm-example.md @@ -145,7 +145,7 @@ resource "outscale_vm" "vm04" { image_id = var.image_id vm_type = "c4.large" keypair_name = var.keypair_name - nics { + primary_nic { nic_id = outscale_nic.nic01.nic_id device_number = "0" } diff --git a/Content/resources/volume-addprop.yaml b/Content/resources/volume-addprop.yaml index eeec716..ad5ed07 100644 --- a/Content/resources/volume-addprop.yaml +++ b/Content/resources/volume-addprop.yaml @@ -3,6 +3,7 @@ argument: tags: (Optional) A tag to add to this resource. You can specify this argument several times. tags.key: (Required) The key of the tag, with a minimum of 1 character. tags.value: (Required) The value of the tag, between 0 and 255 characters. + termination_snapshot_name: (Optional) Whether you want to create a snapshot before the volume deletion. attribute: rename: iops: diff --git a/Content/resources/volume-example.md b/Content/resources/volume-example.md index efa2944..f16a661 100644 --- a/Content/resources/volume-example.md +++ b/Content/resources/volume-example.md @@ -1,3 +1,5 @@ +### Creating an io1 volume + ```hcl resource "outscale_volume" "volume01" { subregion_name = "${var.region}a" @@ -5,4 +7,14 @@ resource "outscale_volume" "volume01" { iops = 100 volume_type = "io1" } -``` \ No newline at end of file +``` + +### Creating a snapshot before volume deletion + +```hcl +resource "outscale_volume" "volume01" { + termination_snapshot_name = "deleting_volume_snap" + subregion_name = "${var.region}a" + size = 40 +} +`````` \ No newline at end of file