You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> This is a template document. Remember to **remove** all text in _italics_ and **update** Module name, Repo name and links/badges to the acual name of your GitHub repository/module!!!
Terraform module that can create and manage AWS PrivateLink for Snowflake.
26
21
27
-
*_What it does_
28
-
*_What techonlogies it uses_
22
+
This module creates:
29
23
30
-
> **Warning**:
31
-
> _When using "Invicton-Labs/deepmerge/null" module - pin `tflint` version to `v0.41.0` in [pre-commit.yaml](.github/workflows/pre-commit.yml) to avoid failing `tflint` checks_
24
+
* AWS VPC Endpoint
25
+
* Security group and assigns it to the endpoint
26
+
* AWS Route53 private zone and adds needed records inside
32
27
33
28
## USAGE
34
29
35
-
_Example usage of the module - terraform code snippet_
| <aname="input_additional_tag_map"></a> [additional\_tag\_map](#input\_additional\_tag\_map)| Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.<br>This is for some rare cases where resources want additional configuration of tags<br>and therefore take a list of maps with tag key, value, and additional configuration. |`map(string)`|`{}`| no |
68
+
| <aname="input_allow_vpc_cidr"></a> [allow\_vpc\_cidr](#input\_allow\_vpc\_cidr)| Whether allow access to the Snowflake PrivateLink endpoint from the whole VPC |`bool`|`true`| no |
69
+
| <aname="input_allowed_cidrs"></a> [allowed\_cidrs](#input\_allowed\_cidrs)| List of subnet CIDRs that will be allowed to access Snowflake endpoint via PrivateLink |`list(string)`|`[]`| no |
63
70
| <aname="input_attributes"></a> [attributes](#input\_attributes)| ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,<br>in the order they appear in the list. New attributes are appended to the<br>end of the list. The elements of the list are joined by the `delimiter`<br>and treated as a single ID element. |`list(string)`|`[]`| no |
64
71
| <aname="input_context"></a> [context](#input\_context)| Single object for setting entire context at once.<br>See description of individual variables for details.<br>Leave string and numeric variables as `null` to use default value.<br>Individual variable settings (non-null) override settings in context object,<br>except for attributes, tags, and additional\_tag\_map, which are merged. |`any`| <pre>{<br> "additional_tag_map": {},<br> "attributes": [],<br> "delimiter": null,<br> "descriptor_formats": {},<br> "enabled": true,<br> "environment": null,<br> "id_length_limit": null,<br> "label_key_case": null,<br> "label_order": [],<br> "label_value_case": null,<br> "labels_as_tags": [<br> "unset"<br> ],<br> "name": null,<br> "namespace": null,<br> "regex_replace_chars": null,<br> "stage": null,<br> "tags": {},<br> "tenant": null<br>}</pre> | no |
65
72
| <aname="input_delimiter"></a> [delimiter](#input\_delimiter)| Delimiter to be used between ID elements.<br>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. |`string`|`null`| no |
66
73
| <aname="input_descriptor_formats"></a> [descriptor\_formats](#input\_descriptor\_formats)| Describe additional descriptors to be output in the `descriptors` output map.<br>Map of maps. Keys are names of descriptors. Values are maps of the form<br>`{<br> format = string<br> labels = list(string)<br>}`<br>(Type is `any` so the map values can later be enhanced to provide additional options.)<br>`format` is a Terraform format string to be passed to the `format()` function.<br>`labels` is a list of labels, in order, to pass to `format()` function.<br>Label values will be normalized before being passed to `format()` so they will be<br>identical to how they appear in `id`.<br>Default is `{}` (`descriptors` output will be empty). |`any`|`{}`| no |
74
+
| <aname="input_descriptor_name"></a> [descriptor\_name](#input\_descriptor\_name)| Name of the descriptor used to form a resource name |`string`|`"snowflake-privatelink"`| no |
67
75
| <aname="input_enabled"></a> [enabled](#input\_enabled)| Set to false to prevent the module from creating any resources |`bool`|`null`| no |
68
76
| <aname="input_environment"></a> [environment](#input\_environment)| ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' |`string`|`null`| no |
69
-
| <aname="input_example_var"></a> [example\_var](#input\_example\_var)| Example varible passed into the module |`string`| n/a | yes |
70
77
| <aname="input_id_length_limit"></a> [id\_length\_limit](#input\_id\_length\_limit)| Limit `id` to this many characters (minimum 6).<br>Set to `0` for unlimited length.<br>Set to `null` for keep the existing setting, which defaults to `0`.<br>Does not affect `id_full`. |`number`|`null`| no |
71
78
| <aname="input_label_key_case"></a> [label\_key\_case](#input\_label\_key\_case)| Controls the letter case of the `tags` keys (label names) for tags generated by this module.<br>Does not affect keys of tags passed in via the `tags` input.<br>Possible values: `lower`, `title`, `upper`.<br>Default value: `title`. |`string`|`null`| no |
72
79
| <aname="input_label_order"></a> [label\_order](#input\_label\_order)| The order in which the labels (ID elements) appear in the `id`.<br>Defaults to ["namespace", "environment", "stage", "name", "attributes"].<br>You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present. |`list(string)`|`null`| no |
@@ -76,8 +83,10 @@ _Additional information that should be made public, for ex. how to solve known i
76
83
| <aname="input_namespace"></a> [namespace](#input\_namespace)| ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique |`string`|`null`| no |
77
84
| <aname="input_regex_replace_chars"></a> [regex\_replace\_chars](#input\_regex\_replace\_chars)| Terraform regular expression (regex) string.<br>Characters matching the regex will be removed from the ID elements.<br>If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. |`string`|`null`| no |
78
85
| <aname="input_stage"></a> [stage](#input\_stage)| ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' |`string`|`null`| no |
86
+
| <aname="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids)| List of AWS Subnet IDs where Snowflake AWS PrivateLink Endpoint interfaces will be created |`list(string)`| n/a | yes |
79
87
| <aname="input_tags"></a> [tags](#input\_tags)| Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).<br>Neither the tag keys nor the tag values will be modified by this module. |`map(string)`|`{}`| no |
80
88
| <aname="input_tenant"></a> [tenant](#input\_tenant)| ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for |`string`|`null`| no |
89
+
| <aname="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id)| VPC ID where the AWS PrivateLink VPC Endpoint will be created |`string`| n/a | yes |
81
90
82
91
## Modules
83
92
@@ -89,26 +98,38 @@ _Additional information that should be made public, for ex. how to solve known i
89
98
90
99
| Name | Description |
91
100
|------|-------------|
92
-
| <aname="output_example_output"></a> [example\_output](#output\_example\_output)| Example output of the module |
101
+
| <aname="output_dns_private_zone"></a> [dns\_private\_zone](#output\_dns\_private\_zone)| Details of Route53 private hosted zone created for Snowflake PrivateLink |
102
+
| <aname="output_security_group"></a> [security\_group](#output\_security\_group)| Details of security group assigned to Snowflake AWS PrivateLink VPC Endpoint |
103
+
| <aname="output_snowflake_privatelink_ocsp_url"></a> [snowflake\_privatelink\_ocsp\_url](#output\_snowflake\_privatelink\_ocsp\_url)| URL to access Snowflake OCSP endpont using AWS PrivateLink |
104
+
| <aname="output_snowflake_privatelink_url"></a> [snowflake\_privatelink\_url](#output\_snowflake\_privatelink\_url)| URL to access Snowflake using AWS PrivateLink |
|[aws_vpc.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc)| data source |
132
+
|[snowflake_system_get_privatelink_config.this](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/data-sources/system_get_privatelink_config)| data source |
112
133
<!-- END_TF_DOCS -->
113
134
114
135
## CONTRIBUTING
@@ -124,8 +145,8 @@ Apache 2 Licensed. See [LICENSE](LICENSE) for full details.
0 commit comments