Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for azurerm_kubernetes_cluster OMS Agent Identity export #7056

Merged
merged 1 commit into from May 25, 2020

Conversation

aristosvo
Copy link
Collaborator

@aristosvo aristosvo commented May 22, 2020

Fixes #6998

Acceptance test results:

--- PASS: TestAccAzureRMKubernetesCluster_addonProfileOMS (1077.69s)
--- PASS: TestAccAzureRMKubernetesCluster_addonProfileOMSToggle (2157.25s)
--- PASS: TestAccDataSourceAzureRMKubernetesCluster_addOnProfileOMS (1092.76s)

Example of implemented TerraForm config

Resource

resource "azurerm_role_assignment" "aks-mmp" {
  scope                = ${var.random_scope}
  role_definition_name = ${var.random_role_definition_name}
  principal_id         = azurerm_kubernetes_cluster.aks.addon_profile.0.oms_agent.0.oms_agent_identity.0.client_id
}

Data Source

resource "azurerm_role_assignment" "aks-mmp" {
  scope                = ${var.random_scope}
  role_definition_name = ${var.random_role_definition_name}
  principal_id         = data.azurerm_kubernetes_cluster.aks.addon_profile.0.oms_agent.0.oms_agent_identity.0.client_id
}

Naming considerations

I would have preferred identity over oms_agent_identy, but to avoid confusion with the already present identity block in the documentation I stuck with oms_agent_identity.

Copy link
Member

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for this @aristosvo

@tombuildsstuff
Copy link
Member

Acceptance Tests pass:

Screenshot 2020-05-25 at 13 22 04

@tombuildsstuff tombuildsstuff merged commit b532b12 into hashicorp:master May 25, 2020
@tombuildsstuff tombuildsstuff added this to the v2.12.0 milestone May 25, 2020
tombuildsstuff added a commit that referenced this pull request May 25, 2020
@ghost
Copy link

ghost commented May 28, 2020

This has been released in version 2.12.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.12.0"
}
# ... other configuration ...

pbrit pushed a commit to pbrit/terraform-provider-azurerm that referenced this pull request May 31, 2020
@ghost
Copy link

ghost commented Jun 24, 2020

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for azurerm_kubernetes_cluster omsagent identity export
2 participants