-
Notifications
You must be signed in to change notification settings - Fork 8
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
[WIP] AWS Connection #417
Closed
Closed
[WIP] AWS Connection #417
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "materialize_connection_aws Resource - terraform-provider-materialize" | ||
subcategory: "" | ||
description: |- | ||
An Amazon Web Services (AWS) connection provides Materialize with access to an Identity and Access Management (IAM) user or role in your AWS account. | ||
--- | ||
|
||
# materialize_connection_aws (Resource) | ||
|
||
An Amazon Web Services (AWS) connection provides Materialize with access to an Identity and Access Management (IAM) user or role in your AWS account. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Create a AWS Connection | ||
resource "materialize_connection_aws" "example_connection" { | ||
name = "example_connection" | ||
schema_name = "public" | ||
access_key_id = "foo" | ||
secret_access_key = "bar" | ||
} | ||
|
||
# CREATE CONNECTION example_connection TO AWS WITH ( | ||
# ACCESS_KEY_ID = 'foo', | ||
# SECRET_ACCESS_KEY = 'bar' | ||
# ); | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The identifier for the connection. | ||
|
||
### Optional | ||
|
||
- `access_key_id` (Block List, Max: 1) The access key ID to connect with.. Can be supplied as either free text using `text` or reference to a secret object using `secret`. (see [below for nested schema](#nestedblock--access_key_id)) | ||
- `assume_role_arn` (String) The Amazon Resource Name (ARN) of the IAM role to assume. | ||
- `assume_role_session_name` (String) The session name to use when assuming the role. | ||
- `comment` (String) **Private Preview** Comment on an object in the database. | ||
- `database_name` (String) The identifier for the connection database. Defaults to `MZ_DATABASE` environment variable if set or `materialize` if environment variable is not set. | ||
- `endpoint` (String) Override the default AWS endpoint URL. | ||
- `ownership_role` (String) The owernship role of the object. | ||
- `region` (String) The AWS region to connect to. | ||
- `schema_name` (String) The identifier for the connection schema. Defaults to `public`. | ||
- `secret_access_key` (Block List, Max: 1) The secret access key corresponding to the specified access key ID. (see [below for nested schema](#nestedblock--secret_access_key)) | ||
- `session_token` (Block List, Max: 1) The session token corresponding to the specified access key ID.. Can be supplied as either free text using `text` or reference to a secret object using `secret`. (see [below for nested schema](#nestedblock--session_token)) | ||
- `validate` (Boolean) **Private Preview** If the connection should wait for validation. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `qualified_sql_name` (String) The fully qualified name of the connection. | ||
|
||
<a id="nestedblock--access_key_id"></a> | ||
### Nested Schema for `access_key_id` | ||
|
||
Optional: | ||
|
||
- `secret` (Block List, Max: 1) The `access_key_id` secret value. Conflicts with `text` within this block. (see [below for nested schema](#nestedblock--access_key_id--secret)) | ||
- `text` (String, Sensitive) The `access_key_id` text value. Conflicts with `secret` within this block | ||
|
||
<a id="nestedblock--access_key_id--secret"></a> | ||
### Nested Schema for `access_key_id.secret` | ||
|
||
Required: | ||
|
||
- `name` (String) The access_key_id name. | ||
|
||
Optional: | ||
|
||
- `database_name` (String) The access_key_id database name. Defaults to `MZ_DATABASE` environment variable if set or `materialize` if environment variable is not set. | ||
- `schema_name` (String) The access_key_id schema name. Defaults to `public`. | ||
|
||
|
||
|
||
<a id="nestedblock--secret_access_key"></a> | ||
### Nested Schema for `secret_access_key` | ||
|
||
Required: | ||
|
||
- `name` (String) The secret_access_key name. | ||
|
||
Optional: | ||
|
||
- `database_name` (String) The secret_access_key database name. Defaults to `MZ_DATABASE` environment variable if set or `materialize` if environment variable is not set. | ||
- `schema_name` (String) The secret_access_key schema name. Defaults to `public`. | ||
|
||
|
||
<a id="nestedblock--session_token"></a> | ||
### Nested Schema for `session_token` | ||
|
||
Optional: | ||
|
||
- `secret` (Block List, Max: 1) The `session_token` secret value. Conflicts with `text` within this block. (see [below for nested schema](#nestedblock--session_token--secret)) | ||
- `text` (String, Sensitive) The `session_token` text value. Conflicts with `secret` within this block | ||
|
||
<a id="nestedblock--session_token--secret"></a> | ||
### Nested Schema for `session_token.secret` | ||
|
||
Required: | ||
|
||
- `name` (String) The session_token name. | ||
|
||
Optional: | ||
|
||
- `database_name` (String) The session_token database name. Defaults to `MZ_DATABASE` environment variable if set or `materialize` if environment variable is not set. | ||
- `schema_name` (String) The session_token schema name. Defaults to `public`. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
#Connections can be imported using the connection id: | ||
terraform import materialize_connection_aws.example <region>:<connection_id> | ||
|
||
# Connection id and information be found in the `mz_catalog.mz_connections` table | ||
# The region is the region where the database is located (e.g. aws/us-east-1) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#Connections can be imported using the connection id: | ||
terraform import materialize_connection_aws.example <region>:<connection_id> | ||
|
||
# Connection id and information be found in the `mz_catalog.mz_connections` table | ||
# The region is the region where the database is located (e.g. aws/us-east-1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Create a AWS Connection | ||
resource "materialize_connection_aws" "example_connection" { | ||
name = "example_connection" | ||
schema_name = "public" | ||
access_key_id = "foo" | ||
secret_access_key = "bar" | ||
} | ||
|
||
# CREATE CONNECTION example_connection TO AWS WITH ( | ||
# ACCESS_KEY_ID = 'foo', | ||
# SECRET_ACCESS_KEY = 'bar' | ||
# ); |
2 changes: 1 addition & 1 deletion
2
examples/resources/materialize_connection_aws_privatelink/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#/bin/bash | ||
set -x | ||
|
||
awslocal iam create-user --user-name terraform | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any aws CLI commands needed for localstack setup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Including localstack with iam service for integration testing. Will be able to calibrate more when the DDL is enabled in the image.