|
| 1 | +--- |
| 2 | +subcategory: "Application Operations Management (AOM)" |
| 3 | +layout: "huaweicloud" |
| 4 | +page_title: "HuaweiCloud: huaweicloud_aom_uniagent" |
| 5 | +description: |- |
| 6 | + Manages an AOM UniAgent resource within HuaweiCloud. |
| 7 | +--- |
| 8 | + |
| 9 | +# huaweicloud_aom_uniagent |
| 10 | + |
| 11 | +Manages an AOM UniAgent resource within HuaweiCloud. |
| 12 | + |
| 13 | +-> Destroying resource does not uninstall the UniAgent. |
| 14 | + |
| 15 | +## Example Usage |
| 16 | + |
| 17 | +### Install UniAgent for a host |
| 18 | + |
| 19 | +```hcl |
| 20 | +variable "installer_agent_id" {} |
| 21 | +variable "inner_ip" {} |
| 22 | +variable "account" {} |
| 23 | +variable "password" {} |
| 24 | +
|
| 25 | +resource "huaweicloud_aom_uniagent" "test" { |
| 26 | + installer_agent_id = var.installer_agent_id |
| 27 | + version = "1.1.6" |
| 28 | + public_net_flag = false |
| 29 | + proxy_region_id = 0 |
| 30 | + inner_ip = var.inner_ip |
| 31 | + port = 22 |
| 32 | + account = var.account |
| 33 | + password = var.password |
| 34 | + os_type = "LINUX" |
| 35 | +} |
| 36 | +``` |
| 37 | + |
| 38 | +### Reinstall UniAgent for a host |
| 39 | + |
| 40 | +```hcl |
| 41 | +variable "installer_agent_id" {} |
| 42 | +variable "inner_ip" {} |
| 43 | +variable "account" {} |
| 44 | +variable "password" {} |
| 45 | +variable "agent_id" {} |
| 46 | +
|
| 47 | +resource "huaweicloud_aom_uniagent" "test" { |
| 48 | + installer_agent_id = var.installer_agent_id |
| 49 | + version = "1.1.6" |
| 50 | + public_net_flag = false |
| 51 | + proxy_region_id = 0 |
| 52 | + agent_id = var.agent_id |
| 53 | + inner_ip = var.inner_ip |
| 54 | + port = 22 |
| 55 | + account = var.account |
| 56 | + password = var.password |
| 57 | + os_type = "LINUX" |
| 58 | +} |
| 59 | +``` |
| 60 | + |
| 61 | +## Argument Reference |
| 62 | + |
| 63 | +The following arguments are supported: |
| 64 | + |
| 65 | +* `region` - (Optional, String, ForceNew) Specifies the region in which to create the resource. |
| 66 | + If omitted, the provider-level region will be used. Changing this creates a new resource. |
| 67 | + |
| 68 | +* `installer_agent_id` - (Required, String, NonUpdatable) Specifies the installer agent ID. |
| 69 | + |
| 70 | +* `version` - (Required, String) Specifies the UniAgent version to be installed. |
| 71 | + |
| 72 | + -> When updating the `version`, `agent_id` must be specified. |
| 73 | + |
| 74 | +* `public_net_flag` - (Required, Bool, NonUpdatable) Specifies the whether to use public network access. |
| 75 | + |
| 76 | +* `proxy_region_id` - (Required, Int, NonUpdatable) Specifies the proxy region ID. |
| 77 | + + Specifies it as **0** to use the direct access. |
| 78 | + + Specifies it as specific proxy region ID to use the proxy access. |
| 79 | + |
| 80 | +* `inner_ip` - (Required, String, NonUpdatable) Specifies the IP of the host where the UniAgent will be installed. |
| 81 | + |
| 82 | +* `port` - (Required, String, NonUpdatable) Specifies the login port of the host where the UniAgent will be installed. |
| 83 | + |
| 84 | +* `account` - (Required, String, NonUpdatable) Specifies the login account of the host where the UniAgent will be |
| 85 | + installed. |
| 86 | + |
| 87 | +* `password` - (Required, String, NonUpdatable) Specifies the login password of the host where the UniAgent will be |
| 88 | + installed. |
| 89 | + |
| 90 | +* `os_type` - (Required, String, NonUpdatable) Specifies the OS type of the host where the UniAgent will be installed. |
| 91 | + |
| 92 | +* `agent_id` - (Optional, String) Specifies the agent ID of the host where the UniAgent will be installed. |
| 93 | + |
| 94 | + -> If you are reinstalling the UniAgent or updating the UniAgent version, `agent_id` must specified. |
| 95 | + |
| 96 | +* `vpc_id` - (Optional, String, NonUpdatable) Specifies the VPC ID of the host where the UniAgent will be installed. |
| 97 | + |
| 98 | +* `coc_cmdb_id` - (Optional, String, NonUpdatable) Specifies the COC CMDB ID of the host where the UniAgent will be |
| 99 | + installed. |
| 100 | + |
| 101 | +* `icagent_install_flag` - (Optional, Bool, NonUpdatable) Specifies whether to install ICAgent. Defaults to **false**. |
| 102 | + |
| 103 | +* `icagent_install_version` - (Optional, String, NonUpdatable) Specifies the ICAgent version to be installed. |
| 104 | + If it's not specified and `icagent_install_flag` is **true**, install the latest version by default. |
| 105 | + |
| 106 | +* `access_key` - (Optional, String, NonUpdatable) Specifies the access key of the IAM account where the host ICAgent is |
| 107 | + not installed. |
| 108 | + |
| 109 | +* `secret_key` - (Optional, String, NonUpdatable) Specifies the secret key of the IAM account where the host ICAgent is |
| 110 | + not installed. |
| 111 | + |
| 112 | + -> AK/SK is required only when installing the older version of ICAgent. |
| 113 | + |
| 114 | +## Attribute Reference |
| 115 | + |
| 116 | +In addition to all arguments above, the following attributes are exported: |
| 117 | + |
| 118 | +* `id` - The resource ID in UUID format. |
0 commit comments