Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource/container_group: add registry credential (#1529)
* Added imageRegistryCredentials to container group * Update docs to add image_registry_credentials * Added test and fixes from pr #1509 * Fix up review feedback * Further tests and tweaks * Reverting the LinuxBasic test Tests pass: ``` $ acctests azurerm TestAccAzureRMContainerGroup_linuxBasic === RUN TestAccAzureRMContainerGroup_linuxBasic --- PASS: TestAccAzureRMContainerGroup_linuxBasic (86.67s) === RUN TestAccAzureRMContainerGroup_linuxBasicUpdate --- PASS: TestAccAzureRMContainerGroup_linuxBasicUpdate (107.92s) PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 194.641s ```
- Loading branch information
1 parent
d04b82c
commit fe9975d
Showing
4 changed files
with
299 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
resource "azurerm_resource_group" "aci-rg" { | ||
name = "aci-test-creds" | ||
location = "west us" | ||
} | ||
|
||
resource "azurerm_container_group" "aci-test" { | ||
name = "my-aci-hw" | ||
location = "${azurerm_resource_group.aci-rg.location}" | ||
resource_group_name = "${azurerm_resource_group.aci-rg.name}" | ||
ip_address_type = "public" | ||
os_type = "linux" | ||
|
||
image_registry_credential { | ||
server = "hub.docker.com" | ||
username = "yourusername1" | ||
password = "yourpassword" | ||
} | ||
|
||
image_registry_credential { | ||
server = "2hub.docker.com" | ||
username = "2yourusername1" | ||
password = "2yourpassword" | ||
} | ||
|
||
container { | ||
name = "hw" | ||
image = "microsoft/aci-helloworld:latest" | ||
cpu = "0.5" | ||
memory = "1.5" | ||
port = "80" | ||
} | ||
|
||
container { | ||
name = "sidecar" | ||
image = "microsoft/aci-tutorial-sidecar" | ||
cpu = "0.5" | ||
memory = "1.5" | ||
} | ||
|
||
tags { | ||
environment = "testing" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters