Skip to content

Commit

Permalink
azurerm_container_group: ensure all properties are for new (#3380)
Browse files Browse the repository at this point in the history
  • Loading branch information
katbyte authored May 5, 2019
1 parent 33d2e93 commit f2cde3b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
3 changes: 3 additions & 0 deletions azurerm/resource_arm_container_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func resourceArmContainerGroup() *schema.Resource {
Type: schema.TypeList,
Optional: true,
MinItems: 1,
ForceNew: true,
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.NoZeroValues,
Expand Down Expand Up @@ -279,6 +280,7 @@ func resourceArmContainerGroup() *schema.Resource {
"command": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
Deprecated: "Use `commands` instead.",
},
Expand All @@ -287,6 +289,7 @@ func resourceArmContainerGroup() *schema.Resource {
Type: schema.TypeList,
Optional: true,
Computed: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
},

Expand Down
42 changes: 21 additions & 21 deletions website/docs/r/container_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,25 @@ The following arguments are supported:

* `diagnostics` - (Optional) A `diagnostics` block as documented below.

* `dns_name_label` - (Optional) The DNS label/name for the container groups IP.
* `dns_name_label` - (Optional) The DNS label/name for the container groups IP. Changing this forces a new resource to be created.

* `ip_address_type` - (Optional) Specifies the ip address type of the container. `Public` is the only acceptable value at this time. Changing this forces a new resource to be created.

* `image_registry_credential` - (Optional) A `image_registry_credential` block as documented below.
* `image_registry_credential` - (Optional) A `image_registry_credential` block as documented below. Changing this forces a new resource to be created.

* `restart_policy` - (Optional) Restart policy for the container group. Allowed values are `Always`, `Never`, `OnFailure`. Defaults to `Always`.
* `restart_policy` - (Optional) Restart policy for the container group. Allowed values are `Always`, `Never`, `OnFailure`. Defaults to `Always`. Changing this forces a new resource to be created.

* `tags` - (Optional) A mapping of tags to assign to the resource.
* `tags` - (Optional) A mapping of tags to assign to the resource. Changing this forces a new resource to be created.

---

An `identity` block supports the following:

* `type` - (Required) The Managed Service Identity Type of this container group. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you), `UserAssigned` where you can specify the Service Principal IDs in the `identity_ids` field, and `SystemAssigned, UserAssigned` which assigns both a system managed identity as well as the specified user assigned identities.
* `type` - (Required) The Managed Service Identity Type of this container group. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you), `UserAssigned` where you can specify the Service Principal IDs in the `identity_ids` field, and `SystemAssigned, UserAssigned` which assigns both a system managed identity as well as the specified user assigned identities. Changing this forces a new resource to be created.

~> **NOTE:** When `type` is set to `SystemAssigned`, identity the Principal ID can be retrieved after the container group has been created. See [documentation](https://docs.microsoft.com/en-us/azure/active-directory/managed-service-identity/overview) for more information.

* `identity_ids` - (Optional) Specifies a list of user managed identity ids to be assigned. Required if `type` is `UserAssigned`.
* `identity_ids` - (Optional) Specifies a list of user managed identity ids to be assigned. Required if `type` is `UserAssigned`. Changing this forces a new resource to be created.

---

Expand All @@ -107,7 +107,7 @@ A `container` block supports:

* `memory` - (Required) The required memory of the containers in GB. Changing this forces a new resource to be created.

* `gpu` - (Optional) A `gpu` block as defined below.
* `gpu` - (Optional) A `gpu` block as defined below. Changing this forces a new resource to be created.

~> **Note:** Gpu resources are currently only supported in Linux containers.

Expand All @@ -121,57 +121,57 @@ A `container` block supports:

* `liveness_probe` - (Optional) The definition of a readiness probe for this container as documented in the `liveness_probe` block below. Changing this forces a new resource to be created.

* `command` - (Optional) A command line to be run on the container.
* `command` - (Optional) A command line to be run on the container. Changing this forces a new resource to be created.

~> **NOTE:** The field `command` has been deprecated in favor of `commands` to better match the API.

* `commands` - (Optional) A list of commands which should be run on the container.
* `commands` - (Optional) A list of commands which should be run on the container. Changing this forces a new resource to be created.

* `volume` - (Optional) The definition of a volume mount for this container as documented in the `volume` block below. Changing this forces a new resource to be created.

---

A `diagnostics` block supports:

* `log_analytics` - (Required) A `log_analytics` block as defined below.
* `log_analytics` - (Required) A `log_analytics` block as defined below. Changing this forces a new resource to be created.

---

A `image_registry_credential` block supports:

* `username` - (Required) The username with which to connect to the registry.
* `username` - (Required) The username with which to connect to the registry. Changing this forces a new resource to be created.

* `password` - (Required) The password with which to connect to the registry.
* `password` - (Required) The password with which to connect to the registry. Changing this forces a new resource to be created.

* `server` - (Required) The address to use to connect to the registry without protocol ("https"/"http"). For example: "myacr.acr.io"
* `server` - (Required) The address to use to connect to the registry without protocol ("https"/"http"). For example: "myacr.acr.io". Changing this forces a new resource to be created.

---

A `log_analytics` block supports:

* `log_type` - (Required) The log type which should be used. Possible values are `ContainerInsights` and `ContainerInstanceLogs`.
* `log_type` - (Required) The log type which should be used. Possible values are `ContainerInsights` and `ContainerInstanceLogs`. Changing this forces a new resource to be created.

* `workspace_id` - (Required) The Workspace ID of the Log Analytics Workspace.
* `workspace_id` - (Required) The Workspace ID of the Log Analytics Workspace. Changing this forces a new resource to be created.

* `workspace_key` - (Required) The Workspace Key of the Log Analytics Workspace.
* `workspace_key` - (Required) The Workspace Key of the Log Analytics Workspace. Changing this forces a new resource to be created.

* `metadata` - (Optional) Any metadata required for Log Analytics.
* `metadata` - (Optional) Any metadata required for Log Analytics. Changing this forces a new resource to be created.

---

A `ports` block supports:

* `port` - (Required) The port number the container will expose.
* `port` - (Required) The port number the container will expose. Changing this forces a new resource to be created.

* `protocol` - (Required) The network protocol associated with port. Possible values are `TCP` & `UDP`.
* `protocol` - (Required) The network protocol associated with port. Possible values are `TCP` & `UDP`. Changing this forces a new resource to be created.

--

A `gpu` block supports:

* `count` - (Required) The number of GPUs which should be assigned to this container. Allowed values are `1`, `2`, or `4`.
* `count` - (Required) The number of GPUs which should be assigned to this container. Allowed values are `1`, `2`, or `4`. Changing this forces a new resource to be created.

* `sku` - (Required) The Sku which should be used for the GPU. Possible values are `K80`, `P100`, or `V100`.
* `sku` - (Required) The Sku which should be used for the GPU. Possible values are `K80`, `P100`, or `V100`. Changing this forces a new resource to be created.

---

Expand Down

0 comments on commit f2cde3b

Please sign in to comment.