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

provider/aws: Added support for redshift destination to firehose delivery streams (supersedes #5304) #7375

Merged
merged 11 commits into from
Jun 30, 2016

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Jun 27, 2016

This PR continues #5304 to add support for Redshift as a destination for Kinesis Firehose streams (and opens up the way to support ElasticSearch in the future).

It builds off of #5304 and adds:

  • re-worked Acc tests to confirm remove values
  • converts s3_configuration and redshift_configuration to TypeList; There Can Be Only One™ (of each) so that's fine and it helps with..
  • migrating old state of flat parameters into the nested state of the TypeList:
    role_arn => s3_configuration.0.role_arn
  • provides removal warnings on the old attributes (re-added them as Computed, Removed)

Some of this is mine, but most of it was generously contributed by @dminnear . The reason for opening this new pr was because I had sat on #5304 for a while, waiting for a good time to introduce a backwards incompatible change (which we get in v0.7.0), and I didn't want to ask them to re-work or add a bunch of things after having waited so patiently for so long.

Running acc tests here:


s3Configuration := d.Get("s3_configuration").([]interface{})
if len(s3Configuration) > 1 {
return fmt.Errorf("[ERROR] You can only define a single s3_configuration per delivery stream")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this also true of redshift_configuration?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer need to do this, we can add MaxItems: 1 to the schema for s3_configuration :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 20314ce, yay less code!

}

func createS3Config(d *schema.ResourceData) *firehose.S3DestinationConfiguration {
s3 := d.Get("s3_configuration").([]interface{})[0].(map[string]interface{})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting the types are guaranteed by helper/schema and the length is guaranteed by Required: true + MaxItems: 1

@phinze
Copy link
Contributor

phinze commented Jun 30, 2016

LGTM!

@ghost
Copy link

ghost commented Apr 24, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants