#Terraform Provider for ONTAP Preview

1 messages · Page 1 of 1 (latest)

subtle orbit
#

Do note everything is subject to change.

The initial release is planned for the end of August or early September.
We plan to support 15 REST Endpoints in the initial release. Each endpoint will have 1 Resource (Create/modify/delete), and 2 Data Sources (one to return a single item, one to return a list of items). We will not be supporting imports for resources in this release.

cluster/licensing/licenses
cluster/schedules
name-services/dns
network/ip/interface
network/ip/routes
protocols/nfs/export-policies
protocols/nfs/export-policies/<policy-id>/rules
protocols/nfs/service
snapmirror/policies
snapmirror/relationships
storage/aggregates
storage/snapshot-policies
storage/volumes
storage/volumes/<uuid>/snapshot
svm

We are working on priorities for our subsequent few releases. If there is an endpoint that you would like to see that isn't on the list above. Please respond to this post with the end point, and who you work for.

real hornet
#

Please have a CONTRIBUTING.md doc when you release. I can see the community wanting to hop on this very quickly and I know a few of us are willing to submit PRs to add various things.

subtle orbit
#

Just and update for everyone. The Open source and Legal reviews are taking longer than i had hoped. The release date is starting to look more like Early/Mid September.

real hornet
#

Understandable given the recent licensing changes for Terraform-proper. Fingers-crossed that you all are planning to release this under an MPL license. (Not providing legal advice here) The BUSL license being applied to Terraform-proper is really focused on those entities that are building competitive services against Terraform Cloud. Seems Terraform are keeping most of the Providers (even the ones in their owned repos) under an MPL license for the time being.

subtle orbit
#

@real hornet it will be under the MPL licenses

real hornet
#

Sweet. How are things coming along? I just recently had to make a PR against the AWS Provider and I'm going to be adding additional resources for some new functionality we're launching soon. Dev toolchain for the AWS Provider was fairly easy to setup. Looking forward to seeing the ONTAP Provider getting launched and hopefully having some time to help commit to it.

subtle orbit
knotty dragon
#

Can you make this available in preview?

subtle orbit
#

@knotty dragon Right now it under review by our security and legal teams, until they have both approved we can't release anything publicly.

Once they both approve we do plan to release the 1.0.0 version on the terraform registry (https://registry.terraform.io/namespaces/NetApp) and move the github repo to public.

knotty dragon
#

Thanks Chris.

subtle orbit
#

Hey Everyone.

Update on the Terrafrom Provider. We hoped to get it out in September, but our Security review and release approvals are taking longer than we anticipated. Realistically, we probably won't be able to ship the first version of the Provider until October. These reviews only apply to the first shipped version of the Provider, so these delays won't be expected for future releases.

real hornet
#

Thanks for the update @subtle orbit and all of the hard work going into getting this published!

real hornet
#

While we're waiting for the repo to be published, I'm curious about the testing framework being used for this provider. Will one be able to run the acceptance tests against CVO (maybe the freemium version)?

subtle orbit
#

The github actions we have set up today that all new resouces will need to pass

  • Go build
  • Github codeql
  • go lint
  • go reportcard
  • unit test
  • ACC TEST
#

In the Provider it self we have internal/interfaces These are the specific function that call the rest api it self.

So like
func GetCluster() Is the rest api code to call GetCluster and return data

internal/provider currently have all the resources and Data Sources

#

Unit test are set up for internal/interfaces. WE created some mock for this so this work with out needing an ontap system. But since they are mocks if you don't module the ontap response correctly your unti test could give you false positives that everything is good.

We are thinking of removing these but decided to keep these for this release and see what other thing

#

Then we have acc test for interface/provider So the way this work is we have a Github Self Hosted runner that run in our OPen Lab enviorment that can talk to github.

This self hosted runner has access to a few specific ONTAP VSIM we have set up.

Inside of Github we have Secrets set up that contain the HOST ip, a license key, a usernamd and password that can be used in ACC tests

#

So when a user created a ACC test they will reference these secrets to run it on our test system. THat does mean. If there something you need on the Vsim to exist before your test we will have to create it before hand.

#

Unit test look something like this for the REST API.... i don't really like them, and feel most of it get covered in the ACC test which are a lot cleaner and easier to read. But for now we've left them in to see what the community feel about them if their useful or not

real hornet
#

Good to know. I've been doing a lot of work on the AWS Terraform Provider (likely one of the biggest/"gnarliest" Terraform Providers out there). Instead of checking API outputs, it is using Terraform's Test Cases/Steps (https://developer.hashicorp.com/terraform/plugin/sdkv2/testing/acceptance-tests/testcase). A lot more work to implement on the front end, but easily extensible as you add functionality and need to add/modify existing tests.

subtle orbit
#

we decided to go with the newer Framework vs SDKv2 as Hashi corp is pushing team ot use that over SDKv2.

Acceptance test are very similar for both though
https://developer.hashicorp.com/terraform/plugin/framework/acctests

Plugin Development - Framework: Acceptance Tests | Terraform | HashiCorp Developer

How to write acceptance tests for providers built on the framework. Acceptance tests imitate applying configuration files.

knotty dragon
#

@subtle orbit Is there an update on availability?

real hornet
manic yacht
#

Insight is over, forgot to ask... sooo, what's the status? 🙂 @subtle orbit

subtle orbit
#

We are close to getting this out, all approval are done except security approval which is still under review. I don't have an ETA from them.

azure lynx
real hornet