{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/3132","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/3132/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/3132/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/3132/events","html_url":"https://github.com/hashicorp/terraform/pull/3132","id":104130137,"number":3132,"title":"Add Kubernetes provider","user":{"login":"radeksimko","id":287584,"avatar_url":"https://avatars.githubusercontent.com/u/287584?v=3","gravatar_id":"","url":"https://api.github.com/users/radeksimko","html_url":"https://github.com/radeksimko","followers_url":"https://api.github.com/users/radeksimko/followers","following_url":"https://api.github.com/users/radeksimko/following{/other_user}","gists_url":"https://api.github.com/users/radeksimko/gists{/gist_id}","starred_url":"https://api.github.com/users/radeksimko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radeksimko/subscriptions","organizations_url":"https://api.github.com/users/radeksimko/orgs","repos_url":"https://api.github.com/users/radeksimko/repos","events_url":"https://api.github.com/users/radeksimko/events{/privacy}","received_events_url":"https://api.github.com/users/radeksimko/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/enhancement","name":"enhancement","color":"d4c5f9"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/wip","name":"wip","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-08-31T20:40:40Z","updated_at":"2015-09-01T21:58:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/3132","html_url":"https://github.com/hashicorp/terraform/pull/3132","diff_url":"https://github.com/hashicorp/terraform/pull/3132.diff","patch_url":"https://github.com/hashicorp/terraform/pull/3132.patch"},"body":"### Status (TL;DR)\r\n\r\n - [x] `kubernetes_limit_range` resource + acceptance test\r\n - [x] `kubernetes_namespace` resource + acceptance test\r\n - [x] `kubernetes_persistent_volume` resource + acceptance test\r\n - [x] `kubernetes_persistent_volume_claim` resource + acceptance test\r\n - [x] `kubernetes_pod` resource + acceptance test\r\n - [x] `kubernetes_replication_controller` resource + acceptance test\r\n - [x] `kubernetes_resource_quota` resource + acceptance test\r\n - [x] `kubernetes_service` resource + acceptance test\r\n - [x] Docs - up to date\r\n - [x] Example\r\n - [ ] Decide between `KUBERNETES_CLIENT_CERTIFICATE` / `KUBERNETES_CLIENT_CERTIFICATE_PATH` etc.\r\n - [ ] Support `kubernetes_namespace.finalizers`\r\n - [ ] Detect default/undefined fields and ignore these when generating diffs\r\n  - [ ] `kubernetes_limit_range`\r\n  - [ ] `kubernetes_persistent_volume`\r\n  - [ ] `kubernetes_pod`\r\n  - [ ] `kubernetes_replication_controller`\r\n  - [ ] `kubernetes_service`\r\n\r\n### Config ENV vars (w/ and w/out `_PATH`)\r\n\r\nI think the config options should stay as are (accepting keys & crts contents as strings) to provide direct compatibility w/ `google_container_engine`, yet allowing people to use `file()`. This is however less convenient for ENV variables since keys & certs are typically multi-line strings and that's a bit tricky to handle in ENV vars. Hence I guess `_PATH` with some extra logic to read files wins here, but I'll leave this open for a while.\r\n\r\n### `schema.CompareFunc` - Why\r\n\r\nCreation / deletion of all resources works aok, but the problem is that K8S server returns specs with some extra attributes that we have not defined when sending it to the API originally and these are often not predictable (e.g. node IP address).\r\n\r\nI experimented with a few ideas. I decided not to strip attributes inside state (via `StateFunc`), because I still think that user should be able to reference the real spec from server elsewhere. Hence I created `schema.CompareFunc` and I'm now trying to come up with a meaningful/universal way of stripping attributes that user has not defined in the given spec, so that we can only compare what **has** been defined, yet still save the original spec into state.\r\n\r\n### Mind the test suite\r\n\r\nIt will also demonstrate the issue with spec as described above.\r\n```\r\n$ make testacc TEST=./builtin/providers/kubernetes 2>/dev/null\r\n```\r\n\r\ncc @sparkprime @lwander "},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/136876386","html_url":"https://github.com/hashicorp/terraform/pull/3132#issuecomment-136876386","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/3132","id":136876386,"user":{"login":"radeksimko","id":287584,"avatar_url":"https://avatars.githubusercontent.com/u/287584?v=3","gravatar_id":"","url":"https://api.github.com/users/radeksimko","html_url":"https://github.com/radeksimko","followers_url":"https://api.github.com/users/radeksimko/followers","following_url":"https://api.github.com/users/radeksimko/following{/other_user}","gists_url":"https://api.github.com/users/radeksimko/gists{/gist_id}","starred_url":"https://api.github.com/users/radeksimko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radeksimko/subscriptions","organizations_url":"https://api.github.com/users/radeksimko/orgs","repos_url":"https://api.github.com/users/radeksimko/repos","events_url":"https://api.github.com/users/radeksimko/events{/privacy}","received_events_url":"https://api.github.com/users/radeksimko/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T21:58:10Z","updated_at":"2015-09-01T21:58:10Z","body":"I know that things like arrays won't be addressable in any generic way (I will have to be resource-specific in filtering arrays), but everything else could be."}}