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

Updates to docs, removing unneeded flags, updating buckets #66

Merged
merged 4 commits into from
Jun 4, 2024

Conversation

JDBraun
Copy link
Contributor

@JDBraun JDBraun commented May 23, 2024

This PR address the following issues:

Most notably, the external location and data bucket are no longer required given the fact that catalog isolation has been implemented.

aws/tf/sra.tf Outdated

// Account - Unity Catalog - Data:
enable_read_only_external_location = false // Creates a read-only external location and corresponding IAM role, based on the value of the data_bucket variable
read_only_data_bucket = null // Accepts an S3 path (e.g. "s3://data-bucket")
Copy link
Contributor

Choose a reason for hiding this comment

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

The example in the comment references the bucket URL, but in file uc_external_location.tf, this variable has the s3:// prefix prepended. Just the bucket name works so (e.g. "s3://data-bucket") --> (e.g. "data-bucket")

@JDBraun
Copy link
Contributor Author

JDBraun commented May 23, 2024

@ryan-gord-db - great catch, updated!

@@ -82,6 +81,12 @@ variable "enable_cluster_boolean" {
sensitive = true
}

variable "enable_read_only_external_location" {
description = "Flag to enable read only external location"
Copy link
Contributor

Choose a reason for hiding this comment

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

You mentioned this is a read only, optional bucket, so shouldn't we add a default value of false here that way you don't have to define this variable to use the module?

Copy link
Contributor

Choose a reason for hiding this comment

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

I see its nullable so you can pass in null, but I think that's confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the bucket is provided by the user, so if they decide to bring their own they can flip it to true

let me remove the not nullable part to avoid any downstream errors, so they're either enabling it or not

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, I just mean that the best practice for writing a module being to provide default values for "optional" fields

Right now you have to include a line that sets it to false, which is how we have it structured in the example, but I think best practice is to set default variables here to indicate a true "optional" field

Also to indicate to any readers that that generally we would expect it to be false.

@JDBraun
Copy link
Contributor Author

JDBraun commented May 28, 2024

@metrocavich - updated in new commit, let me know

I took this and applied to all the optional variables of enabling certain features

@metrocavich
Copy link
Contributor

Left a react but forgot to comment, makes a lot more sense to me, thanks for humoring me.

@JDBraun
Copy link
Contributor Author

JDBraun commented Jun 3, 2024

@metrocavich - let me know if you have anything else or will get it merged

@metrocavich
Copy link
Contributor

This looks all fantastic to me now.
Very nice work.

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