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

23 new resource protocolscifsservices #160

Merged
merged 17 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/acc_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ jobs:
TF_ACC_NETAPP_HOST2: ${{ secrets.TF_ACC_NETAPP_HOST2 }}
TF_ACC_NETAPP_HOST3: ${{ secrets.TF_ACC_NETAPP_HOST3 }}
TF_ACC_NETAPP_HOST4: ${{ secrets.TF_ACC_NETAPP_HOST4 }}
TF_ACC_NETAPP_HOST_CIFS: ${{ secrets.TF_ACC_NETAPP_HOST_CIFS }}
TF_ACC_NETAPP_USER: ${{ secrets.TF_ACC_NETAPP_USER }}
TF_ACC_NETAPP_PASS: ${{ secrets.TF_ACC_NETAPP_PASS }}
TF_ACC_NETAPP_PASS2: ${{ secrets.TF_ACC_NETAPP_PASS2 }}
TF_ACC_NETAPP_PASS_CIFS: ${{ secrets.TF_ACC_NETAPP_PASS_CIFS }}
TF_ACC_NETAPP_LICENSE: ${{ secrets.TF_ACC_NETAPP_LICENSE }}

TF_ACC_NETAPP_CIFS_ADDOMAIN_PASS: ${{ secrets.TF_ACC_NETAPP_CIFS_ADDOMAIN_PASS }}
run: |
export GOFLAGS=-buildvcs=false
export TF_ACC=1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reportcard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.19.3'
go-version: '1.22'

- name: Set up goreportcard
working-directory: /tmp
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ FEATURES:
* **New Resource:** `netapp-ontap_protocols_cifs_user_group_member_resource` ([#123](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/123))
* **New Resource:** `netapp-protocols_san_lun-maps_resource` ([#13](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/13))
* **New Resource:** `netapp-ontap_name_services_ldap_resource` ([#25](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/25))

* **New Resource:** `netapp-ontap_protocols_cifs_service_resource` ([#23](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/23))

ENHANCEMENTS:
* **netapp-ontap_protocols_nfs_export_policy_resource**: Add support for import ([#34](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/34))
Expand Down
133 changes: 133 additions & 0 deletions docs/resources/protocols_cifs_service_resource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "netapp-ontap_protocols_cifs_service_resource Resource - terraform-provider-netapp-ontap"
subcategory: "nas"
description: |-
CifsService resource
---

# netapp-ontap_protocols_cifs_service_resource (Resource)

Create/Modify/Delete a CIFS service resource

### Related ONTAP commands
* vserver cifs server create
* vserver cifs server options modify
* vserver cifs security modify
* vserver cifs server add-netbios-aliases
* vserver cifs server modify
* vserver cifs server remove-netbios-aliases
* vserver cifs server delete

## Supported Platforms
* On-perm ONTAP system 9.6 or higher
* In security, parameters only can be used in ONTAP 9.8 or higher:
`lm_compatibility_level`, `encrypt_dc_connection`
* In security, parameters only can be used in ONTAP 9.10 or higher
`use_ldaps, use_start_tls`, `aes_netlogon_enabled`, `try_ldap_channel_binding`, `ldap_referral_enabled`, `session_security`
* In security, parameters only can be used in ONTAP 9.12 or higher
`advertised_kdc_encryptions`
* In security, `kdc_encryption` deprecated in 9.12.1
## Example Usage

```terraform
resource "netapp-ontap_protocols_cifs_service_resource" "protocols_cifs_service_basic" {
# required to know which system to interface with
cx_profile_name = "clustercifs"
name = "tftestcifs"
svm_name = "testSVM"
ad_domain = {
fqdn = "mytfdomain.com"
organizational_unit = "CN=Computers"
user = "administrator"
password = "Ab0xB@wks!"
}
}

resource "netapp-ontap_protocols_cifs_service_resource" "protocols_cifs_service" {
# required to know which system to interface with
cx_profile_name = "clustercifs"
name = "tftestcifs"
svm_name = "testSVM"
ad_domain = {
fqdn = "mytfdomain.com"
organizational_unit = "CN=Computers"
user = "administrator"
password = "Ab0xB@wks!"
}
netbios = {
aliases = ["abc", "def"]
}
security = {
lm_compatibility_level = "ntlm_ntlmv2_krb"
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `ad_domain` (Attributes) Ad domain (see [below for nested schema](#nestedatt--ad_domain))
- `cx_profile_name` (String) Connection profile name
- `name` (String) CifsService name
- `svm_name` (String) CifsService svm name

### Optional

- `comment` (String) Text comment of up to 48 characters about the CIFS server
- `default_unix_user` (String) Default unix user
- `enabled` (Boolean) Specifies if the CIFS service is administratively enabled
- `force` (Boolean) Specifies if the CIFS service is administratively enabled (9.11)
- `netbios` (Attributes) Netbios (see [below for nested schema](#nestedatt--netbios))
- `security` (Attributes) Security (see [below for nested schema](#nestedatt--security))

### Read-Only

- `id` (String) CifsService ID

<a id="nestedatt--ad_domain"></a>
### Nested Schema for `ad_domain`

Required:

- `fqdn` (String) Fully qualified domain name of the Windows Active Directory to which this CIFS server belongs
- `password` (String, Sensitive) Account password used to add this CIFS server to the Active Directory
- `user` (String) User account with the access to add the CIFS server to the Active Directory

Optional:

- `organizational_unit` (String) Organizational unit


<a id="nestedatt--netbios"></a>
### Nested Schema for `netbios`

Optional:

- `aliases` (Set of String) list of one or more NetBIOS aliases for the CIFS server
- `enabled` (Boolean) NetBios name service (NBNS) is enabled for the CIFS
- `wins_servers` (Set of String) list of Windows Internet Name Server (WINS) addresses that manage and map the NetBIOS name of the CIFS server to their network IP addresses. The IP addresses must be IPv4 addresses.


<a id="nestedatt--security"></a>
### Nested Schema for `security`

Optional:

- `advertised_kdc_encryptions` (Set of String) List of advertised KDC encryptions
- `aes_netlogon_enabled` (Boolean) An AES session key is enabled for the Netlogon channel (9.10)
- `encrypt_dc_connection` (Boolean) Encryption is required for domain controller connections (9.8)
- `kdc_encryption` (Boolean) Specifies whether AES-128 and AES-256 encryption is enabled for all Kerberos-based communication with the Active Directory KDC
- `ldap_referral_enabled` (Boolean) Specifies if LDAP referral chasing is enabled for AD LDAP connections (9.10)
- `lm_compatibility_level` (String) CIFS server minimum security level
- `restrict_anonymous` (String) Specifies what level of access an anonymous user is granted
- `session_security` (String) Client session security for AD LDAP connections (9.10)
- `smb_encryption` (Boolean) Specifies if encryption is required for incoming CIFS traffic
- `smb_signing` (Boolean) Specifies if signing is required for incoming CIFS traffic
- `try_ldap_channel_binding` (Boolean) Specifies whether or not channel binding is attempted in the case of TLS/LDAPS (9.10)
- `use_ldaps` (Boolean) Specifies whether or not to use use LDAPS for secure Active Directory LDAP connections by using the TLS/SSL protocols (9.10)
- `use_start_tls` (Boolean) Specifies whether or not to use SSL/TLS for allowing secure LDAP communication with Active Directory LDAP servers (9.10)


11 changes: 9 additions & 2 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,21 @@ provider "netapp-ontap" {
},
{
name = "cluster3"
hostname = "10.193.176.159"
hostname = "********159"
username = var.username
password = var.password
validate_certs = var.validate_certs
},
{
name = "cluster4"
hostname = "10.193.180.108"
hostname = "********108"
username = var.username
password = var.password
validate_certs = var.validate_certs
},
{
name = "clustercifs"
hostname = "********189"
username = var.username
password = var.password
validate_certs = var.validate_certs
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
resource "netapp-ontap_protocols_cifs_service_resource" "protocols_cifs_service" {
# required to know which system to interface with
cx_profile_name = "clustercifs"
name = "tftestcifs"
svm_name = "testSVM"
ad_domain = {
fqdn = "mytfdomain.com"
organizational_unit = "CN=Computers"
user = "cifstest"
password = "xxxxxx"
}
}
Loading
Loading