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

[ISSUE] AWS S3 Mount does not use cluster_id during plan #585

Closed
theesen opened this issue Apr 1, 2021 · 1 comment
Closed

[ISSUE] AWS S3 Mount does not use cluster_id during plan #585

theesen opened this issue Apr 1, 2021 · 1 comment

Comments

@theesen
Copy link

theesen commented Apr 1, 2021

Terraform Version

Terraform v0.12.30

  • provider.aws v3.32.0
  • provider.databricks v0.3.2

Affected Resource(s)

Please list the resources as a list, for example:

  • databricks_aws_s3_mount

Terraform Configuration Files

resource "databricks_aws_s3_mount" "generic" {
  for_each = toset(var.buckets)

  cluster_id       = "999"
  instance_profile = "some_instance_profile"
  s3_bucket_name   = each.key
  mount_name       = "data/${replace(each.key, "/[^0-9A-Za-z_]/", "_")}"
}

Debug Output

  # module.mountpoints.databricks_aws_s3_mount.generic["com.my.bucket"] must be replaced
-/+ resource "databricks_aws_s3_mount" "generic" {
      ~ cluster_id       = "123" -> "999" # forces replacement
      ~ id               = "com.my.bucket" -> (known after apply)
        instance_profile = "arn:aws:iam::XXXXX:instance-profile/databricks-shared-instance-profile"
        mount_name       = "data/com.my.bucket"
        s3_bucket_name   = "com.my.bucket"
      ~ source           = "s3a://com.my.bucket" -> (known after apply)
    }

Cluster ID: 999 is the ID of the actual cluster I would like the mount to use, while 123 is the ID of a temporary cluster that is auto created by the terraform plan.

Expected Behavior

Mounting should happen on the provided cluster_id during terraform plan & apply.

Actual Behavior

A new cluster is being launched every time terraform plan is executed.

Steps to Reproduce

  1. Create a mountpoint using a cluster_id with terraform.
  2. Rerun the same terraform plan without any changes.
  3. Terraform will plan and apply the changes on a different cluster then specified (In my example on 123 instead of 999)
@nfx
Copy link
Contributor

nfx commented Apr 1, 2021

will be fixed in #497

@nfx nfx closed this as completed Apr 1, 2021
@databricks databricks locked and limited conversation to collaborators Apr 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants