Terraform-provider-azurerm: Support for azurerm_container_group - mounting a Git repo to a container instance.

Created on 23 Jul 2020  ·  7Comments  ·  Source: terraform-providers/terraform-provider-azurerm

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Trying to create an Azure Container Group/Instances using Terraform. I see that it's possible to mount a GitRepo using Azure CLI but I do not see any reference for Terraform. Please feel free to advise, if I missed something.

New or Affected Resource(s)

  • azurerm_container_group

Potential Terraform Configuration

resource "azurerm_container_group" "example" {
name = "${var.prefix}-packer"
location = "${azurerm_resource_group.example.location}"
resource_group_name = "${azurerm_resource_group.example.name}"
ip_address_type = "public"
os_type = "linux"

container {
name = "packer-demo"
image = "hashicorp/packer:full-1.6.0"
cpu = "1"
memory = "1.5"
port = "80"
protocol = "tcp"

volume {
  name       = "packer"
  mount_path = "/code/packer"
  read_only  = false
  git_repo_url = "<url> "    <--- new

}

}

References

https://www.terraform.io/docs/providers/azurerm/r/container_group.html#volume
https://docs.microsoft.com/en-us/azure/container-instances/container-instances-volume-gitrepo

enhancement serviccontainer-group

Most helpful comment

@benhurjoel I have submited a PR, hope it could unblock you soon

All 7 comments

@benhurjoel I have submited a PR, hope it could unblock you soon

@njuCZ Thank you and looking forward to it.

+1 that would be great to have

+1 please add this for us!!

This has been released in version 2.34.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.34.0"
}
# ... other configuration ...

Thank you folks! Appreciate it.

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings