Skip to content

Conversation

@bobbyiliev
Copy link
Contributor

@bobbyiliev bobbyiliev commented May 29, 2023

Adding an example demo on how to use the Materialize terraform provider alongside the Vault provider.

image

@bobbyiliev bobbyiliev requested review from dehume, joacoc and morsapaes May 29, 2023 17:33
@bobbyiliev bobbyiliev marked this pull request as ready for review May 29, 2023 17:33
Copy link
Contributor

@morsapaes morsapaes left a comment

Choose a reason for hiding this comment

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

It's so cool to see this work! Thanks for working on it, @bobbyiliev. Left some suggestions, mostly around style and language.

Copy link
Contributor

@morsapaes morsapaes left a comment

Choose a reason for hiding this comment

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

It's so cool to see this work! Thanks for working on it, @bobbyiliev. Left some suggestions, mostly around style and language.

Open a new terminal and export the `VAULT_ADDR`:

```bash
export VAULT_ADDR='http://127.0.0.1:8200'
Copy link
Contributor

Choose a reason for hiding this comment

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

I found this a little confusing since VAULT_ADDR is not used anywhere within the Terraform setup. Should we assume they already know how to sue Vault and have a secret?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just to make sure that they create the secret in the locally running vault rather than their production one. The Vault address is defined on line 83.

Open to suggestions if we should remove the Interacting with Vault section cc @morsapaes

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe the guide should assume users have a Vault in place that they want to read secrets from? This could also make it easier to include examples for multiple external stores using different providers in the same "demo".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we decide to do that, I can go ahead and close this PR as it is mainly focused on HashiCorp vault and it would be easier to start from scratch and build a more agnostic guide,

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not do that! We can make it agnostic when (or if) we add another example.

Copy link
Contributor Author

@bobbyiliev bobbyiliev May 31, 2023

Choose a reason for hiding this comment

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

I've put together a list of some of the vaults that we might want to include besides HashiCorp Vault and also have official Terraform providers:

Not sure if we want to include these, but they also have Terraform providers:

It should be straightforward to build such a guide as it will essentially be just a reference to each specific provider docs and on the Materialize side, it is just a single secret resource.

Any other suggestions are also welcome!

# Create a Postgres Connection
resource "materialize_connection_postgres" "example_postgres_connection" {
name = "example_postgres_connection"
host = "instance.foo000.us-west-1.rds.amazonaws.com"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these be var as well to note what configurations would be user specific?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if this will be useful for this specific example, the user might not have a Postgres instance on hand?

bobbyiliev and others added 20 commits May 30, 2023 16:15
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
bobbyiliev and others added 17 commits May 30, 2023 16:30
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
Co-authored-by: Marta Paes <marta.paes.moreira@gmail.com>
@bobbyiliev bobbyiliev merged commit cc2bebe into main Aug 1, 2023
@bobbyiliev bobbyiliev deleted the hashicorp-vault-tf-provider branch August 1, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants