-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #279 from NetApp/18-new-resource-security_login_me…
…ssage 18 new resource security login message
- Loading branch information
Showing
22 changed files
with
519 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "netapp-ontap_security_login_messages Resource - terraform-provider-netapp-ontap" | ||
subcategory: "Security" | ||
description: |- | ||
SecurityLoginMessage resource | ||
--- | ||
|
||
# Resource security login message | ||
|
||
Update/Import Security Login Message | ||
The `security_login_messages` resource does not support creation or deletion operations. Users must first import the existing resource and then perform updates as needed. | ||
|
||
### Related ONTAP commands | ||
```commandline | ||
* security login banner show | ||
* security login motd show | ||
* security login banner modify | ||
* security login motd modify | ||
``` | ||
|
||
## Supported Platforms | ||
* On-perm ONTAP system 9.6 or higher | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "netapp-ontap_security_login_messages" "msg_import_cluster" { | ||
banner = "test banner" | ||
cx_profile_name = "cluster4" | ||
message = "test message" | ||
scope = "cluster" | ||
show_cluster_message = true | ||
} | ||
resource "netapp-ontap_security_login_messages" "msg_import_svm" { | ||
banner = "test banner" | ||
cx_profile_name = "cluster4" | ||
message = "test message" | ||
scope = "svm" | ||
show_cluster_message = true | ||
svm_name = "svm5" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `cx_profile_name` (String) Connection profile name | ||
|
||
### Optional | ||
|
||
- `banner` (String) SecurityLoginMessage login banner | ||
- `message` (String) SecurityLoginMessage the message of the day (MOTD). This message appears just before the clustershell prompt after a successful login. | ||
- `scope` (String) SecurityLoginMessage network scope | ||
- `show_cluster_message` (Boolean) Specifies whether to show a cluster-level message before the SVM message when logging in as an SVM administrator | ||
- `svm_name` (String) SecurityLoginMessage svm name | ||
|
||
### Read-Only | ||
|
||
- `id` (String) SecurityLoginMessage ID | ||
|
||
### Terraform Import | ||
|
||
For example | ||
Import with cluster info only | ||
```shell | ||
terraform import netapp-ontap_security_login_messages.cluster_import cluster4 | ||
``` | ||
Import with svm and cluster info | ||
```shell | ||
terraform import netapp-ontap_security_login_messages.svm_import svm1,cluster4 | ||
``` | ||
|
||
### Terraform Import Block | ||
This requires Terraform 1.5 or higher, and will auto create the configuration for you | ||
|
||
First create the block. Use import svm message as an example | ||
```terraform | ||
import { | ||
to = netapp-ontap_security_login_messages.svm_import | ||
id = "svm1,cluster4" | ||
} | ||
``` | ||
Next run, this will auto create the configuration for you | ||
```shell | ||
terraform plan -generate-config-out=generated.tf | ||
``` | ||
This will generate a file called generated.tf, which will contain the configuration for the imported resource | ||
```terraform | ||
# __generated__ by Terraform | ||
# Please review these resources and move them into your main configuration files. | ||
# __generated__ by Terraform from "svm1,cluster4" | ||
resource "netapp-ontap_security_login_messages" "msg_import_svm" { | ||
banner = "test banner" | ||
cx_profile_name = "cluster4" | ||
message = "test message\n12345" | ||
scope = "svm" | ||
show_cluster_message = true | ||
svm_name = "svm1" | ||
} | ||
``` |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...netapp-ontap_security_account/resource.tf → ...etapp-ontap_security_accounts/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
1 change: 1 addition & 0 deletions
1
examples/resources/netapp-ontap_security_login_messages/provider.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../provider/provider.tf |
17 changes: 17 additions & 0 deletions
17
examples/resources/netapp-ontap_security_login_messages/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
resource "netapp-ontap_security_login_messages" "msg_import_cluster" { | ||
banner = "test banner" | ||
cx_profile_name = "cluster4" | ||
message = "test message" | ||
scope = "cluster" | ||
show_cluster_message = true | ||
} | ||
|
||
resource "netapp-ontap_security_login_messages" "msg_import_svm" { | ||
banner = "test banner" | ||
cx_profile_name = "cluster4" | ||
message = "test message" | ||
scope = "svm" | ||
show_cluster_message = true | ||
svm_name = "svm5" | ||
} |
1 change: 1 addition & 0 deletions
1
examples/resources/netapp-ontap_security_login_messages/terraform.tfvars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../provider/terraform.tfvars |
1 change: 1 addition & 0 deletions
1
examples/resources/netapp-ontap_security_login_messages/variables.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../provider/variables.tf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.