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`.
This commit is contained in:
Sean Chittenden 2017-02-17 13:36:38 -08:00 committed by GitHub
parent 7352be49de
commit 3127998ecd
2 changed files with 3 additions and 25 deletions

View File

@ -86,9 +86,7 @@ const (
) )
const ( const (
agentSelfRetryJoinAWSAccessKeyID = "access_key_id"
agentSelfRetryJoinAWSRegion = "region" agentSelfRetryJoinAWSRegion = "region"
agentSelfRetryJoinAWSSecretAccessKey = "secret_access_key"
agentSelfRetryJoinAWSTagKey = "tag_key" agentSelfRetryJoinAWSTagKey = "tag_key"
agentSelfRetryJoinAWSTagValue = "tag_value" agentSelfRetryJoinAWSTagValue = "tag_value"
) )
@ -568,16 +566,6 @@ func dataSourceConsulAgentSelf() *schema.Resource {
Type: schema.TypeString, Type: schema.TypeString,
Computed: true, 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) 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 { if err := d.Set(agentSelfRetryJoinEC2, m); err != nil {
return errwrap.Wrapf(fmt.Sprintf("Unable to set %s: {{err}}", agentSelfRetryJoinEC2), err) return errwrap.Wrapf(fmt.Sprintf("Unable to set %s: {{err}}", agentSelfRetryJoinEC2), err)
} }

View File

@ -127,9 +127,7 @@ The following attributes are exported:
### Retry Join EC2 Attributes ### 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) * [`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_key`](https://www.consul.io/docs/agent/options.html#tag_key)
* [`tag_value`](https://www.consul.io/docs/agent/options.html#tag_value) * [`tag_value`](https://www.consul.io/docs/agent/options.html#tag_value)