Skip to content

Commit

Permalink
Add sda fabric authentication profile resource and data source
Browse files Browse the repository at this point in the history
  • Loading branch information
danischm committed Feb 18, 2024
1 parent d4e0737 commit 47db772
Show file tree
Hide file tree
Showing 15 changed files with 752 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Add `catalystcenter_sda_fabric_site` resource and data source
- Add `catalystcenter_template_version` resource and data source
- Add `catalystcenter_sda_fabric_authentication_profile` resource and data source

## 0.1.4

Expand Down
31 changes: 31 additions & 0 deletions docs/data-sources/sda_fabric_authentication_profile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "catalystcenter_sda_fabric_authentication_profile Data Source - terraform-provider-catalystcenter"
subcategory: "SDA"
description: |-
This data source can read the SDA Fabric Authentication Profile.
---

# catalystcenter_sda_fabric_authentication_profile (Data Source)

This data source can read the SDA Fabric Authentication Profile.

## Example Usage

```terraform
data "catalystcenter_sda_fabric_authentication_profile" "example" {
id = "Global/Site1"
}
```

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

### Required

- `id` (String) The id of the object

### Read-Only

- `authentication_template_name` (String) Authentication Template Name
- `site_name_hierarchy` (String) Path of SDA Fabric Site
1 change: 1 addition & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ description: |-

- Add `catalystcenter_sda_fabric_site` resource and data source
- Add `catalystcenter_template_version` resource and data source
- Add `catalystcenter_sda_fabric_authentication_profile` resource and data source

## 0.1.4

Expand Down
41 changes: 41 additions & 0 deletions docs/resources/sda_fabric_authentication_profile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "catalystcenter_sda_fabric_authentication_profile Resource - terraform-provider-catalystcenter"
subcategory: "SDA"
description: |-
This resource can manage a SDA Fabric Authentication Profile.
---

# catalystcenter_sda_fabric_authentication_profile (Resource)

This resource can manage a SDA Fabric Authentication Profile.

## Example Usage

```terraform
resource "catalystcenter_sda_fabric_authentication_profile" "example" {
site_name_hierarchy = "Global/Site1"
authentication_template_name = "No Authentication"
}
```

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

### Required

- `authentication_template_name` (String) Authentication Template Name
- Choices: `No Authentication`, `Open Authentication`, `Closed Authentication`, `Low Impact`
- `site_name_hierarchy` (String) Path of SDA Fabric Site

### Read-Only

- `id` (String) The id of the object

## Import

Import is supported using the following syntax:

```shell
terraform import catalystcenter_sda_fabric_authentication_profile.example "Global/Site1"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "catalystcenter_sda_fabric_authentication_profile" "example" {
id = "Global/Site1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import catalystcenter_sda_fabric_authentication_profile.example "Global/Site1"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "catalystcenter_sda_fabric_authentication_profile" "example" {
site_name_hierarchy = "Global/Site1"
authentication_template_name = "No Authentication"
}
41 changes: 41 additions & 0 deletions gen/definitions/sda_fabric_authentication_profile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: SDA Fabric Authentication Profile
rest_endpoint: /dna/intent/api/v1/business/sda/authentication-profile
id_from_attribute: true
id_query_param: siteNameHierarchy
delete_id_query_param: siteNameHierarchy
no_update: true
skip_minimum_test: true
doc_category: SDA
attributes:
- model_name: siteNameHierarchy
data_path: "0"
response_data_path: siteNameHierarchy
type: String
id: true
description: Path of SDA Fabric Site
example: Global/Site1
test_value: 'catalystcenter_sda_fabric_site.test.site_name_hierarchy'
- model_name: authenticateTemplateName
tf_name: authentication_template_name
data_path: "0"
response_data_path: authenticateTemplateName
type: String
mandatory: true
requires_replace: true # PUT is there but requires more parameters, therefore we use DELETE/POST to update
description: Authentication Template Name
enum_values:
- No Authentication
- Open Authentication
- Closed Authentication
- Low Impact
example: No Authentication
test_prerequisites: |
resource "catalystcenter_area" "test" {
name = "Area1"
parent_name = "Global"
}
resource "catalystcenter_sda_fabric_site" "test" {
site_name_hierarchy = "${catalystcenter_area.test.parent_name}/${catalystcenter_area.test.name}"
fabric_type = "FABRIC_SITE"
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 47db772

Please sign in to comment.