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

Container Service: Exposing the Master's FDQN #125

Merged
merged 1 commit into from Jun 23, 2017

Conversation

tombuildsstuff
Copy link
Member

Exposing the FQDN of the Container Service Master

Fixes #112

Sample config:

resource "azurerm_resource_group" "test" {
  name     = "tharvey-test"
  location = "West US"
}

resource "azurerm_container_service" "test" {
  name                   = "tharvey-cs"
  location               = "${azurerm_resource_group.test.location}"
  resource_group_name    = "${azurerm_resource_group.test.name}"
  orchestration_platform = "DCOS"

  master_profile {
    count      = 1
    dns_prefix = "tharveymaster"
  }

  linux_profile {
    admin_username = "acctestuser1"

    ssh_key {
      key_data = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+L2NxRIfQ781rxV6Iq5jSav6b2Q8z5KiseOlvKA/RF2wqU0UPYqQviQhLmW6THTpmrv/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+5N2Ta6UYH3lsDf9R9wTP2K/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+7HTcWfdu0qQqPWY5ujyMw/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt terraform@demo.tld"
    }
  }

  agent_pool_profile {
    name       = "default"
    count      = 1
    dns_prefix = "tharveyagent"
    vm_size    = "Standard_A0"
  }

  diagnostics_profile {
    enabled = false
  }

  tags {
    Environment = "Production"
  }
}

output "master_fqdn" {
  value = "${lookup(azurerm_container_service.test.master_profile[0], "fqdn")}"
}

output "agents_fqdn" {
  value = "${lookup(azurerm_container_service.test.agent_pool_profile[0], "fqdn")}"
}

Outputs:

$ envchain azurerm terraform apply
azurerm_resource_group.test: Refreshing state... (ID: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tharvey-test)
azurerm_container_service.test: Refreshing state... (ID: /subscriptions/00000000-0000-0000-0000-...erService/containerServices/tharvey-cs)

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

agents_fqdn = tharveyagent.westus.cloudapp.azure.com
master_fqdn = tharveymaster.westus.cloudapp.azure.com

@mbfrahry
Copy link
Member

LGTM

@tombuildsstuff tombuildsstuff merged commit 32d30ec into master Jun 23, 2017
@tombuildsstuff tombuildsstuff deleted the containerservice-fqdn branch June 23, 2017 16:41
tombuildsstuff added a commit that referenced this pull request Jun 23, 2017
tombuildsstuff added a commit that referenced this pull request Jul 4, 2017
Container Service: Exposing the Master's FDQN
tombuildsstuff added a commit that referenced this pull request Jul 4, 2017
@ghost
Copy link

ghost commented Apr 1, 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 Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants