From 3127998ecde269338ffc3e1738376f17c483ffe0 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Fri, 17 Feb 2017 13:36:38 -0800 Subject: [PATCH] Remove the AWS Access Key and Secret Access keys from the (#12061) `consul_agent_self` data source. Pro tip: update consul! I was using an old branch of Consul, not `origin/master`. --- .../consul/data_source_consul_agent_self.go | 26 +++---------------- .../consul/d/agent_self.html.markdown | 2 -- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/builtin/providers/consul/data_source_consul_agent_self.go b/builtin/providers/consul/data_source_consul_agent_self.go index a1996a510..c49800bc7 100644 --- a/builtin/providers/consul/data_source_consul_agent_self.go +++ b/builtin/providers/consul/data_source_consul_agent_self.go @@ -86,11 +86,9 @@ const ( ) const ( - agentSelfRetryJoinAWSAccessKeyID = "access_key_id" - agentSelfRetryJoinAWSRegion = "region" - agentSelfRetryJoinAWSSecretAccessKey = "secret_access_key" - agentSelfRetryJoinAWSTagKey = "tag_key" - agentSelfRetryJoinAWSTagValue = "tag_value" + agentSelfRetryJoinAWSRegion = "region" + agentSelfRetryJoinAWSTagKey = "tag_key" + agentSelfRetryJoinAWSTagValue = "tag_value" ) const ( @@ -568,16 +566,6 @@ func dataSourceConsulAgentSelf() *schema.Resource { Type: schema.TypeString, Computed: true, }, - agentSelfRetryJoinAWSAccessKeyID: &schema.Schema{ - Type: schema.TypeString, - Computed: true, - Sensitive: true, - }, - agentSelfRetryJoinAWSSecretAccessKey: &schema.Schema{ - Type: schema.TypeString, - Computed: true, - Sensitive: true, - }, }, }, }, @@ -1189,14 +1177,6 @@ func dataSourceConsulAgentSelfRead(d *schema.ResourceData, meta interface{}) err m[agentSelfRetryJoinAWSTagValue] = v.(string) } - if v, found := ec2Config["AccessKeyID"]; found { - m[agentSelfRetryJoinAWSAccessKeyID] = v.(string) - } - - if v, found := ec2Config["SecretAccessKey"]; found { - m[agentSelfRetryJoinAWSSecretAccessKey] = v.(string) - } - if err := d.Set(agentSelfRetryJoinEC2, m); err != nil { return errwrap.Wrapf(fmt.Sprintf("Unable to set %s: {{err}}", agentSelfRetryJoinEC2), err) } diff --git a/website/source/docs/providers/consul/d/agent_self.html.markdown b/website/source/docs/providers/consul/d/agent_self.html.markdown index c6323cc70..a398b5485 100644 --- a/website/source/docs/providers/consul/d/agent_self.html.markdown +++ b/website/source/docs/providers/consul/d/agent_self.html.markdown @@ -127,9 +127,7 @@ The following attributes are exported: ### Retry Join EC2 Attributes -* [`access_key_id`](https://www.consul.io/docs/agent/options.html#access_key_id) * [`region`](https://www.consul.io/docs/agent/options.html#region) -* [`secret_access_key`](https://www.consul.io/docs/agent/options.html#secret_access_key) * [`tag_key`](https://www.consul.io/docs/agent/options.html#tag_key) * [`tag_value`](https://www.consul.io/docs/agent/options.html#tag_value)