{"action":"closed","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/7552","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/7552/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/7552/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/7552/events","html_url":"https://github.com/hashicorp/terraform/issues/7552","id":164501771,"number":7552,"title":"Azure sg not opening port","user":{"login":"jonathan-kosgei","id":6712914,"avatar_url":"https://avatars.githubusercontent.com/u/6712914?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathan-kosgei","html_url":"https://github.com/jonathan-kosgei","followers_url":"https://api.github.com/users/jonathan-kosgei/followers","following_url":"https://api.github.com/users/jonathan-kosgei/following{/other_user}","gists_url":"https://api.github.com/users/jonathan-kosgei/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathan-kosgei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathan-kosgei/subscriptions","organizations_url":"https://api.github.com/users/jonathan-kosgei/orgs","repos_url":"https://api.github.com/users/jonathan-kosgei/repos","events_url":"https://api.github.com/users/jonathan-kosgei/events{/privacy}","received_events_url":"https://api.github.com/users/jonathan-kosgei/received_events","type":"User","site_admin":false},"labels":[{"id":217303714,"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/azure","name":"provider/azure","color":"bfdadc","default":false},{"id":85946961,"url":"https://api.github.com/repos/hashicorp/terraform/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-07-08T10:21:51Z","updated_at":"2016-12-04T02:39:54Z","closed_at":"2016-12-04T02:39:54Z","body":"I have the the following ingress node\n\n```\nresource \"azure_instance\" \"ingresscontroller\" {\n    name = \"sc-ingress-${count.index}\"\n    hosted_service_name = \"sc-ingress-${count.index}\"\n    image = \"Ubuntu Server 15.10\"\n    size = \"Basic_A0\"\n    storage_service_name = \"${azure_storage_service.sc-storage.name}\"\n    location = \"East US\"\n    virtual_network = \"${azure_virtual_network.sc-virtual-network.id}\"\n    subnet = \"nat\"\n    username = \"jonathan\"\n    ssh_key_thumbprint = \"${var.ssh_key_thumbprint}\"\n    security_group = \"${azure_security_group.ingress.name}\"\n    count = \"1\"\n    endpoint {\n        name = \"SSH\"\n        protocol = \"tcp\"\n        public_port = 22\n        private_port = 22\n    }\n    endpoint {\n        name = \"Kubelet\"\n        protocol = \"tcp\"\n        public_port = 10250\n        private_port = 10250\n    }\n    endpoint {\n        name = \"Calico TCP\"\n        protocol = \"tcp\"\n        public_port = 179\n        private_port = 179\n    }\n    endpoint {\n        name = \"Calico UDP\"\n        protocol = \"udp\"\n        public_port = 179\n        private_port = 179\n    }\n    endpoint {\n        name = \"HTTP\"\n        protocol = \"tcp\"\n        public_port = 80\n        private_port = 80\n    }\n    endpoint {\n        name = \"HTTPS\"\n        protocol = \"tcp\"\n        public_port = 443\n        private_port = 443\n    }\n}\n```\n\nWith the following security group rules:\n\n```\nresource \"azure_security_group\" \"ingress\" {\n    name = \"ingress\"\n    location = \"East US\"\n}\n\nresource \"azure_security_group_rule\" \"kubeminions_inbound\" {\n    name = \"kubeminions_cluster-access-rule\"\n    security_group_names = [\"${azure_security_group.kubeminions.name}\", \"${azure_security_group.ingress.name}\"]\n    type = \"Inbound\"\n    action = \"Allow\"\n    priority = 207\n    source_address_prefix = \"172.1.1.0/24\"\n    source_port_range = \"*\"\n    destination_address_prefix = \"172.1.2.0/24\"\n    destination_port_range = \"*\"\n    protocol = \"TCP\"\n}\n\nresource \"azure_security_group_rule\" \"kubeminions_outbound\" {\n    name = \"kubeminions_cluster-access-rule\"\n    security_group_names = [\"${azure_security_group.kubeminions.name}\", \"${azure_security_group.ingress.name}\"]\n    type = \"Outbound\"\n    action = \"Allow\"\n    priority = 208\n    source_address_prefix = \"172.1.1.0/24\"\n    source_port_range = \"*\"\n    destination_address_prefix = \"172.1.2.0/24\"\n    destination_port_range = \"*\"\n    protocol = \"TCP\"\n}\n\nresource \"azure_security_group_rule\" \"kubeminions_inbound_udp\" {\n    name = \"kubeminions_cluster-access-rule\"\n    security_group_names = [\"${azure_security_group.kubeminions.name}\", \"${azure_security_group.ingress.name}\"]\n    type = \"Inbound\"\n    action = \"Allow\"\n    priority = 209\n    source_address_prefix = \"172.1.1.0/24\"\n    source_port_range = \"*\"\n    destination_address_prefix = \"172.1.2.0/24\"\n    destination_port_range = \"*\"\n    protocol = \"UDP\"\n}\n\nresource \"azure_security_group_rule\" \"ingress_http\" {\n    name = \"ingress_node-inbound-access-rule\"\n    security_group_names = [\"${azure_security_group.ingress.name}\"]\n    type = \"Inbound\"\n    action = \"Allow\"\n    priority = 214\n    source_address_prefix = \"*\"\n    source_port_range = \"*\"\n    destination_address_prefix = \"*\"\n    destination_port_range = \"*\"\n    protocol = \"TCP\"\n}\n\nresource \"azure_security_group_rule\" \"ingress_http_outbound\" {\n    name = \"ingress_node-inbound-access-rule\"\n    security_group_names = [\"${azure_security_group.ingress.name}\"]\n    type = \"Outbound\"\n    action = \"Allow\"\n    priority = 215\n    source_address_prefix = \"*\"\n    source_port_range = \"*\"\n    destination_address_prefix = \"*\"\n    destination_port_range = \"*\"\n    protocol = \"TCP\"\n}\n```\n\nAfter the node is successfully created I install nginx with:\n`sudo apt-get install nginx`\n\nI can then curl nginx at 127.0.0.1 , at the internal ip 172.1.0.4 but not at the public ip or the dns name which is where I need to access it from.\n### Terraform Version\n\n`Terraform v0.6.16`\n### Affected Resource(s)\n- azure instance\n- azure_security_group\n### Expected Behavior\n\nI should be able to curl nginx at the ingress node's public ip address\n"}}
{"actor":{"display_login":"mitchellh"}}