exec.azurerm.containerinstance.container¶
Azure Resource Manager (ARM) Container Instance Execution Module
New in version 3.0.0.
maintainer: | |
---|---|
configuration: | This module requires Azure Resource Manager credentials to be passed as keyword arguments to every function or via acct in order to work properly. Required provider parameters:
Optional provider parameters: cloud_environment: Used to point the cloud driver to different API endpoints, such as Azure GovCloud. Possible values:
|
-
idem_azurerm.exec.azurerm.containerinstance.container.
execute_command
(hub, ctx, name, container_group, resource_group, command='/bin/bash', terminal_size_cols=None, terminal_size_rows=20, **kwargs)¶ New in version 3.0.0.
Creates an interactive shell for a specific container instance in a specified resource group and container group.
Azure Container Instances currently only support launching a single process and you cannot pass command arguments. For example, you cannot chain commands like in
sh -c "echo FOO && echo BAR"
or executeecho FOO
.Parameters: - name – The name of the container instance.
- container_group – The name of the container group.
- resource_group – The name of the resource group to which the container group belongs.
- command – The command to be executed. Defaults to “/bin/bash” but will generally only be shells like “/bin/sh” or “cmd.exe” otherwise. Once ACI supports arguments, we can change this module to support non-interactive commands.
- terminal_size_cols – The column size of the terminal. If not provided, your current terminal size will be used.
- terminal_size_rows – The row size of the terminal.
CLI Example:
azurerm.containerinstance.container.execute_command container containergroup resourcegroup
-
idem_azurerm.exec.azurerm.containerinstance.container.
list_logs
(hub, ctx, name, container_group, resource_group, tail=None, **kwargs)¶ New in version 3.0.0.
Get the logs for a specified container instance in a specified resource group and container group.
Parameters: - name – The name of the container instance.
- container_group – The name of the container group.
- resource_group – The name of the resource group to which the container group belongs.
- tail – The number of lines to show from the tail of the container instance log. If not provided, all available logs are shown up to 4mb.
CLI Example:
azurerm.containerinstance.container.list_logs container containergroup resourcegroup