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

Refactor YAML file name for organization admins #14

Merged
merged 1 commit into from
Oct 11, 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
2 changes: 1 addition & 1 deletion .terraform-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ content: |-
#### `organization.yaml`

```yaml
{{ include "./examples/administrator/organization.yaml" }}
{{ include "./examples/administrator/organizations_admins.yaml" }}
```

#### `main.tf`
Expand Down
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ Configuring an organization administrator using YAML:

```yaml
meraki:
organizations:
- name: MyOrg1
administrators:
- name: Admin1
email: [email protected]
networks:
- name: MyNet1
domains:
- name: EMEA
administrator:
name: Dev CX Provider Admin
organizations:
- name: Dev
admins:
- name: Dev CX Provider Admin
email: [email protected]
authentication_method: Email
org_access: full
```

#### `main.tf`
Expand All @@ -31,7 +35,7 @@ module "meraki" {
source = "netascode/nac-meraki/meraki"
version = ">= 0.1.0"

yaml_files = ["organization.yaml"]
yaml_files = ["organizations_admins.yaml"]
}
```

Expand Down
4 changes: 2 additions & 2 deletions examples/administrator/.terraform-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ content: |-

Note that this example will create resources. Resources can be destroyed with `terraform destroy`.

#### `organization.yaml`
#### `organizations_admins.yaml`

```yaml
{{ include "./organization.yaml" }}
{{ include "./organizations_admins.yaml" }}
```

#### `main.tf`
Expand Down
22 changes: 13 additions & 9 deletions examples/administrator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@ $ terraform apply

Note that this example will create resources. Resources can be destroyed with `terraform destroy`.

#### `organization.yaml`
#### `organizations_admins.yaml`

```yaml
meraki:
organizations:
- name: MyOrg1
administrators:
- name: Admin1
email: [email protected]
networks:
- name: MyNet1
domains:
- name: EMEA
administrator:
name: Dev CX Provider Admin
organizations:
- name: Dev
admins:
- name: Dev CX Provider Admin
email: [email protected]
authentication_method: Email
org_access: full
```

#### `main.tf`
Expand All @@ -37,7 +41,7 @@ module "meraki" {
source = "netascode/nac-meraki/meraki"
version = ">= 0.1.0"

yaml_files = ["organization.yaml"]
yaml_files = ["organizations_admins.yaml"]
}
```
<!-- END_TF_DOCS -->
2 changes: 1 addition & 1 deletion examples/administrator/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ module "meraki" {
source = "netascode/nac-meraki/meraki"
version = ">= 0.1.0"

yaml_files = ["organization.yaml"]
yaml_files = ["organizations_admins.yaml"]
}
8 changes: 0 additions & 8 deletions examples/administrator/organization.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions examples/administrator/organizations_admins.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
meraki:
domains:
- name: EMEA
administrator:
name: Dev CX Provider Admin
organizations:
- name: Dev
admins:
- name: Dev CX Provider Admin
email: [email protected]
authentication_method: Email
org_access: full