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

Count option for oci_file_storage_export.export_options #747

Closed
tyskjohan opened this issue Apr 5, 2019 · 6 comments
Closed

Count option for oci_file_storage_export.export_options #747

tyskjohan opened this issue Apr 5, 2019 · 6 comments

Comments

@tyskjohan
Copy link

Terraform Version

Terraform v0.11.11

  • provider.oci v3.16.0

OCI Provider Version

  • provider.oci v3.16.0

Description:

It would be great if the export_options of oci_file_storage_export could accept a count parameter, so that we could automatically create access for a set of instances like so:

resource "oci_file_storage_export" "u01elhosb" {
  #Required
  export_set_id  = "${oci_file_storage_mount_target.osb.export_set_id}"
  file_system_id = "${oci_file_storage_file_system.u01elhosb.id}"
  path           = "/u01/elhosb"

  export_options = [
    {
    	count           = "${var.OSBNodeCount}"
      source          = "${oci_core_instance.OSBNode.*.private_ip[count.index]}"
      access          = "READ_WRITE"
      identity_squash = "NONE"
    },
  ]
}
@afedorch
Copy link
Contributor

afedorch commented Apr 5, 2019

Thanks for reporting!
should it be a common request to support count in the fields? similar to: hashicorp/terraform#7034

@alexng-canuck
Copy link
Member

Hi @tyskjohan ,

It sounds like this will be addressed by Terraform's upcoming v0.12 release which will support things like dynamic nested blocks.

See https://www.hashicorp.com/blog/hashicorp-terraform-0-12-preview-for-and-for-each

This might allow you to dynamically define multiple nested blocks with different values based on some count or index.

Is this what you are looking for?

@tyskjohan
Copy link
Author

tyskjohan commented Apr 6, 2019

Hi @alexng-canuck -

That does indeed look promising. I did try to install v0.12.0-beta1 (from https://www.hashicorp.com/blog/announcing-terraform-0-1-2-beta1 ) but could not proceed due to No available provider "oci" plugins are compatible with this Terraform version.

@alexng-canuck
Copy link
Member

alexng-canuck commented Apr 8, 2019

@tyskjohan

Because the v0.12.0-beta1 isn't ready for production use yet, Terraform plugins that work with it are not yet published in the HashiCorp registry.

If you are willing to kick the tires on the beta, you need to download the providers from here: http://terraform-0.12.0-dev-snapshots.s3-website-us-west-2.amazonaws.com/

And install them in your ~/.terraform.d/plugins/ folder.

Note that v0.12 will also render some existing language features as incompatible; so you may need to upgrade existing configurations if they are using some syntax that is no longer supported.

@tyskjohan
Copy link
Author

Great, thanks!

@alexng-canuck
Copy link
Member

@tyskjohan Closing this issue since this should be addressed when v0.12 comes out. Feel free to reopen the issue if v0.12 still does not address your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants